I have been running a BBB as an aquarium controller for a really long time now, and until a lightning strike it was just fine. Now the ethernet jack is dead which is an issue (wifi dongle has always been iffy at best). I delayed dealing with it since it was still ‘working’ and the time was not drifting that fast for weeks, but then it lost power and time. Now i have to deal with it. Got a new board, serial cable and a micro hdmi since i wasn’t sure what would work or not.
Googlefu led me to a stack overflow question on how to clone the eMMC with some scripts. The onboard one doesn’t seem to work, i get this:
$ sudo ./beaglebone-black-make-microSD-flasher-from-eMMC.sh
Error: script halting, system unrecognized…
Another reply had a script that worked fine for saving the eMMC to the card, but uncommenting the script to run it back didn’t. The same reply also had a different script edit for the flashing which required the image be decompressed, but that also doesn’t go. Running this script:
#!/bin/sh
echo timer > /sys/class/leds/beaglebone:green:usr0/trigger
dd if=/mnt/.img of=/dev/mmcblk1 bs=10M
sync
echo default-on > /sys/class/leds/beaglebone:green:usr0/trigger
I get this:
Running /dev/mmcblk0p1/autorun.sh…
dd: writing ‘/dev/mmcblk1’: No space left on device
I assumed it was some size issue so i used wsl to shrink the image with a script called PiShrink from github. Seems to have done a good job going from under 4 to like 1.3 gig. But i get the same error.
I have also imaged the sd card with the img file from the first save from the original board and it boots fine on the new board. On the booted image i have tried the onboard scripts to flash the eMMC without success as well. Like so:
$ sudo ./init-eMMC-flasher-v2.sh
Valid EEPROM header found
debug copying: →
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
mmcblk0 179:0 0 3.7G 0 disk
├─mmcblk0p1 179:1 0 96M 0 part
└─mmcblk0p2 179:2 0 3.5G 0 part /
Error: does not exist
writing to failed…
Both manually running it and running it from uEnv on init.
Now i have pretty much run out of googlefu. I am practically thinking of just running it off the sd card and replacing it when it dies, but i also don’t know how reliably it would boot off the sd card instead of the eMMC.
Almost seems like i have to be doing something fundamentally wrong for these different methods to all not work.
I know the original image is old and eol, its ubuntu-14.04-console-armhf-2014-08-13, kernel(?) 3.8.13-bone63, but i actually seem to have a copy of it on a drive still. Not sure if that would help though. I don’t remember half the things i have done make the thing work so updating would end up half building a new one which seems counter productive.
Any ideas?