so, I have a 8GB SDHC from CnMemory. I used it for my Raspberry Pi. It worked so far. But then my raspberry froze (can't connect via ssh, apache didnt respond either). So I pulled the power out. I rebootet the raspberry. This time with my monitor. FS seemed corrupt. I did fsck and resolved the issues. Reboot with shutdown -r. Now it wouldn't start at all. Ok, so i thought I need to put up a blank new image to it.

I can't. GParted tells me that the card only has 1GB instead of 8GB.

# fsck /dev/mmcblk0 
fsck from util-linux 2.20.1
e2fsck 1.42.8 (20-Jun-2013)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/mmcblk0

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>

fdisk and fdisk /dev/mmcblk0 result in the following

# fdisk
Disk /dev/mmcblk0: 1073 MB, 1073741824 bytes
4 heads, 16 sectors/track, 32768 cylinders, total 2097152 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mmcblk0 doesn't contain a valid partition table

# fdisk /dev/mmcblk0 
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xccf88a5e.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): w
The partition table has been altered!

And there it freezes. It says it has been altered but it doesn't it's stuck right there.

A Windowssystem can't format the SDCard either getting a I/O-Error.

It is the second SD Card with this problem!

I hope you have any idea how to solve this. Thanks!


dd freezes as well when I try to wipe the partitiontable.

# dd if=/dev/zero of=/dev/mmcblk0 bs=512 count=1


dmesg shows invalid allocation unit size

If I try to write with mkfs there are some errors.

# mkfs /dev/mmcblk0 --type=ext4
mke2fs 1.42.8 (20-Jun-2013)
Warning: could not erase sector 2: Attempt to write block to filesystem resulted in short write
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
65536 inodes, 262144 blocks
13107 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=268435456
8 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
    32768, 98304, 163840, 229376

Allocating group tables: done                            
Warning: could not read block 0: Attempt to read block from filesystem resulted in  short read
Warning: could not erase sector 0: Attempt to write block to filesystem resulted in short write
Writing inode tables: done                            
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: 0/8
Warning, had trouble writing out superblocks.

# dmesg
mmc0: SD Status: Invalid Allocation Unit Size

Did I completely break it after just a few hours?

  • Maybe you should try to format your SDCard with a dedicated tool named SDFormatter and burn a new ISO on the card. sdcard.org/downloads/formatter_4/eula_windows Dec 28, 2013 at 13:11
  • SDFormatter says it is write protected. But it isn't.
    – Sbls
    Dec 28, 2013 at 13:21
  • hmmm...can you try to burn a new iso using this tool sourceforge.net/projects/win32diskimager ? Dec 28, 2013 at 13:33
  • Not enough space on disk. It is a 8GB card and there is definitly enough space. But it only shows 1GB... \e: Reading works though.
    – Sbls
    Dec 28, 2013 at 13:37
  • Do you have a digital camera near you ? Seems that some people were able to solve this problem by using the format function of their camera... Dec 28, 2013 at 13:48

2 Answers 2


Are both your sd cards CnMemory ones?

It looks like the card has broken itself, there seems to be quite a bit of noise about these failing after a few months in cameras...

Also the following command

sudo fsck /dev/mmcblk0

Is wrong, it's not a surprise there is no superblock because you've pointed it at the wrong thing... mmcblk0 is the disk, mmcblk0p2 is the ext4 partition (if you're using an image) or mmcblk0p6 if using NOOBS with a single installed OS

  • Yep, both CnMemory. I gave up by now, replacing it with a Transcend one. This one isn't broken yet.
    – Sbls
    May 30, 2014 at 20:56

I have had this happen to me before. I just reformatted but I had deleted all of the files off of the card previous to reformatting which may be causing the files to be protected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.