Quite some time ago I had the bright idea to backup my system partition by doing a dd to another partition I wasn't using for anything else. I had several such partitions approximately the same size I had used to audition several different distros before chosing the one I eventually went with (Chakra).
I ran
Code:
sudo dd if=/dev/sda2 of=/dev/sda6 bs=4096 conv=notrunc,noerror
and wound up getting an error result of
Code:
dd: writing ‘/dev/sda6’: No space left on device
12544001+0 records in
12544000+0 records out
51380224000 bytes (51 GB) copied, 2426.37 s, 21.2 MB/s
I'd forgotten that "approximately" part or perhaps didn't realize that dd would do more than just copy the used portion of the disk. The problem was that the target partition was a tad smaller than the source.
While I knew it had failed, it didn't seem to harm anything and I wasn't sure what to do about it, so I proceeded to ignore it for many months. I at least had the wherewithall to record what I'd done. I did sometimes see an error about it during boot, and fsck reports
Code:
The filesystem size (according to the superblock) is 12800000 blocks
The physical size of the device is 12544000 blocks
Either the superblock or the partition table is likely to be corrupt!
More recently I had another bright idea to try to take a look at something on this old snapshot of my system partition, and went into KDE Partition Manager, and changed the mount point to try to mount it. In that tool the mount point showed as / same as my system partition. I changed it and next time I tried to boot, booting failed.
Luckily KDE Partition Manager had saved a backup of fstab before modifying it, and I was able to revert to that and boot again. Looking at the copy of fstab that wouldn't boot, the / partition is not in there at all, leading me to think that what confused something was both of these partitions having the same UUID.
In any case, I'd like to fix this before I get myself into more trouble. I've done a lot of web searching and reading (mke2fs -S sounds promising) but am not 100% confident of my grasp of what I've read, and would like some advice on the best / safest way to fix this. I don't care about the data on my /dev/sda6 partition, I would just be happy to have the superblock with the right data and not have conflicting UUIDs or mount points.
Hope this wasn't too long-winded, but maybe it serves as a cautionary tale...
Thanks,
Eric