This can range from problems with rpi-update to changing the /boot/config.txt file to restoring the SD card superblocks from the superblock backup to Oh No my SD card is hosed and I need to recover files. Weve all been there so need to be embarrassed about messing something up. Things mess up a lot.
Boot Problems
First of all, this is a great reference that I use a lot.
Start by figuring out what changed.
- Did you just change your /boot/config.txt?
- Did you delete any important files?
- Did you run rpi-update?
- Did you add a new device?
- Did you overclock too much?
- Do you get a kbd prompt?
- Did it run some weird commands on the shutdown about "device still open for writing"?
If you just changed your config.txt, you should change it back and then change line by line while rebooting until you see what option is causing the error.
If you deleted any files, restore them.
If you ran rpi-update and it wont reboot, try making your /boot/config.txt the default one. The cma_lwm and cma_hwm options sometimes cause the new firmware to break.
If that doesnt work or you have flashing light errors, restore the old boot files by copying the /boot.bak/ files into /boot/
sudo cp -ap /boot.bak/* /boot/
If you recently overclocked, try reducing it back down. I run 1100 MHz easily but 1200 MHz tends to be unstable for me.
If you get a kbd prompt or error, check your power supply to make sure its supplying enough voltage, then reduce any overclocking or overvolting in your config.txt, then (if the first two dont solve it) replace the boot files like described above.
If you have a kbd prompt that you couldnt fix, you get read/write or I/O errors on shutdown or startup, or
If you deleted any files, restore them.
If you ran rpi-update and it wont reboot, try making your /boot/config.txt the default one. The cma_lwm and cma_hwm options sometimes cause the new firmware to break.
If that doesnt work or you have flashing light errors, restore the old boot files by copying the /boot.bak/ files into /boot/
sudo cp -ap /boot.bak/* /boot/
If you recently overclocked, try reducing it back down. I run 1100 MHz easily but 1200 MHz tends to be unstable for me.
If you get a kbd prompt or error, check your power supply to make sure its supplying enough voltage, then reduce any overclocking or overvolting in your config.txt, then (if the first two dont solve it) replace the boot files like described above.
If you have a kbd prompt that you couldnt fix, you get read/write or I/O errors on shutdown or startup, or
Dont worry though. There are still ways to recover your files.
The first thing you should do is make a copy of your SD card image.
Plug the card into another computer with linux and use dd to copy the image. Then you can try to fix the image file without further corrupting the data.
The first thing to try to do is replace your superblock with a backup. To do that click here.
If that doesnt work and all else fails, it is possible to use scalpel and custom recovery configuration to get your files. See here for how to do that.
Consider donating to further my tinkering