Page 1 of 1

sdcard fail

Posted: Sun Sep 15, 2019 7:10 am
by cjan
power fail shutdown, what can i do, next?

Code: Select all

$ sudo e2fsck -yv /dev/sda2
e2fsck 1.44.5 (15-Dec-2018)
/dev/sda2: recovering journal
Superblock needs_recovery flag is clear, but journal has data.
Run journal anyway? yes

e2fsck: unable to set superblock flags on /dev/sda2

/dev/sda2: ********** WARNING: Filesystem still has errors **********

Re: sdcard fail

Posted: Sun Sep 15, 2019 9:30 am
by DougieLawson
Get a second SDCard and a USB reader.

Build Raspbian Lite on the second card, boot that.
Mount the broken card in the USB reader, mount the USB reader in your RPi

Login, use sudo -s to get a root shell (saves prefixing every command with sudo).

Run
for i in 1,2,5,6
do
umount /dev/sda$i
fsck -f -y /dev/sda$i
done
poweroff


Ignoring any errors. Swap the cards back, boot up normally and keep calm and carry on.

Re: sdcard fail

Posted: Sun Sep 15, 2019 10:10 pm
by cjan
DougieLawson wrote:
Sun Sep 15, 2019 9:30 am
for i in 1,2,5,6
do
umount /dev/sda$i
fsck -f -y /dev/sda$i
done
poweroff
for i in 1 2 5 6(1,2,5,6?) but why 5 6?
same error message shown.
now can boot, but can not write any data on it.

Re: sdcard fail

Posted: Sun Sep 15, 2019 10:41 pm
by DougieLawson
5 & 6 work if your SDCard has NOOBS on it.

Re: sdcard fail

Posted: Fri Sep 20, 2019 3:38 am
by cjan
ok, give up and try to rebuild OS.
but, can not del/add partitions with fdisk and gparted.
does it means that sdcard is dead?
ps. dd img can not change anything inside sdcard.

Re: sdcard fail

Posted: Fri Sep 20, 2019 3:42 pm
by davidcoton
Sounds dead. Try formatting the card in a camera, that sometimes revives them from some forms of lockup. YMMV.