Recently, my Raspbian OS froze on my Raspberry Pi 4, and when I restarted the machine, it immediately produced a solid green screen. Research suggests that it is most likely due to a corrupted OS, and the most popular solution is just to reinstall a fresh copy. However, I don't want to have to set up the software on my Pi all over again. Is there a way to repair a Raspbian installation without wiping the SD card?
I should add that the green screen comes up almost immediately on boot, so there's no opportunity for me to jump into a command line interface first.
Thanks in advance to the community for their help!
fsck
on it. WRT "green screen", you might want to describe this in better detail, because it is not at all normal or commonplace: After more than a decade and 36K+ questions there are only two here that mention a green screen at boot, and one of them is in reference to something attached via a USB-to-VGA adapter... – goldilocks Mar 03 '23 at 15:12fdisk -l /dev/whatever
. – goldilocks Mar 05 '23 at 14:17fdisk -l /dev/mmcblk0
, ie, the partition table for the card -- but anyway, partitions are numbered from 1, so there are, ostensibly at least seven partitions on the card. This could be due to a corrupted partition table (good idea to keep a copy of the first 512 byte block on the card as a backup for this, see MBR). If you honestly can't find a way to mount it read-write and try fsck on it, you're in a small minority; you might want to give up on the card at this point and just consider it defunct (which it could be). – goldilocks Mar 07 '23 at 15:38/dev/mmcblk0
is not filesystem, it's a block device with 5 partitions on it some or all of which contain filesystems. That might be why it considers it "read only", in any case you should be tryingfsck /dev/mmcblkp1
etc (don't bother with p2, the extended container). Have you tried to mount any of these outside the pi? If so, what is the content ofcmdline.txt
in p1? – goldilocks Mar 08 '23 at 12:37fsck
p1: https://i.imgur.com/Ln9KKW2.png. Same issue. I also don't see acmdline.txt
file in p1 (and I can't find it with afind
command, either). Here's p1 when I mount it: https://i.imgur.com/6JtwkbR.png – 123MilitaryNerd Mar 09 '23 at 00:39recovery.cmdline
, which is there. – goldilocks Mar 09 '23 at 13:31