I was flashing osmc (Linux OS for KODI, Rasberri Pi3 version) on SD card and noticed a problem. EVERY SD CARD WHICH I FLASHED OSMC becomes locked and writable only. So when I want to flash another OS or do anything with that card, I can’t.
The physical Lock switcher on SD card is off (set to unlock) if case you wonder.
Here is some info I got from the SD (lossly translated into English)"
sudo e2fsck -b 8193 /dev/mmcblk0
e2fsck 1.46.5 (30-Dec-2021)
e2fsck: File system read only during read attempt on /dev/mmcblk0
Disc is save protected. You use option -n to check.
Device in read-only mode.
So I used this -n option and it gave me:
sudo fsck -n /dev/mmcblk0
fsck from package util-linux 2.38
e2fsck 1.46.5 (30-Dec-2021)
ext2fs_open2: Incorrect magical count in superblock
fsck.ext2: Incorrect superblock, attmept to use reserve blocks...
fsck.ext2: Incorrect magical count in superblock during oopening attemt of /dev/mmcblk0
superblok can't be read or doesn't describe the correct file system ext2/ext3/ext4. If the device is real and really contain file system ext2/ext3/ext4 (it's not a swap, ufs or anything else),
tthen superblok is corrupt - you can try to open e2fsck with other superblock
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
/dev/mmcblk0 zawiera dane `DOS/MBR boot sector; partition 1 : ID=0xc, start-CHS (0x40,0,1), end-CHS (0x3ff,3,32), startsector 8192, 647168 sectors; partition 2 : ID=0x83, start-CHS
(0x140,0,1), end-CHS (0x3ff,63,32), startsector 655360, 61194240 sectors'
When I tried opening with other superblock, it gave me the same message as the first one above.
I remeber having the same issue in the past and I found some solution back then, but I don’t remeber it and can’t find it in my notices. All I can rember is that the solution needed more steps and didn’t cleary explain what was wrong.
I can’t use dd, because it always complain about the device being read-only. Again, in the past I specially bought a new SD card to bypass the problem and after flashing it with the OSMC system, it also became read-only… Of course OSMC folks have no idea what is causing it.