首页 > Linux操作系统 > Linux操作系统 > red hat as 4 启动报错:checking filesystems fsck.ext3: bad magic number ...

red hat as 4 启动报错:checking filesystems fsck.ext3: bad magic number ...

原创 Linux操作系统 作者:msdnchina 时间:2009-08-16 19:13:11 0 删除 编辑

red hat as 4 启动报错:checking filesystems  fsck.ext3: bad magic number in super-block while trying to open /dev/sdc

报错原因: red hat as4中的fstab中写错导致sdc1不能mount


vmware worksation 6

sdc是一个8G的硬盘.使用fdisk /dev/sdc 进行了分区,操作过程如下:

[root@rhel4lvm dev]# fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

The number of cylinders for this disk is set to 1044.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
Invalid partition number for type `1'
Command action
   e   extended
   p   primary partition (1-4)
Partition number (1-4): 1
First cylinder (1-1044, default 1):   
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-1044, default 1044):
Using default value 1044

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.


[root@rhel4lvm dev]# mkfs.ext3 /dev/sdc1
mke2fs 1.35 (28-Feb-2004)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
1048576 inodes, 2096474 blocks
104823 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=2147483648
64 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

Writing inode tables: done                           
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 25 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

值得注意的是,此时还没有将此分区进行mount,所以,df -lH查询不出来,如下:

 [root@rhel4lvm dev]# df -lh
Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb2             4.9G  4.4G  224M  96% /
/dev/sdb1              99M   12M   83M  12% /boot
none                  252M     0  252M   0% /dev/shm
/dev/sdb5            1012M   34M  927M   4% /tmp


[root@rhel4lvm dev]# mount /dev/sdc1 /sourcedb


[root@rhel4lvm dev]# df -H
Filesystem             Size   Used  Avail Use% Mounted on
/dev/sdb2              5.2G   4.7G   235M  96% /
/dev/sdb1              104M    12M    87M  12% /boot
none                   264M      0   264M   0% /dev/shm
/dev/sdb5              1.1G    35M   972M   4% /tmp
/dev/sdc1              8.5G    53M   8.0G   1% /sourcedb


[root@rhel4lvm ~]# vi /etc/fstab
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
none                    /dev/pts                devpts  gid=5,mode=620  0 0
none                    /dev/shm                tmpfs   defaults        0 0
none                    /proc                   proc    defaults        0 0
none                    /sys                    sysfs   defaults        0 0
LABEL=/tmp              /tmp                    ext3    defaults        1 2
LABEL=SWAP-sdb3         swap                    swap    defaults        0 0
/dev/sdc                /sourcedb               ext3    defaults        0 0
/dev/hdc                /media/cdrom            auto    pamconsole,exec,noauto,managed 0 0
/dev/fd0                /media/floppy           auto    pamconsole,exec,noauto,managed 0 0

请注意,倒数第三行,应该是 dev/sdc1,当时是没有问题,重新启动red hat 时,有报错:

checking filesystems  fsck.ext3: bad magic number in super-block while trying to open /dev/sdc  [FAILED]

*** An error occured during the file system check.

*** Dropping you to a shell;the system will reboot

*** when you leave the shell.

Give root password for maintenance

(or type Control-D to continue):



来自 “ ITPUB博客 ” ,链接:,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录


  • 博文量
  • 访问量