Find the answer to your Linux question:
Results 1 to 4 of 4
I can't seem to fix a partition on my HD. When I try to mount it I get this error Code: [root@server ~]# mount /home mount: wrong fs type, bad ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2006
    Posts
    5

    Bad magic number in super-block while trying to open /dev/hda6


    I can't seem to fix a partition on my HD.
    When I try to mount it I get this error

    Code:
    [root@server ~]# mount /home
    mount: wrong fs type, bad option, bad superblock on /dev/hda6,
           missing codepage or other error
           In some cases useful info is found in syslog - try
           dmesg | tail  or so
    
    [root@server ~]# dmesg | tail
     [<c04068bf>] do_IRQ+0x9e/0xbc
     =======================
    eth0: link down
    eth0: link up, 100Mbps, full-duplex, lpa 0x45E1
    VFS: Can't find ext3 filesystem on dev hda6.
    VFS: Can't find ext3 filesystem on dev hda6.
    VFS: Can't find an ext2 filesystem on dev hda6.
    VFS: Can't find an ext2 filesystem on dev hda6.
    VFS: Can't find ext3 filesystem on dev hda6.
    VFS: Can't find ext3 filesystem on dev hda6.
    I tried to fix it with

    Code:
    [root@server ~]# mke2fs -n /dev/hda6
    mke2fs 1.39 (29-May-2006)
    Filesystem label=
    OS type: Linux
    Block size=4096 (log=2)
    Fragment size=4096 (log=2)
    3312960 inodes, 6622788 blocks
    331139 blocks (5.00%) reserved for the super user
    First data block=0
    Maximum filesystem blocks=0
    203 block groups
    32768 blocks per group, 32768 fragments per group
    16320 inodes per group
    Superblock backups stored on blocks:
            32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
            4096000
    
    [root@server ~]# e2fsck -f -b 32768 /dev/hda6
    e2fsck 1.39 (29-May-2006)
    e2fsck: Bad magic number in super-block while trying to open /dev/hda6
    
    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>
    Anything else I can try? I accidentally changed the partition extent start point but everything was fine until I rebooted.

  2. #2
    Linux User
    Join Date
    Aug 2006
    Location
    Croydon, PA
    Posts
    392
    Not really sure what youare trying to do.
    Are you trying to make an filesystem for the directory "/home"?
    Also why are you trying to make it ext2 instaed of ext3?
    Also show the out put of fdisk -l and sfdisk -l and df -h
    Good Luck,
    Ski
    RHCT

  3. #3
    Just Joined!
    Join Date
    Oct 2006
    Posts
    5
    Quote Originally Posted by Skiboy
    Not really sure what youare trying to do.
    Are you trying to make an filesystem for the directory "/home"?
    Also why are you trying to make it ext2 instaed of ext3?
    Also show the out put of fdisk -l and sfdisk -l and df -h
    Yes, I had the partition act as /home dir
    I didn't know I was making ext2 instead of ext3? Where do you see that?

    fdisk -l
    Code:
    Disk /dev/hda: 41.1 GB, 41110142976 bytes
    255 heads, 63 sectors/track, 4998 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/hda1   *           1        1278    10265503+  83  Linux
    /dev/hda2            1279        4998    29880900    5  Extended
    /dev/hda5            1279        1700     3389683+  82  Linux swap / Solaris
    /dev/hda6            1701        4998    26491153+  83  Linux
    sfdisk -l
    Code:
    Disk /dev/hda: 79656 cylinders, 16 heads, 63 sectors/track
    Warning: extended partition does not start at a cylinder boundary.
    DOS and Linux will interpret the contents differently.
    Warning: The partition table looks like it was made
      for C/H/S=*/255/63 (instead of 79656/16/63).
    For this listing I'll assume that geometry.
    Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
    
       Device Boot Start     End   #cyls    #blocks   Id  System
    /dev/hda1   *      0+   1277    1278-  10265503+  83  Linux
    /dev/hda2       1278    4997    3720   29880900    5  Extended
    /dev/hda3          0       -       0          0    0  Empty
    /dev/hda4          0       -       0          0    0  Empty
    /dev/hda5       1278+   1699     422-   3389683+  82  Linux swap / Solaris
    /dev/hda6       1700+   4997    3298-  26491153+  83  Linux
    df -h
    Code:
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/hda1             9.5G  2.5G  6.6G  28% /
    tmpfs                 284M     0  284M   0% /dev/shm

  4. #4
    Just Joined!
    Join Date
    Oct 2006
    Posts
    5
    Ok.. I had a hell of a time bringing this partition back up.. It seems like there were 117 errors. For how long? Who knows.

    Anyways, I hope this helps someone..
    this is what I used to fix those errors and rewrite the partition, WITHOUT loosing data!

    TestDisk is a powerful free data recovery software! It was primarily designed to help recover lost partitions and/or make non-booting disks bootable again when these symptoms are caused by faulty software, certain types of viruses or human error (such as accidentally deleting your Partition Table). Partition table recovery using TestDisk is really easy.

Posting Permissions

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