Erreur de montage 6 lors du montage d'ext3

vianney -  
mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   -
Hello,

I need to take care of a server, but I'm having some problems and I don't have much information about the server.

When I start it, Grub launches and I can choose between Red Hat Linux (2.6.6) and Red Hat Linux (2.4.20-8).
Unfortunately, neither of the two kernels boot...
When I boot the first one, the last lines displayed are:

VFS: Cannot open root device "hda1" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs or unknown-block(0,0)

When I boot the second one, the last lines are:

Loading ext3.o module
Mounting /proc filesystem
Creating block devices
Creating root device
Mounting root filesystem
mount: error 6 mounting ext3
pivotroot: pivot_root(/sysroot,/sysroot/initrd) failed: 2
mount /initrd/proc failed: 2
freeing used kernel memory: 128k freed
Kernel panic: No init found. Try passing init= option to kernel

I really need to bring the server back up, and I'm not quite sure how to proceed...
Any help is greatly appreciated :)

Thank you in advance,
Vianney

3 answers

  1. mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   7 940
     
    What your errors mean

    The VFS error means that this kernel does not properly support your hard drive, more specifically the hard drive that contains /boot. This is quite common for older kernels (like 2.4) when using SATA drives, for example.

    The second error implies that the kernel is going further. The kernel is booting, but the partition / (in ext3) cannot be mounted (damaged disk? corrupted installation?).

    How to proceed

    To try going further, you should download a live CD or an installation CD. For example, an Ubuntu installation CD.
    https://ubuntu.com/

    It will then be possible to access your hard drive via this CD and repair your installation.

    Finding your partition table

    We can reasonably hope that the version you download will properly support your hard drive. Hence, you should report the partition table by typing in a terminal:
    sudo fdisk -l

    The next step is to create mount points (for example /media/linux, the name is arbitrary), i.e., directories in which you will mount the partitions of your hard drive. This will help quickly determine if a partition is corrupted. For example, suppose you get this:
    (root@aldur) (~) # fdisk -l Disk /dev/hda: 40.0 GB, 40020664320 bytes 255 heads, 63 sectors/track, 4865 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x802b81ca Device Boot Start End Blocks Id System /dev/hda1 * 1 1275 10241406 7 HPFS/NTFS /dev/hda2 1276 4740 27832612+ 83 Linux /dev/hda3 4741 4865 1004062+ 82 Linux swap / Solaris Disk /dev/hdb: 82.3 GB, 82348277760 bytes 255 heads, 63 sectors/track, 10011 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x4707841a Device Boot Start End Blocks Id System /dev/hdb1 * 1 10011 80413326 b W95 FAT32

    Report the result in your case.

    Mounting the hard drive partitions

    Be careful not to confuse the live CD environment (the / of the CD) and that installed on your hard drive. Thus, the files you can see in a file explorer are not those of your Red Hat, but those of the CD. The whole challenge of this part is to access your hard drive.

    In this example, there are two hard drives (/dev/hda and /dev/hdb), one divided into three partitions and the other into one. We can create the following mount points and mount each partition one by one:
    mkdir -p /media/hda1 /media/hda2 /media/hdb1

    Then simply mount each partition according to its filesystem. For this example:
    sudo mount -t ntfs /dev/hda1 /media/hda1 sudo mount -t ext3 /dev/hda2 /media/hda2 sudo mount -t vfat /dev/hdb1 /media/hdb1

    At this point, you should be able to view the content of each partition with a ls, for example:
    ls -la /media/hda1

    ... or have encountered an error when mounting (report it in that case). Either way, at this stage, you can run disk diagnostic tools like badblocks, fsck, or hdparm via the CD to check the integrity of the disk.

    What if it's grub?

    IF you discover that the disk is good, then it’s probably your grub that is misconfigured. You will need to correct it by modifying the file /boot/grub/menu.lst. Suppose, for example, that the /boot of the hard drive is in /dev/hda1, then you need to modify /media/hda1/boot/grub/menu.lst and put the correct partitions. For example, in the right case, /boot and / are one and the same partition, /dev/hda2, and thus I have an entry like:
    title Debian GNU/Linux, kernel 2.6.24-1-686 root (hd0,1) kernel /boot/vmlinuz-2.6.24-1-686 root=/dev/hda2 ro initrd /boot/initrd.img-2.6.24-1-686 

    (in grub syntax, hd0 refers to the first disk, in my case /dev/hda, and the 1 following is the second partition). Be sure to report the content of the /boot of the hard drive so that we can guide you on how to configure grub for your installation.

    That said, if you find that grub is misconfigured, you can restart your PC normally. Grub allows indeed to modify on the fly (press e in grub) and thus test different boot options. Once you manage to boot your Red Hat, simply correct /boot/grub/menu.lst to avoid having the same issue at the next reboot.

    If you are still struggling with this message, don’t panic; with the information you are supposed to report to me, I will be able to guide you more precisely.

    Good luck
    1
  2. Youplaboum
     
    I would like to just add this for your information,

    Possible boot problems with the new kernel
    Advanced partition table

    It may occur that the Linux kernel does not recognize the disk if the advanced partition table is enabled in the .config file.
    This results in a kernel boot error:

    VFS: Cannot open root device "hda2" or unknown block (0,0)
    Kernel panic - not syncing: VFS Unable to mount root fs on unknown block (0,0)
    In this case, after running make menuconfig, edit the kernel configuration file by changing:
    CONFIG_PARTITION_ADVANCED=y

    to
    # CONFIG_PARTITION_ADVANCED is not set.

    Using initrd

    Installing the Linux kernel without creating an init file can cause some problems, so do not forget the --initrd option on the make-kpkg command line.
    1
  3. mamiemando Posted messages 33228 Registration date   Status Moderator Last intervention   7 940
     
    Attention, make-kpkg is specific to Debian, and here we are talking about Red Hat.
    0