MicroSD -- updating...

I really have to stop answering direct questions. They do get my attention every now and again. This one seems very FAQ, so let me try posting a response to the list with you in bcc…

Hi Jason,
Dumb question from a newbie. I am in the Cloud9 IDE and just going through your excellent upgrade process on my BBGW. I had previously flashed a MicroSD with the Debian 9.9 August 3 2019 IOT version, and I booted up the BBGW by holding down the User button. I connected to the Internet over my WiFi (following your instructions), and then did the update and upgrade processes. My dumb question is, after doing all this updating and upgrading, where are these updates being stored?

  • In the MMC? If so, great — I don’t have to use the MicroSD in the future.

If you booted off the microSD and it is not a flasher image, then it wouldn’t be writing to the eMMC… it would be writing to whatever is the active root file system.

You can check a live running system by typing ‘mount’. The Bootlin guys have my first Internet search result and it looks good: https://bootlin.com/blog/find-root-device/

If you did get a flasher image (and it sounds like you didn’t), then after booting from the microSD card, the USR0-3 LEDs would start lighting up in a “Larson scanner” pattern.



When your Beagle is done writing to the on-board eMMC flash, the scanner will stop and the board should power off. There are some error conditions where it might not power off. Under some of those error conditions, the flashing may still have completed successfully and the error is only related to the powering-off exercise.

If you want to know if a particular microSD card image is a flasher, the file name is the most obvious, but you can also mount the disk’s file system and look in the /boot/uEnv.txt file. The difference is documented here: https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Flashing_eMMC.

On a flasher image, you’ll see a line like the below that begins with ‘cmdline’ and does not begin with ‘#’:


There is lots of documentation on the Internet on mounting and unmounting file systems (https://linuxize.com/post/how-to-mount-and-unmount-file-systems-in-linux/) as well as editing text files (https://linuxize.com/post/how-to-use-nano-text-editor/). Note that the biggest requirement is that you do so from some kind of Linux computer that understand’s Linux file systems. If you try to edit the microSD card from a Mac or Windows PC, you’ll likely just end up corrupting it. A working Beagle is a fine Linux computer to edit microSD cards–just be careful not to reboot with the microSD card inserted if it is configured to be a flasher and you don’t want your on-board eMMC flash overwritten!

  • Back on the MicroSD? That is ok; I will just have to make sure I always boot off that MicroSD

Most likely, that is exactly what happened. However, don’t fret, you can still copy the contents of your newly updated microSD card over to your on-board eMMC flash.

How? Well just scroll back up a bit and look at turning your microSD card image into a flasher image. You edit that /boot/uEnv.txt file, shutdown safely (‘sudo shutdown -h now’) and boot back up again (unpower, hold boot button, apply power, release boot button immediately).

Watch the Larson scanner until you get bored. Walk away and come back in 20-30 minutes to check on it. Board off? That’s good news! REMOVE THE MICROSD CARD NOW before you unpower and apply power again. This will keep you from making the mistake of starting the flashing process over again.

Anyway, my point is that the flashing process duplicates what is on the microSD card onto the eMMC, so you should be good to go.

There are a lot of other handy scripts in /opt/scripts. Check them out and search/ask-questions on the Google Group (https://beagleboard.org/discuss) if you are unclear on what they do.

  • In RAM? Uggh—please tell me I don’t have to do this every time.

Nope. The Debian images aren’t ramdisk-oriented after the initial boot. Doing and update/upgrade will impact the root file system on microSD or eMMC unless you’ve got your own special ramdisk image. If you are asking, you don’t.

Let me know if I wrote this well enough to pin it as a FAQ.