I’ve been using my Reform for several months, but all of a sudden it stopped booting up. After some troubleshooting I discovered that there was something wrong with the SD card it was booting from. The device itself seems to be set to Read Only. Not the partitions on the card, the actual drive itself. I can’t even dd to it.
sudo dd if=/dev/zero of=/dev/sdb
dd: failed to open '/dev/sdb': Read-only file system
I did some troubleshooting and attempted to set the drive back to read/write using both hdparm and blockdev.
Neither worked. After replugging and remounting, the drive failed to become readable again. I also checked the physical read/write switch on the card, and I’ve tried two different SD card readers. The drive stayed read only.
Eventually I gave up and figured this was a hardware failure. I have had SD cards fail on me like this before. I backed up the contents of the card, bought a brand new one, and dd’d everything over to the new card. After transferring, the new drive was suddenly exhibiting the exact same behavior. Locked down to read only, unable to be unlocked. My MNT system image is apparently capable of bricking SD cards.
What the hell is going on here? Is there any way for me to restore my cursed image and/or SD cards? The laptop still boots with (a third) SD card that is just using a stock system image. I really just don’t want to go through the hassle of migrating everything, and I want to make sure that this doesn’t happen to me randomly in the future (or at least I can fix it without a complete system reset).
There is a sysfs switch that can disable write access to SD cards. I wouldn’t know how dd-ing an image could affect it, but that would be the first thing I would check.
I don’t remember the exact path, but it’s somewhere in /sys/block.