Find the answer to your Linux question:
Results 1 to 2 of 2
After some other trouble (see my thread "Restore Debian Lenny after failed partion resize?"), file system checks on the Debian root partition during boot fail. I tried from a live ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User Daan's Avatar
    Join Date
    Aug 2005
    Location
    The Netherlands
    Posts
    323

    Unhappy Invalid superblock and bad magic number prevent file system repair


    After some other trouble (see my thread "Restore Debian Lenny after failed partion resize?"), file system checks on the Debian root partition during boot fail. I tried from a live CD too, but no avail. e2fsck says the superblock is invalid, and trying the superblock backups also seems to fail. It suggests using alternative superblocks. I've tried several locations but all failed. I'm not sure I got the locations right, because the method for determining where they are which I found on the web uses dumpe2fs which fails because of the bad superblock. The partition is ext3 and was created by the Debian Lenny installer.
    Code:
    root@PartedMagic:~# e2fsck /dev/sda5
    e2fsck 1.41.3 (12-Oct-2008)
    e2fsck: Superblock invalid, trying backup blocks...
    e2fsck: Bad magic number in super-block while trying to open /dev/sda5
    
    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>
    
    root@PartedMagic:~# e2fsck -b 8193 /dev/sda5
    e2fsck 1.41.3 (12-Oct-2008)
    e2fsck: Bad magic number in super-block while trying to open /dev/sda5
    
    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>
    
    root@PartedMagic:~# dumpe2fs /dev/sda5
    dumpe2fs 1.41.3 (12-Oct-2008)
    dumpe2fs: Bad magic number in super-block while trying to open /dev/sda5
    Couldn't find valid filesystem superblock.
    root@PartedMagic:~# e2fsck -b 32768 /dev/sda5
    e2fsck 1.41.3 (12-Oct-2008)
    e2fsck: Bad magic number in super-block while trying to open /dev/sda5
    
    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>
    
    root@PartedMagic:~# e2fsck -b 98304 /dev/sda5
    e2fsck 1.41.3 (12-Oct-2008)
    e2fsck: Invalid argument while trying to open /dev/sda5
    
    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>
    
    root@PartedMagic:~# dmesg | tail
    usb 4-1: Manufacturer: Logitech
    hub 4-0:1.0: state 7 ports 2 chg 0000 evt 0002
    hub 7-0:1.0: hub_suspend
    usb usb7: bus auto-suspend
    ehci_hcd 0000:00:1d.7: suspend root hub
    ADDRCONF(NETDEV_UP): eth0: link is not ready
    0000:00:19.0: eth0: Link is Up 100 Mbps Full Duplex, Flow Control: RX/TX
    0000:00:19.0: eth0: 10/100 speed: disabling TSO
    ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    eth0: no IPv6 routers present
    root@PartedMagic:~# tune2fs -l /dev/sda5
    tune2fs 1.41.3 (12-Oct-2008)
    tune2fs: Bad magic number in super-block while trying to open /dev/sda5
    Couldn't find valid filesystem superblock.
    So, I have an invalid superblock and a bad magic number. I don't know what those are, but I want them fixed.

    Any suggestions?

    Thanks.
    OS's I use: Debian testing, Debian stable, Ubuntu, OpenSuse 12.1, Windows 7, Windows Vista, Windows XP

  2. #2
    Linux User Daan's Avatar
    Join Date
    Aug 2005
    Location
    The Netherlands
    Posts
    323

    Talking Oops...

    No errors during boot after I've updated my fstab. efsck thought my swap was my root partition...
    OS's I use: Debian testing, Debian stable, Ubuntu, OpenSuse 12.1, Windows 7, Windows Vista, Windows XP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •