Using BeagleBoneBlack in 2023

The BBB might be an older piece of tech but it's still powerful enough to be a useful little SBC. I'm using mine to run network attached storage. Here's the deal: how do you get modern-ish headless Debian on the old A6 version with 2gb eMMC?

The latest images site has a small console image:

AM3358 Debian 10.3 1GB SD console

That's where we'll start. It's meant to run off the SD card but in the end I want that slot freed up so I'm going to go over how to flash to the eMMC. You can use this method to convert those stock images between "SD" type and "flasher" type: whether the flasher script line is commented in uEnv.txt or not.

Basically I'm going to work off the SD card for a bit and then my final step is going to be the eMMC flash. What this does is preserve a fully updated image on the SD card that you can quickly re-flash for a fresh starting point. Anything you want to change to get your system into a "clean base" condition, do that before editing uEnv.txt, this post has just what I consider the basics.

Let's go:

Write the image to SD card 

Insert SD card

Boot from card procedure - hold boot button and apply power, once the leds start flashing you can release

Connect to your network and SSH in. Look, it's Debian 10

Default user:password = [debian:temppwd]

Bringing this thing up to date:

sudo apt update
sudo apt upgrade

Maybe you noticed some perl locale warnings like I did. If not you can skip this next part. Your SSH client might be passing bad/incomplete/wrong locale data. This minimal image doesn't even come with locales so we'll do:

sudo apt install locales

view locale

locale

I've got some missing and even a en_CA thrown in there, the system I logged in from was set wrong.

sudo dpkg-reconfigure locales

Launches a little program to generate and set locales. Navigate with arrow, check/uncheck with space bar, enter to confirm. I'm looking for en_US.UTF-8, yours may be different. Check it, ok, select it on the next screen. Done

Now we have to do the usr merge or installations that are expecting it will fail

sudo apt install usrmerge 

That's it, that's my "clean base" install. Next step enables eMMC flashing. So no matter what happens, as long as I hold on to this SD card I will be able to pop it in and return to this starting point.

Steps for committing this image to eMMC:

open and edit /uEnv.txt

nano /boot/uEnv.txt

uncomment the line

cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

exit nano and save

Now we power cycle it

sudo shutdown -h now

SD card still in, do the boot from card procedure again - this time it will evoke the flasher script, the leds will sequence while it commits to eMMC. It should automatically shut down once it's done (I've found this to be true but I'm also told that it can just hang with all 4 leds lit), remove power, eject SD, power up. You should be right back where you were but with the card slot freed up.

Final tip: suppose you don't need to run commands on the BBB itself, your image is stock or already built or whatever. If you're on a system that mounts the ext4 filesystem you can just edit the BBB's system files directly on the SD card. Go find uEnv.txt, edit it, boot from SD, and you're good to go without ever touching an SSH shell.

Have fun messing with your BBB in 2023