Download image here: https://rcn-ee.com/rootfs/
Example file to download: https://rcn-ee.com/rootfs/2018-02-09/flasher/BBB-eMMC-flasher-debian-9.3-console-armhf-2018-02-09-2gb.img.xz. We should get Debian one, over Ubuntu.
If the file name starts with BBB-eMMC-flasher
, this image will automatically run the flasher tool when the BeagleBone boots from Micro SD card, we don't need to press the button near to the Micro SD slot to activate the flasher tool.
We should use bmap-tool, instead of dd
, because the later is very slow.
Assume that we saved the file to ~/Downloads/. Before flashing, we need to do:
1. Generate bmap file from the downloaded file.
- Uncompress the image file
unxz BBB-eMMC-flasher-debian-9.3-console-armhf-2018-02-09-2gb.img.xz
- Generate bmap file
bmaptool create BBB-eMMC-flasher-debian-9.3-console-armhf-2018-02-09-2gb.img.xz -o BBB-eMMC-flasher-debian-9.3-console-armhf-2018-02-09-2gb.bmap
2. Insert Micro SD card to your PC and determine its device file:
lsblk
The result will be similar to this:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 465.8G 0 disk ├─sda1 8:1 0 512M 0 part /boot/efi ├─sda2 8:2 0 4G 0 part [SWAP] ├─sda3 8:3 0 35G 0 part / ├─sda4 8:4 0 20G 0 part ├─sda5 8:5 0 30G 0 part /home sr0 11:0 1 1024M 0 rom mmcblk0 179:0 0 7.4G 0 disk └─mmcblk0p1 179:1 0 1.7G 0 part /media/quan/rootfs
The device path for micro SD card will be /dev/mmcblk0
(note, not mmcblk0p1
).
3. Because my card has a partition on it, and was automatically mounted, I need to unmount it:
sudo umount /dev/mmcblk0p1
4. Write the image to card:
sudo bmaptool copy BBB-eMMC-flasher-debian-9.3-console-armhf-2018-02-09-2gb.img /dev/mmcblk0
Now, you can take out the micro SD card from your PC and insert to BeagleBone, turn it on to flash it. Note that after the flashing finishes, you have to take away the SD card, or next time the flasher will automatically run and reflash your board.