BeagleBoneBlack Stock Debian from External HD

As an alternative to the official Debian images, you can install stock Debian Stretch since most features necessary for BBB support were mainlined. TODO What about other BeagleBone variants?

Note: Under heavy load, the external HD / UAS (USB-Attached-SCSI) may display errors. This appears to be fixed when using Debian Buster rather than Debian Stretch.

This guide assumes the Beaglebone Black was booted from an external MicroSD card with a standard prebuilt Beaglebone Black Debian image on it. Otherwise the path of /boot/dtbs/4.9.82-ti-r102/am335x-boneblack.dtb may need to be adjusted.

Create or reuse an MBR partition table on the eMMC at. This guide uses the first eMMC partitioon as the boot partition. If you create a new MBR partition table e.g. with, you will need to reinstall das U-Boot as explained at the end of this guide. Your external HD is assumed in this guide to be partitioned with the root partition at.

Now download with wget the debootstrap binary as described in Debian installation instructions D.3.2.

DeviceTree information about the Beaglebone Black must be copied over and *changed*: The Sitara processor in the Beaglebone Black has issues in Debian Stretch's Linux kernel with the cppi41dma kernel module. (TODO There probably is a less invasive way to do this.)

Open /tmp/am335x-boneblack.dts in a text editor. Find the lines:

Above these lines, there is a line:

Delete this one line. Then:

Add the partitions to the fstab. You may also use UUIDs or similar instead of /dev/sda2.

Note: When changing the fstab or the flash-kernel configuration later on, mount *everything*, chroot into /mnt and run:

flash-kernel will generate a bootscript that boots the Linux kernel via initramfs, unlike the normal BBB boot process which directly boots into the kernel. Booting via initramfs is necessary for loading the kernel modules for the external HD.

Note: To repopulate /boot later on if you flashed the eMMC or for other reasons, you need to reinstall  and not just.

If at the beginning of this guide you have recreated the partition table of the eMMC, you may need to run:

Failing to do so may mean the BBB cannot find das U-Boot bootloader on the eMMC and just prints CCCCCCCCCCCCCC on the debug serial UART console, cf. .

You probably want to setup basic tools like sudo and network, like this for example:

Now you can power off your Beaglebone Black and remove the SD card you booted from. Restarting the BBB will boot your new operating system.