dimag0g
Very Active Member
While looking for low-level SD software, I have found this program called sdtool, I want to share. The binary version for R-Pi works on the Pandora as well. You can use it to enable temporary write protection on your card:
sudo umount /dev/mmcblk0p*
sudo sdtool /dev/mmcblk0 lock
sudo sdtool /dev/mmcblk0 reset
Similarly, unlock will remove the write protection.
A word of warning: pandoras seem not to be able to recognize that the flag is set, so you'll have to manually remount the filesystem as read-only. Mounting write-protected card as rw will silently allow writes which in reality won't take place, resulting in weird filesystem errors (which fortunately won't affect the SD card but still can hand up programs accessing the SD card).
sudo umount /dev/mmcblk0p*
sudo sdtool /dev/mmcblk0 lock
sudo sdtool /dev/mmcblk0 reset
Similarly, unlock will remove the write protection.
A word of warning: pandoras seem not to be able to recognize that the flag is set, so you'll have to manually remount the filesystem as read-only. Mounting write-protected card as rw will silently allow writes which in reality won't take place, resulting in weird filesystem errors (which fortunately won't affect the SD card but still can hand up programs accessing the SD card).