I had a power failure a few days ago, which kinda broke both my pi2 and pi3 (both running osmc).
I can read and write on both partitions on both SD cards (via windows) and i was able to backup all of the files, but unfortunately not some custom stuff from my pi2 (like cronjobs, history, ufw rules etc because i got no idea how to get those besides via console).
Is there a way i can restore the boot partitions ? The pi2 kinda works…i get this error:
The pi3 is not booting up at all…I just get a constant red led and a 4 times green flashing led on the board and black screen.
Basically i got the same problem as this guy here: Filesystem corruption
The only difference is that i can read/write on all partitions.
Pi2: Transcend 8GB class10
Pi3: AData 16GB class10
In the partition that is readable in Windows do you see a config.txt file? If not then you may be able to give it a new one without starting over from scratch on that SD.
Thanks for answering,
Yeah i have a config.txt, which is totally empty on the Pi3
But on the pi2 it has :
I’ve said this a few times on the forum, there are two softwares I suggest when reading extfs…
Linux File Systems for Windows by Paragon Software Free to use, read and write. for 14 days, then there is a speed limit of 5mb/s forever(or until you register/buy the software)
DiskInternals Linux Reader . free ware reader, no writeing. There is a pro version but I never looked into what that means.
Hope those helps, I use Paragons software, it can mess with “disk imaging software” for sd-cards, when there is a extfs on the SD card. But I’ve learned to work around it.
You are a life saver . The pi3 was saved. It was able to fix the filesystem and booted up into kodi.
The pi2 unfortunately isnt fixing itself. I got a Suse linux (i know i know…it’s old) in a vmware would that do ? Can i repair the filesystem with it ?
@joakim_s i used Ext2Fsd, seems to do the job well
If you are all ready running 1Linux VM, why not spin up a more modern one that has ext4 rescue utilities in it?
This one i haven’t tested myself but I’ve heard great things about this:
You could try, what have you got to loose. Personally I think I would be more apt to pick up a larger SD and clone the RPi 3 card. If the card got corrupted who knows the extent, especially with it having been overclocked previous.
Cool, thanks man, i’ll give it a try now.
The pi3 wasnt OCed oO. That config file you saw was from my pi2…that one yeah…probably
I’ve tried so many SD cards…I had 3 Evo’s, 1 Sandisk, and now i got this Transcend and Adata only because i read they run perfectly fine on the pi. All my previous SD cards got corrupted…I had the last 2 for about 2 years.
So I’ll just try with fsck and hope for the best? Anything else i should know/try ?
The config.txt going MIA is a thing that can happen and I didn’t think that was related to what was going on with the RPi 2, other than they both experienced a sudden power loss. I think the SD for the RPi 3 is back fully now minus any tweak you may have made to the config.txt on that system.
As for the RPi 2 SD I am personally leery of trying to salvage a corrupted install. You just never know what all got broken and if it will cause ongoing issues. The overclocking I could see from the config.txt on that machine is also something that can corrupt, as can a unscheduled power loss. That SD stands a good chance of being just fine, and could be wiped and a fresh install. The reasons why if it was me I would replace it is because it is only 8Gb which means that is slower than a new larger card, and also so it could just be easily cloned from the 16Gb card from the RPi 3, because I’m lazy and that is what I’ve done with the multitude of Pi’s I have in my house. This of course is me assuming you have shared storage that a cloned install would work with.
The pi2 was frozen to an older osmc version because the updates were breaking stuff with my apache/mysql/maria-db/python setup…so it is a bit ‘too much to redo from scratch’ and figure things out again.
I understand what you mean about the size and all. Don’t get me wrong i’d love to clone the pi3 card and use it there, but it would be the same thing as starting fresh. I mostly use the pi for cronjobs and a bunch of scripts with python/php and occasionally when i run on the treadmill in order to watch something.
system-rescue.org, @joakim_s is pissing me off…it wont even mount the SD…
I’am too tired to work on it now…i’ll continue tomorrow morning thanks guys
The image shows, that it’s failing to mount on the Pi2, so System Rescue will have the same problem, which is a corrupted superblock.
To see if you can repair the superblock, take a look at this article: https://www.cyberciti.biz/faq/recover-bad-superblock-from-corrupted-partition/ (You don’t mount the partition to fix the superblock.)
I used a similar guide last night to the one you posted, and was able to repair the filesystem using previous records, and while i was able to mount the partition after that and read/write on it, when i booted the SD on the pi, i still got the same error and the pi wont boot.
I dont get it…
I tried with every other block it has…same thing. It wont fix it…I guess i cant avoid the reformat
If your screen images are anything to go by, you don’t seem to have read the article I linked to.
I did, i had already used this post by then : Broken Corrupted Raspberry Pi SD Card - Raymii.org
which does the same thing. The last SS that i shared was to show what the normal fsck was showing after the said repair.
If you are referring to the ‘fsck -b 32768 /dev/sdb2’ solution, in your guide…yes…this is how i did it, and although it did repair stuff…it failed to boot up after as if nothing was repaired.
Yes, of course. Your screenshot shows a different command, and you made no mention of running
fsck -b 32768 /dev/sdb2.
If, as you say, you can mount the partition after that command, then I would suggest that you take the opportunity to copy off all the important configuration data and then do a fresh reinstall of OSMC.
Yeah, i ordered a new 16gb sd to reinstall osmc. I’ll keep this sd as a backup in case i need some files.
Can someone (who has a pi3 modelB) please copy/paste their config.txt.
I just noticed that using the lines that @darwindesign posted i get the following screen when i try to access the config from kodi:
not to mention that i think the pi doesnt get into kodi that fast anymore.
I currently have:
Those are the stock settings for OSMC. If you were not overclocking your RPi 3 before then there is nothing there to have impacted boot speed. If you have a reduction then something else is going on. As for the broken RPi config screen I can only assume that either something on your SD card got corrupted after all or your running, or at least were running at some point a test build where you got a broken My OSMC add-on. The config.txt I posted would not produce that behavior and I copied it right from one of my own RPi 3’s.
hmm, ok thanks man. I thought there might have been some more settings that i was missing, for it to show this crap. I remember i had this problem again in the past…on my pi2 but i dont remember how i fixed it. Probably i’ll just re-installed everything though