The latest revision of the BeagleBone Black is shipping with a 4GB eMMC, and it’s now possible to get it pre-imaged with Debian Wheezy, a more broadly useful production-isn environment than Angstrom. If you have a rev. B BeagleBone Black, you might want to run Debian on yours as well.
BeagleBoard.org only provides instructions for using a Windows machine to set up an SD card with the Debian Wheezy image, so I wanted to document a parallel set of directions and utilities for OS X users.
Get the Compressed “Wheezy” Image
Check the MD5 hash, just to make sure that we’ve gotten the correct image. On OS X, the
md5 command works similarly to md5sum on other systems.
$ md5 bone-debian-7.6-console-armhf-2014-08-13-2gb.img.xz
MD5 (bone-debian-7.6-console-armhf-2014-08-13-2gb.img.xz) = f925d35517b3938e67d9108f6abd3c4b
Uncompress the Image
Images for the BeagleBone Black (and other small devices) tend to come in 7zip format, and there’s no built-in support for unpacking 7zip files in OS X. However, Dag Ågren, the author of the Mac utility the UnArchiver, has made some free command line tools available which will handle 7zip files.
Install unar wherever it’s convenient to in your $PATH (Homebrew users will probably want to move it to /usr/local/bin). Unpack the image file with the command
Install the Image On an SD Card
Without the SD card inserted in your Mac, run the command
You’ll get a list of the disk volumes mounted on your system. Now, insert the SD card, and run the
df -h command a second time. Note the device identifier for the SD card, which should now appear at the end of the list, showing an identifier that wasn’t previously present (you can also check the volume names, at the end of each output line.) In my case, it’s
Start by unmounting the SD card so that it can be completely rewritten.
sudo diskutil unmount /dev/disk5s1
We have to write to the raw disk, which has a slightly different identifier. In this example, since our SD card was
/dev/disk5s1, the corresponding raw disk is
/dev/rdisk5; if your SD card showed up at
/dev/disk3s1, you’d use
/dev/rdisk3, and so on.
dd command to write the image to the SD card. Be very certain you’re using the correct raw disk identifier here, or you’re liable to overwrite something you didn’t want to!
sudo dd bs=1m if=bone-debian-7.6-console-armhf-2014-08-13-2gb.img of=/dev/rdisk5
This command will take several minutes to run, be patient. When it completes, it will output something like the following:
1700+0 records in
1700+0 records out
1782579200 bytes transferred in 366.464955 secs (4864256 bytes/sec)
Now, eject the SD card, and you’re ready to reboot your BeagleBone into Debian Wheezy.
sudo diskutil eject /dev/rdisk5
With the BeagleBone connected to a monitor and a keyboard, but not connected to power, insert the SD card. While holding down the “BOOT” button, connect the board to power, and continue to hold the “BOOT” button down until you see the USR LEDs light up. You should be able to log in using the user name “debian” and password “temppwd”.