I tried creating an Ubuntu Mate installation on a new SD card today. The Raspberry Pi would not boot (only Red LED lights up) so and I checked the SD card with:
ole:$ sudo fsck -y -b 163840 -B 4096 /dev/mmcblk0p1
fsck from util-linux 2.29
e2fsck 1.43.4 (21-Nov-2017)
fsck.ext2: Bad magic number in super-block while trying to open
/dev/mmcblk0p1
The superblock could not be read or does not describe a valid
ext2/ext3/ext4
filesystem. If the device is valid and it really contains an
ext2/ext3/ext4
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>
I also tried running e2fsck with alternate superblocks, but it seems they are all bad. However running badblocks
did not report any errors.
ole@mki:~/Downloads$ sudo badblocks -o ./badblocks.list -w -s -v -b 4096 -c 16 /dev/mmcblk0p1
Checking for bad blocks in read-write mode
From block 0 to 7817983
Testing with pattern 0xaa: done
Reading and comparing: done
Testing with pattern 0x55: done
Reading and comparing: done
Testing with pattern 0xff: done
Reading and comparing: done
Testing with pattern 0x00: done
Reading and comparing: done
Pass completed, 0 bad blocks found. (0/0/0 errors)
Can reformatting the card fix the errors? I tried reinstalling the image onto the card 3 times, but that did not help, so just curious whether it's possible that it's simply a formatting issue?
Update
I reformatted the whole thing using the ubuntu disk utilities, and now it appears to be ok:
ole:$ sudo fsck /dev/mmcblk0p1
fsck from util-linux 2.29
fsck.fat 4.0 (2016-05-06)
/dev/mmcblk0p1: 1 files, 1/1953541 clusters
I'm going to try writing the Ubuntu Mate image again and see if the Raspberry Pi will boot it.
Another Update
Tried burning Ubuntu Mate onto it and after I'm done it the card will not mount in Nautilus and it still will not boot the Raspberry Pi:
ole@$ sudo ddrescue -D --force ubuntu-mate-16.04.2-desktop-armhf-raspberry-pi.img /dev/mmcblk0p1
GNU ddrescue 1.21
Press Ctrl-C to interrupt
ipos: 4999 MB, non-trimmed: 0 B, current rate: 6550 kB/s
opos: 4999 MB, non-scraped: 0 B, average rate: 13192 kB/s
non-tried: 0 B, errsize: 0 B, run time: 6m 19s rescued: 5000 MB, errors: 0, remaining time: n/a percent rescued: 100.00% time since last successful read: 0s Finished
Short answer is yes. Reformatting the disk worked in this case. To officially test it out I installed Raspbian instead of Ubuntu Mate and now it works fine.
Here's a follow up question regarding the corruption that happens when I install Ubuntu Mate.