You are not logged in.

#1 2010-11-23 18:03:25

Nareto
Member
From: Pisa,Italy
Registered: 2009-07-18
Posts: 148

[SOLVED] Bad superblock after reformatting

EDIT: sorry, it was me stupid. When i ran the fsarchiver command I forgot to declare the new filesystem type (ext4) and so it got written as my old fs -which was jfs BTW and not ext3 as stated below. So now I'm redoing everything and it should work


Hello,
I have three partitions for /boot, /home and /. They were all ext3. I wanted to upgrade to ext4 and also give more space to / and less to /home, so I booted in a livecd (partedmagic), used fsarchiver to copy / to an external hard disk (I allready had a backup of /home), cancelled and resized partitions (leaving /boot untouched) reformatting them to ext4 and copied back the data (using fsarchiver for / and simple cp for /home).

I reboot but the process stops on "Checking Filesystems", where it fails and I'm asked to login as root to solve the problem. I realize I had to change filesystems type in /etc/fstab, so did that (not uuids - they are restored by fsarchiver)

But now the boot process still stops there... The problem seems to be with "Bad magic number in super-block".... I re-ran the commands from the partedmagic livecd and got this:

# fsck.ext4 /dev/sda3
e2fsck 1.41.9 (22-Aug-2009)
/sbin/e2fsck: Superblock invalid, trying backup blocks...
/sbin/e2fsck: Bad magic number in super-block while trying to open /dev/sda3

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>

reading the man page from e2fsck, I ran the mke2fs -n command to determine the number of the superblock backup, but then when I ran e2fsck -b <number> I was asked if I wanted to repair a bad block, I said yes and then I got a message something like "the filesystem now is no more ext3, it is totally ext2" (sorry, can't remember correctly and not willing to try again the command) at which I got scared and did Control-C


what should I do to get my root partition (/dev/sda3) back again?

BTW fsck.ext4 /dev/sda4 (my /home partition) runs smoothly

renato

Last edited by Nareto (2010-11-23 18:08:36)

Offline

Board footer

Powered by FluxBB