The BeagleBone comes pre-installed with Debian, but if you want to reset your board with a clean install (or install Debian on a BeagleBone that originally came with Ångström), sometimes your best bet is to download a new image. On the original BeagleBone, you’ll be writing a bit-for-bit copy of an .img file to a MicroSD card that you boot off of when it’s inserted into the board. You can do the same on the BeagleBone Black, but you also have the option of writing the disk image to the on-board flash memory, or eMMC, so that you can later boot without a MicroSD card inserted.
Go to the BeagleBoard latest-images page and download the most recent Debian image, which will be an .xz file.
df
. This will list all the drive volumes connected to your computer.
df
again.
The MicroSD card should now appear as new device on the list of disks. In my case, it’s /dev/disk1. Unmount that disk by typing
sudo diskutil unmountDisk /dev/disk1
Type in your computer’s administrator password when sudo asks for it.
Navigate to the folder where you downloaded the image .xz file. For example:
cd ~/Downloads
Execute the following command to start the process of decompressing and copying the image to the card. Note that you need to add an r
in front of disk (this writes directly to the raw disk device). Replace the name of the .xz file with the name of the file you downloaded and /dev/rdisk1 with the disk that you unmounted in the previous step (but don’t forget to put r
in front of disk
). The first command gives you a root shell on the Mac, and the second runs the command. Exit the root shell by typing exit when it’s done.
sudo -s xz -dkc <Debian Image File>.img.xz > /dev/rdisk1
Make sure you are using the correct device filename, or you could overwrite the wrong disk, including the one your operating system is on!
Go to the BeagleBoard latest-images page and download the most recent Debian image, which will be an .xz file.
Navigate to the folder where you downloaded the Debian image and right click on it. Under the 7-zip menu, click “Extract Files Here.” This will create an .img file.
Go to the BeagleBoard latest-images page and download the most recent Debian image, which will be an .xz file.
Get a listing of the storage devices connected to your computer:
fdisk -l
Determine the device that matches your MicroSD card. It might be something like /dev/sda1.
Make sure you are using the correct device filename, or you could overwrite the wrong disk, including the one your operating system is on!
Navigate to the folder where you downloaded the image .xz file. For example:
cd ~/Downloads
Execute the following command to start the process of decompressing and copying the image to the card. Replace the name of the .xz file with the name of the file you downloaded and /dev/sda1 with the device that matches your MicroSD card. The first command gives you a root shell on the Mac, and the second runs the command. Exit the root shell by typing exit when it’s done:
sudo -s xz -dkc <Debian Image File>.img.xz > /dev/sda1
On the BeagleBone Black, you can download an image file for an eMMC flasher, which is a MicroSD card that is specifically configured to install the operating system from the MicroSD to the on-board flash memory so that you can boot without a MicroSD card inserted. If you used the steps above to create an eMMC flasher card, having it flash the BeagleBone Black’s memory is easy:
Now when you apply power to the board, it will boot off your newly flashed eMMC.