sarntam
Posts: 2
Joined: Mon Jul 02, 2012 1:42 pm

Cannot dump Debian image to SD card: device needs recovery

Mon Jul 02, 2012 1:54 pm

I previously used my 8GB SD card with a Debian installation, but in the end managed to install too many packages so that the entire system was filled up. I now want to simply format my entire SD card and dump the Debian image to the SD card once more, yet I cannot seem to do it. When I insert the SD card into my SD card reader, it gets mounted in read-only mode and I will not be able to use dd. What can I do to fix this?

dd output:

Code: Select all

dd: opening „/dev/sdd“: Read-only file system
dmesg output:

Code: Select all

[12358.899395] scsi8 : usb-storage 1-4:1.0
[12359.899881] scsi 8:0:0:0: Direct-Access     Generic  STORAGE DEVICE   0545 PQ: 0 ANSI: 0
[12359.900117] sd 8:0:0:0: Attached scsi generic sg4 type 0
[12360.145495] sd 8:0:0:0: [sdd] 15523840 512-byte logical blocks: (7.94 GB/7.40 GiB)
[12360.146490] sd 8:0:0:0: [sdd] Write Protect is on
[12360.146494] sd 8:0:0:0: [sdd] Mode Sense: 0b 00 80 08
[12360.147364] sd 8:0:0:0: [sdd] No Caching mode page present
[12360.147367] sd 8:0:0:0: [sdd] Assuming drive cache: write through
[12360.150488] sd 8:0:0:0: [sdd] No Caching mode page present
[12360.150491] sd 8:0:0:0: [sdd] Assuming drive cache: write through
[12360.186116]  sdd: sdd1 sdd2 sdd3 sdd4 < sdd5 >
[12360.189617] sd 8:0:0:0: [sdd] No Caching mode page present
[12360.189620] sd 8:0:0:0: [sdd] Assuming drive cache: write through
[12360.189623] sd 8:0:0:0: [sdd] Attached SCSI removable disk
[12360.710411] EXT4-fs (sdd5): INFO: recovery required on readonly filesystem
[12360.710414] EXT4-fs (sdd5): write access unavailable, cannot proceed
[12360.908491] EXT4-fs (sdd2): mounted filesystem with ordered data mode. Opts: (null)
fsck output:

Code: Select all

$ sudo /sbin/fsck -n /dev/sdd5
fsck from util-linux 2.20.1
e2fsck 1.41.14 (22-Dec-2010)
Warning: skipping journal recovery because doing a read-only filesystem check.
/dev/sdd5: clean, 5388/327680 files, 66819/1310720 blocks

User avatar
jojopi
Posts: 3274
Joined: Tue Oct 11, 2011 8:38 pm

Re: Cannot dump Debian image to SD card: device needs recove

Mon Jul 02, 2012 2:39 pm

sarntam wrote:[12360.146490] sd 8:0:0:0: [sdd] Write Protect is on
Have you checked the write-protect slider on the SD card?

sarntam
Posts: 2
Joined: Mon Jul 02, 2012 1:42 pm

Re: Cannot dump Debian image to SD card: device needs recove

Mon Jul 02, 2012 4:03 pm

The write-protection slider actually was in the correct position, but after fiddling around with it and trying again, it worked! Thank you very much.

Return to “Troubleshooting”