Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26

Thread: Bad Magic Number in super-block while trying to open /dev/sda2

  1. #11
    Join Date
    Jan 2009
    Beans
    6

    Re: Bad Magic Number in super-block while trying to open /dev/sda2

    Quote Originally Posted by unutbu View Post
    Please post the output to the commands
    Code:
    sudo mount /dev/sda2 /mnt
    sudo blkid
    cat /mnt/etc/fstab
    Given that info, we should be able to set you right.
    Dear Iced Blended Vanilla Crème,

    your request for the information output by the below commands,

    "
    sudo mount /dev/sda2 /mnt
    sudo blkid
    cat /mnt/etc/fstab
    "

    Below are the methods that i tried to get the your requested infomation:

    A) "Use the Knoppix CD to boot up" method:

    From the terminal, i enter the:

    sudo mount /dev/sda2 /mnt

    i got response message below:

    mount: you must specify the filesystem type.

    then i tried the below command

    sudo mount -t ext2 /dev/sda2 /mnt
    or
    sudo mount -t ext3 /dev/sda2 /mnt

    i got response message below:

    mount: wrong fs type, bad option, bad superblock on/dev/sda2, missing codepage or other error
    In some cases useful info is found in syslog - try dmesg | tail or so

    I don't know what to do next so i stopped using this A) method to get your asking infomation.


    B) "Use the hard drive to boot up" method:

    After bootup, i switch to "su" super-user.


    1) i enter command : blkid

    i got the below response message:

    /dev/sda1: LABEL="/boot" UUID="6ebd2490-a30b-4444-b67b-e1e2f19cf4c6" SEC_TYPE="ext2" TYPE="ext3"

    /dev/dm-0: UUID="cc9b38d2-bd6d-456b-9aa4-5febe5361826" SEC_TYPE="ext2" TYPE="ext3"

    /dev/dm-1: TYPE="swap" UUID="2732d729-c410-48bd-b6bc-c0cc6ac74797"

    /dev/mapper/VolGroup-LogVol01: TYPE="swap" UUID="2732d729-c410-48bd-b6bc-c0cc6ac74797"


    I did not see the /dev/mapper/VolGroup-LogVol00 here which i think the /dev/sda2 is mapped to.


    2) i enter command: cat /etc/fstab

    i got the below response message

    #This file is edited by fstab-sunc - see 'man fstab-sync' foe details
    /dev/VolGroup00/LogVol00 / ext3 defaults 1 1
    LABEL=/boot /boot ext3 defaults 1 2
    /dev/devpts /dev/pts devpts gid=5,mode=620 0 0
    /dev/shm /dev/shm tmpfs defaults 0 0
    /dev/proc /proc proc defaults 0 0
    /dev/sys /sys sysfs defaults 0 0
    /dev/VolGroup00/LogVol01 swap swap defaults 0 0
    #/dev/sdb1 /mnt/windows ntfs ro,unmask=0222 0 0
    /dev/hda /media/cdrecorder auto pamconsole,exec,noauto,managed 0 0


    3) i enter command: cat /mnt/etc/fstab

    i got the below response message:

    /dev/ram0 / ext2 rw 0 0
    proc /proc proc rw 0 0

    Please help me to solve the "Bad Magic Number in super-block while trying to open /dev/sda2"

    Thank you very much.

    Kevin
    Last edited by kevinluu; January 5th, 2009 at 08:41 PM.

  2. #12
    Join Date
    Jan 2009
    Beans
    6

    Re: Bad Magic Number in super-block while trying to open /dev/sda2

    Please help.

    I have posted the output of the:

    sudo mount /dev/sda2 /mnt
    sudo blkid
    cat /mnt/etc/fstab

    Thank you very much.

    Kevin

  3. #13
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: Bad Magic Number in super-block while trying to open /dev/sda2

    Since meierfra and unutbu haven't had a chance to get back to you yet, I just wanted to ask: is your sda2 partition LVM by chance? I'm wondering because it looks like from the output of blkid that sda2 might have been mapped to /dev/dm-0, which I think would be either RAID or LVM (but I'm not sure). How about trying:
    Code:
    sudo mount /dev/dm-0 /mnt && ls -l /mnt
    And please post the output.

  4. #14
    Join Date
    Jan 2009
    Beans
    6

    Re: Bad Magic Number in super-block while trying to open /dev/sda2

    Quote Originally Posted by unutbu View Post
    Please post the output to the commands
    Code:
    sudo mount /dev/sda2 /mnt
    sudo blkid
    cat /mnt/etc/fstab
    Given that info, we should be able to set you right.

    Hi All,

    booted from my hard disk then switch to "su" user. I then

    1) Enter command: mount /dev/dm-0 /mnt

    i got no output message for this command.

    2) Enter command: ls -l /mnt

    The output message for this command is shown below:

    total 196
    drwxr-xr-x 2 root root 4096 Aug 16 2006 bin
    drwxr-xr-x 2 root root 4096 May 18 2006 boot
    drwxr-xr-x 4 root root 4096 May 18 2006 dev
    drwxr-xr-x 91 root root 12288 Jan 5 17:40 etc
    drwxr-xr-x 9 root root 4096 Apr 18 2008 home
    drwxr-xr-x 11 root root 4096 Aug 16 2006 lib
    drwx------ 2 root root 16384 May 18 2006 lost+found
    drwxr-xr-x 4 root root 4096 Jan 5 17:38 media
    drwxr-xr-x 2 root root 4096 Apr 25 2005 misc
    drwxr-xr-x 15 root root 4096 Apr 16 2008 mnt
    dr-xr-xr-x 2 root root 4096 May 24 2006 net
    drwxr-xr-x 4 root root 4096 Oct 16 05:25 opt
    drwxr-xr-x 2 root root 4096 May 18 2006 proc
    drwxr-x--- 27 root root 4096 Nov 5 21:34 root
    drwxr-xr-x 2 root root 12288 Aug 16 2006 sbin
    drwxr-xr-x 2 root root 4096 May 18 2006 selinux
    drwxr-xr-x 2 root root 4096 May 23 2005 srv
    drwxr-xr-x 2 root root 4096 May 18 2006 sys
    drwxrwxrwt 6 root root 4096 Jan 5 17:42 tmp
    drwxr-xr-x 14 root root 4096 Feb 27 2006 usr
    drwxr-xr-x 25 root root 4096 Apr 16 2008 var


    I rebooted the system again to erase the previous mount command.

    After the system rebooted i then enter:

    A) The "fdisk -l" command gives the below message;

    Disk /dev/sda: 500.1GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sda1 * 1 13 104391 83 Linux
    /dev/sda2 14 60801 488279610 8e Linux LVM

    Yes the /dev/sda2 in my system is Linux LVM.

    B) The " df -h" command shows:

    Filesystem size Used Avail Use% Mounted on
    /dev/mapper/VolGroup-LogVol00 224G 194G 19G 92% /
    /dev/sda1 99M 14M 80M 15% /boot
    /dev/shm 628M 0 628M 0% /dev/shm

    It looks like the /dev/sda2 is mapped to /dev/mapper/VolGroup-LogVol00

    The "fsck -n /dev/sda1" shows:

    fsck 1.37 (21-Mar-2005)
    e2fsck 1.37 (21-Mar-2005)
    ext2fs_check_if_mount: Permission denied while determing whether /dev/sda1 is mounted.
    /boot: clean, 36/26104 files, 17488/104388 blocks

    The "fsck -n /dev/sda2" shows:

    fsck 1.37 (21-Mar-2005)
    e2fsck 1.37 (21-Mar-2005)
    Couldn't find ext2 superblock, trying backup blocks...
    fsck.ext2: Bad magic number in super-block while trying to open /dev/sda2

    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>

    As you can see my /dev/sda2 has bad magic number in super-block.

    Please help me to fix this problem in my /dev/sda2?


    Thank you very much.

    Kevin

  5. #15
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: Bad Magic Number in super-block while trying to open /dev/sda2

    You can't do an fsck on sda2 directly since it is LVM. How about instead trying:
    Code:
    sudo fsck -yCM /dev/dm-0
    And please post the output.

  6. #16
    Join Date
    Jan 2009
    Beans
    6

    Re: Bad Magic Number in super-block while trying to open /dev/sda2

    Quote Originally Posted by caljohnsmith View Post
    You can't do an fsck on sda2 directly since it is LVM. How about instead trying:
    Code:
    sudo fsck -yCM /dev/dm-0
    And please post the output.
    Hi All,

    After switching to "su" super user account, i then i enter the "fsck -yCM /dev/dm-0". I got the output as shown below:

    fsck 1.37 (21-Mar-2005)
    e2fsck 1.37 (21-Mar-2005)
    /dev/dm-0 is mounted

    Warning!!! Running e2fsck on a mounted filesystem may cause SERVERE filesystem damage.

    Do you really want to continue (y/n)?

    I enter "n" this time to stop.

    Should i eneter "y" to continue?

    Thank you very much.

    Kevin

  7. #17
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: Bad Magic Number in super-block while trying to open /dev/sda2

    I'm glad you said "n" about the fsck since it seems /dev/dm-0 is mounted somewhere. To find out where it is mounted, you can do:
    Code:
    mount | grep dm-0
    And to unmount it you can try:
    Code:
    sudo umount /dev/dm-0
    Once you have dm-0 unmounted, let me know if you can run the fsck on it OK.

  8. #18
    Join Date
    Jan 2009
    Beans
    6

    Re: Bad Magic Number in super-block while trying to open /dev/sda2

    Quote Originally Posted by caljohnsmith View Post
    I'm glad you said "n" about the fsck since it seems /dev/dm-0 is mounted somewhere. To find out where it is mounted, you can do:
    Code:
    mount | grep dm-0
    And to unmount it you can try:
    Code:
    sudo umount /dev/dm-0
    Once you have dm-0 unmounted, let me know if you can run the fsck on it OK.
    Hi,

    I am very sorry.
    I were very busy with other works at the office and did not have time to try out your steps yet.

    I will do your suggested steps this weekend and let you know the output.

    Thank you very much.

    Kevin.

  9. #19
    Join Date
    Feb 2009
    Beans
    6

    Re: Bad Magic Number in super-block while trying to open /dev/sda2

    *sigh*

    This is an embarrassing first post for me. I'm having the exact same issue as OP. I partitioned 739GB as ext3 and incorrectly mounted the file. Upon reboot its saying:

    "Bad Magic Number in super-block while trying to open /dev/sbd1/"

    The problem is that sbd1 is actually an NTFS partition, and my linux partition is on sbd2. Additionally, the error on boot says:

    "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, then the superblock is corrupt."

    I decided to delete the partition I just made (all 739GB) and keep it unallocated as it was before, but after rebooting, it gave me the same error.

    I'm typing this from the LiveCD, and upon looking at Gparted, it's saying my original partition is ext3.

    Finally, upon trying to edit (or at least inspect) my fstab file, I'm not seeing what is usually there. I'll post all relevant outputs below:

    sudo fdisk -lu

    Code:
    Disk /dev/sda: 250.0 GB, 250059350016 bytes
    255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0xa47ea47e
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *          63   268414019   134206978+   7  HPFS/NTFS
    
    Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
    255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0x120ca290
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sdb1              63    25768259    12884098+   7  HPFS/NTFS
    /dev/sdb2        25768260  1953520064   963875902+   f  W95 Ext'd (LBA)
    /dev/sdb5      1638919233  1743791489    52436128+   7  HPFS/NTFS
    /dev/sdb6      1540794276  1634806529    47006127   83  Linux
    /dev/sdb7      1634806593  1638919169     2056288+  82  Linux swap / Solaris
    /dev/sdb8      1743791553  1953520064   104864256    7  HPFS/NTFS
    /dev/sdb9      1528649073  1540794149     6072538+  82  Linux swap / Solaris
    
    Partition table entries are not in disk order
    sudo blkid
    Code:
    /dev/sda1: UUID="3A840561840520CD" TYPE="ntfs" 
    /dev/sdb1: UUID="28CCC945CCC90DCE" LABEL="Extra Storage and OS" TYPE="ntfs" 
    /dev/sdb5: UUID="54BCAFBA64F8FBA4" LABEL="Ubuntu" TYPE="ntfs" 
    /dev/sdb6: UUID="61fa493a-4ab4-42e9-ac97-cce110d0bd37" SEC_TYPE="ext2" TYPE="ext3" 
    /dev/sdb7: TYPE="swap" UUID="d46aa2b1-e0fc-4d6e-b662-ea59dd0ee9d2" 
    /dev/sdb8: UUID="152F2BE9FEF7D9F9" LABEL="Vista" TYPE="ntfs" 
    /dev/sdb9: TYPE="swap" UUID="31435922-2975-4ac0-8ae9-8c0b31fc3823" 
    /dev/loop0: TYPE="squashfs"
    my fstab file looks like this:
    Code:
    aufs / aufs rw 0 0
    tmpfs /tmp tmpfs nosuid,nodev 0 0
    /dev/sdb7 swap swap defaults 0 0
    /dev/sdb9 swap swap defaults 0 0
    I'm almost positive all of this is because I incorrectly mounted the new partition before rebooting, but now that my fstab file looks like that, I don't know what to do!

    I've searched google and these forums for a few hours before making this post, and have great success on here findind solutions to some of the problems I've been running into, but I can't find this one anywhere, so hopefully you can let me know what I'm doing wrong.

    Thanks a bunch.

  10. #20
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: Bad Magic Number in super-block while trying to open /dev/sda2

    Dreas, it would first help to get some more info about your system, so how about downloading the Boot Info Script to your Ubuntu Live CD desktop:

    https://sourceforge.net/projects/bootinfoscript/

    Then do:
    Code:
    sudo bash ~/Desktop/boot_info_script*.sh
    That will create a "RESULTS.txt" file in the same directory from where the script is run, namely your desktop; please copy/paste the contents of the RESULTS.txt file to your next post (and put code tags around it). The results of that script will help clarify your setup.

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

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