If you are unable to re-image your BeagleBone Black using the regular method, try these steps.
You can quickly tell if a BeagleBone Black isn’t taking the image if the ‘crawl’ LED sequence is very short (~10 seconds).
Often times you will find corrupted data in the internal storage. This can appear as regular data, except there are an excessive number of files and they are all empty. It is not worth downloading these files – just delete the folder entirely.
The BeagleBone Black keeps its operating system in its internal storage which is more robust than an external SD card; however, sometimes it can get filled up with error logs and detection data if the SD card malfunctions. This causes critical processes to no longer function, resulting in no data collection. In this state, the BeagleBone cannot be fixed by re-imaging it. Instead, files must first be deleted off its internal storage.
If you are able to connect via FileZilla
If you can't connect via FileZilla
If all else fails
In FileZilla, navigate to the folder: ./var/log
In this folder, look for very large files (>100 MB) and delete them.
Navigate to the folder: ./media/system_internal_memory/SGdata
This folder may contain VALID data that hasn’t previously been downloaded – if the files appear normal (and are not empty), download them to your laptop and upload them to Motus as you normally would. Once data has been downloaded, delete the contents of this folder.
In FileZilla, navigate to the folder (if it exists): ./boot/uboot/SGdata
Again, this folder may contain VALID data that hasn’t previously been downloaded – if the files appear normal (and are not empty), download them to your laptop and upload them to Motus as you normally would. Once data has been downloaded, delete the contents of this folder.
Disconnect from the FTP server, unplug the SensorGnome, and power it off.
Insert a regular BeagleBone imaging card and power on the SensorGnome.
You should now see the regular pattern of LEDs, with the heartbeat lasting several minutes as the software is installed.
Once the heartbeat stops and all LEDs are solid, power off the SensorGnome and remove the SD card.
Power on the SensorGnome and plug it into a computer once it boots up.
You should now be able to connect to the SensorGnome via FileZilla and view its web interface.
In FileZilla, navigate to the folder (if it exists): ./boot/uboot/SGdata
Again, this folder may contain VALID data that hasn’t previously been downloaded – if the files appear normal (and are not empty), download them to your laptop and upload them to Motus as you normally would.
Once data has been downloaded, delete the contents of this folder.
Download the BBBK rescue image from here: https://public.sensorgnome.org/Beaglebone_Sensorgnome_Images/sensorgnome_rescue_image_2017-03-06_15-33-00.img.7z
Image a microSD card with this image (must be at least 4 GB)
With the BBBK powered off, insert the microSD card and then power it on.
After booting, connect the BBBK using FileZilla.
Navigate to the folder: ./tmp/introot/var/log
In this folder, look for very large files (>100 MB) and delete them.
Navigate to the folder: ./tmp/introot/media/system_internal_memory/SGdata
This folder may contain VALID data that hasn’t previously been downloaded – if the files appear normal (and are not empty), download them to your laptop and upload them to Motus as you normally would.
Once data has been downloaded, delete the contents of this folder.
Disconnect from the FTP server, unplug the SensorGnome, and power it off.
Remove the rescue image SD card and insert a regular BeagleBone imaging card.
Power on the SensorGnome. You should now see the regular pattern of LEDs, with the heartbeat lasting several minutes as the software is installed.
Once the heartbeat stops and all LEDs are solid, power off the SensorGnome and remove the SD card.
Power on the SensorGnome and plug it into a computer once it boots up.
You should now be able to connect to the SensorGnome via FileZilla and view its web interface.
In FileZilla, navigate to the folder (if it exists): ./boot/uboot/SGdata
Again, this folder may contain VALID data that hasn’t previously been downloaded – if the files appear normal (and are not empty), download them to your laptop and upload them to Motus as you normally would.
Once data has been downloaded, delete the contents of this folder.
Sometimes none of the above steps will work in which case you will have to resort to using the rescue image long term. This is undesirable because storing the operating system on the SD card makes the system more vulnerable to permanent crashes. Nonetheless, it does work for an indeterminate amount of time (days, weeks, maybe months) and works well if you're in a pinch.
This is done in much the same way as a regular software image for the BeagleBone, it's just a different file.
Download and unzip the rescue image here: sensorgnome_rescue_image_2017-03-06_15-33-00.img.7z
If you don't have 7Zip, you can download it here: https://www.7-zip.org/
Download balenaEtcher, a free and open-sourced program for creating disk images, and click “Select Image,” where you can select the the .img file
Select the MicroSD card in the next step, and then click “Flash!”.
Once flashing has completed, safely remove the card from your computer.
Make sure the BeagleBone is powered off and then insert the SD card.
Power on the BeagleBone and give it a minute or two to boot.
After a minute or two, connect to the BB SG and check the Web Interface
A BB SG with a rescue image will record data to same path on the MicroSD card as a normal BB will. But if the card fails or can no longer be read, there is no backup internal memory to use and the BB will simply stop recording.