Skip to content

Raspbian Custom Operating System Build

Raspbian is a Debian based operating system for the Raspberry Pi.

Build Instructions

The instructions will produce a bare minimal operating system.


It is assumed a Debian based operating system is being used to preform the build and to be done via the shell or terminal.

  1. Install the following packages.
    $ sudo apt-get install binfmt-support debootstrap kpartx qemu qemu-user-static
  2. Create directory.
    $ mkdir -p ~/raspbianos
  3. Change directory.
    $ cd ~/raspbianos
  4. $ sudo qemu-debootstrap --arch armhf --variant=minbase jessie chroot-raspbian-armhf
  5. $ sudo mkdir chroot-raspbian-armhf/proc/ chroot-raspbian-armhf/sys/ chroot-raspbian-armhf/dev/
  6. Mount.
    $ sudo mount -t proc proc ~/
    $ sudo mount -t sysfs sysfs ~/
    $ sudo mount -o bind /dev ~/
  7. Clone git repository.
    $ git clone
  8. Create directory.
    $ mkdir bootfs
  9. Create directories.
    $ sudo mkdir chroot-raspbian-armhf/lib chroot-raspbian-armhf/lib/modules
  10. Copy files.
    $ sudo cp -R firmware/hardfp/opt/* chroot-raspbian-armhf/opt/
    $ sudo cp -R firmware/modules/* chroot-raspbian-armhf/lib/modules/
    $ sudo cp -R firmware/boot/* bootfs/