I have successfully followed the instructions under Snappy: Getting started with a Beaglebone Black and currently my BeagleBone Black always boots Ubuntu Core from the microSD card.
Is it possible to flash Ubuntu Core on the on-board flash memory (eMMC) itself, so that I no longer need the SD card at all? (The eMMC's storage capacity is ~4GB.)
Best Answer
The result and remaining problem
This walkthrough boots Snappy Ubuntu Core from the Beaglebone Black's(BBB) eMMC instead of the default boot from SD card. But for that to work, it breaks the a/b fallback mechanism constructed in the U-boot step of the Snappy Core default image. The reason the fallback mechanism is broken is because it uses the "saveenv" U-boot command which for an still unknown reason doesn't seem to work on the BBB's eMMC.
The walkthrough
Create bootable sd card to dd the Snappy Core img to the eMMC of the BBB.
Download the latest Debian image provided by the beaglebone.org:
Unpack and copy the debian image to your SD card. BE CAREFUL you can overwrite your root filesystem if you pick the wrong device! Check "dmesg | tail" when inserting SD card find the correct device.
Overwrite the eMMC default image with the Snappy Ubuntu Core image.
Download a compressed Snappy Ubuntu Core image on the SD Card.
Insert the newly created Debian SD card in the BBB and boot from it using the boot button. Once booted, download the Snappy Ubuntu Core compressed image to the sd card.
Find out which device is the eMMC.
During boot, the debian image will mount the root filesystem from the SD card to "/". Usually this is "/dev/mmcblk0".
Check which is the other available mmc device. Usually this means the eMMC is /dev/mmcblk1.
Unpack and dd the Snappy Ubuntu Core image to the eMMC of the BBB.
By default U-boot will not boot since the U-boot environment is still pointing to the SD card. I used the uEnv.txt example to get started and adjust a few things in order to point to the eMMC. Actually 3 lines are changed:
Original
mmcdev=0
New:
mmcdev=1
Original
snappy_ab=a
snappy_boot=if test "${snappy_mode}" = "try"; then if test "${snappy_trial_boot}" = "1"; then setenv snappy_os "${snappy_good_os}"; setenv snappy_kernel "${snappy_good_kernel}"; saveenv; else setenv snappy_trial_boot 1; saveenv; fi; fi; run loadfiles; setenv mmcroot /dev/disk/by-label/writable ${snappy_cmdline} snappy_os=${snappy_os} snappy_kernel=${snappy_kernel}; run mmcargs; bootz ${loadaddr} ${initrd_addr}:${initrd_size} ${fdtaddr}
New
snappy_kernel=a
snappy_boot=run loadfiles; setenv mmcroot /dev/disk/by-label/system-${snappy_kernel} ${snappy_cmdline} snappy_os=${snappy_os} snappy_kernel=${snappy_kernel} rootfstype=ext4; run mmcargs; bootz ${loadaddr} ${initrd_addr}:${initrd_size} ${fdtaddr}