Sd card corrupted


#1

somehow, even thou i powered down the pi with sudo halt, the sd card got corrupted

if i can do an rescue of some sort are there a folder where i can see what plugins i had installed?

i'm not worried about lost data as the only really important was filament manager data and data takes 30 mins to put the spools on a scale and reenter


#2

I assume it's the sudo halt. Ongoing write procedures may be halted at once too. That can corrupt your SD card.
Better use is sudo shutdown -h that waits ongoing write jobs are finished.


#3

and what folder can give me a clue on what plugins i had installed?

of course that assumes i can get at least read access to the sd card


#4

anyway.... i have a rescue util trying to read the sd card

19% read after 1 hour and 42 mins so a long way to go :smiley:


#5

You may can find infos in the logs:

pi/.octoprint/logs


#6

Here you can find informations on the difference of halt, shuddown etc:
https://www.tecmint.com/shutdown-poweroff-halt-and-reboot-commands-in-linux/


#7
cat ~/.octoprint/logs/octoprint.log |grep "|" | grep "= /home/pi/" | grep -v bundled | sort | uniq | sed 's|\|||g'

Yields, for example:

  Bed Visualizer (0.1.2) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_bedlevelvisualizer
  EEPROM Marlin Editor Plugin (1.2.1) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_eeprom_marlin
  GCODE System Commands (0.1.1) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_gcodesystemcommands
  Navbar Temperature Plugin (0.9) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_navbartemp
  Themeify (1.2.0) = /home/pi/oprint/local/lib/python2.7/site-packages/octoprint_themeify

#8

@OutsourcedGuru

just what i needed, but i think it will take a day at least for the rescue software to get through the entire drive

its not even at 20% yet :frowning:


#9

It might be worth backing up your OctoPrint from time to time. I created a script for this.


#10

i think i will go with the script

i just tried to do: sudo find / -name octoprint.log and it did not find it

so either the card is 100% screwed or i did the search wrong

it is an octopi image and the octoprint dir is spelled OctoPrint

will try and look for the log but mjeeeh, i think its gone


#11

found the log.... there are 7 but the 6 of them are with a date appended to them


#12

As you noticed, there are two mount points boot and rootfs, the second would be the one with all the good stuff on it.

Under ~/.octoprint is the bulk of what you'd want to backup. Run my command from earlier that begins with cat (the conCATenate command is good for showing the contents of a text file). That command I gave you will simply report the plugins you added to the installation (from the octoprint.log file).