cjan
Posts: 750
Joined: Sun May 06, 2012 12:00 am

sdcard fail

Sun Sep 15, 2019 7:10 am

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 **********

User avatar
DougieLawson
Posts: 36578
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: sdcard fail

Sun Sep 15, 2019 9:30 am

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.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

cjan
Posts: 750
Joined: Sun May 06, 2012 12:00 am

Re: sdcard fail

Sun Sep 15, 2019 10:10 pm

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.

User avatar
DougieLawson
Posts: 36578
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: sdcard fail

Sun Sep 15, 2019 10:41 pm

5 & 6 work if your SDCard has NOOBS on it.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

cjan
Posts: 750
Joined: Sun May 06, 2012 12:00 am

Re: sdcard fail

Fri Sep 20, 2019 3:38 am

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.

User avatar
davidcoton
Posts: 4265
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: sdcard fail

Fri Sep 20, 2019 3:42 pm

Sounds dead. Try formatting the card in a camera, that sometimes revives them from some forms of lockup. YMMV.
Signature retired

Return to “Troubleshooting”