I’m using osmc on raspberry pi3. I just came back from holiday and surprisingly I find out that my raspberry pi3 does not boot up anymore. No one used it in this period so I really don’t know what could have happened (clearly before leaving it was working perfectly fine). I tried to plug off and on the power cable and I noticed inside the raspberry two different lights. The first one red keeps staying solid while the second green light blinks 2 times and after that it turns off.
I also tried to insert the sdcard inside the pc and it is correctly readable.
I really hope I won’t have to format the sdcard losing all my data.
Thanks in advance
Is this in windows? if so it will on being seeing the boot partition. If this case trying booting your PC with a linux live iso and check both partitions.
Have you tried a different PSU?
Yes I tried with window and this is what I see (second partition not readable):
I tried with a linux virtual machine that I have but the sdcard is not readable. I get this error message:
Yeah I also tried a different PSU but I get the same problem.
If the 2nd partition is not readable on linux then you will need to reinstall, if you continue to have issues; you will need to replace the sd card.
with the virtual machine of linux it cannot read both the first and 2nd partition
That is not what that picture you posted shows. It says the reader is still in use in Windows so the VM is being blocked from accessing it. SD cards, particularly in Raspberry Pi’s wear out and/or become corrupted. Even if you could read the 2nd partition that does not mean that it isn’t damaged or corrupted.
Try this software,https://www.paragon-software.com/home/linuxfs-windows/ , it’s a trial with full speed for like 10 hours, then it’s limites to 5mb/s. It will read a linux if the filesystem isn’t to damaged.
Ok thanks to joakim_s mentioned app I’m able to read the full sdcard. This is the full partition I see:
What should I check now inside the card?
I would copy the /home/osmc/.kodi folder to your pc(you may have to “show hidden files” on your pc to see it), then reimage/“install osmc image” the card and then copy the .kodi folder back onto the card after the installation completes.
Green LED blinks in a specific pattern
2 flashes: The SD Card cannot be read.
I also had set up years ago a mysql database inside the sdcard (with all the datas of the movies). Is there a way to backup that too?
Answer. MySQL stores DB files in /var/lib/ mysql by default, but you can override this in the configuration file.
Debian calls it /etc/ mysql /my.cnf
This information is just ripped from the interwebs, since i have no mysql installed on my pi i cant guarantee the accuracy of this information.
I’m not certian how to import that db into a new installation though since it was over 10 years ago since i did it regulary. Here is a link how to do it in ubuntu (close to debian, which osmc is based upon):
but when you got it up and running exporting the db to a file can be a “semi backup” of it and you can do it on regular intervals,
@joakim_s is correct, /var/lib/mysql is where the database files are on OSMC. The 2 links are good starting points to recover your database (especially the 1st link). But be warned that if the SD card is failing that the database files may be corrupt. Another way you could try to recover the database would be to use a live linux CD. I’m fairly certain that the Linux Mint CD will allow you to ‘install’ software, so try running LM, install Maria DB and follow the instructions in the first link to see if you can get a good mysqldump of the database.