Powershell
Posts: 44
Joined: Fri Apr 08, 2016 10:24 am

[SOLVED] Raspbian SD Card root partition becomes locked

Sun Jul 09, 2017 7:46 pm

Hi everybody!

This is not a question, but an answer.

Recently I've bumped into a problem when my microSD suddenly turned up write-protected.
Raspbian was unable to boot.

First thing I've done is googling
"raspberry sdcard becomes read-only", "raspbian root partition is locked / write-protected" etc.

9/10 of all answers suggest a hardware problem or moving the physical slider. Not in my case, the card was ok.
I also ran fsck, dosfsck, e2fsck several times - no effect.
So I couldnt easily find any relevant answer.....

If you happen to be in the same situation, try dropping to the Raspbian emergency shell and simply do:

cat /etc/fstab

In my case, the boot and root entries were commented out (by some kernel watchdog, NOT me):

proc /proc proc defaults 0 0
#/dev/mmcblk0p1 /boot vfat defaults 0 2
#/dev/mmcblk0p2 / ext4 defaults,noatime 0 1

Stick your card into another Linux machine, mount the root, uncomment them and save.
Did it work? :) Hope this will help!

Return to “Troubleshooting”