Re: fsck fails during boot with 2.6.9-34.0.1.EL kernel because root filesystem is already rw mounted



Hello Floriola,

I think there was a little fault in building the new initrd.
The mount-command of the init-script is wrong and makes confusing, e.g. : first the root-filesystem must mount read/write, it accepts.
Then it must mount read/only, but refuses, because it is already mounted. (normally for remouting it should give the mount-command with option "-o remount,ro" )
And finally fsck should start to check the filesystem, but refuses because fsck cannot work with read/write mounted filesystems.
The result is this end of the boot-process :

/[FAILED]

*** An error occurred during the file system check.
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
*** Warning -- SELinux is active
*** Disabling security enforcement for system recovery.
*** Run 'setenforce 1' to reenable.
Give root password for maintenance
(or type Control-D to continue):/


When you give your root-passwd and type the next command:
# mount -t ext3 -o remount,rw /
# init 5

The system will continue to boot.

I think the best is to set everything right, e.g. :
- check the /etc/fstab (use option "defaults", other gives errors)
- /etc/grub.conf ( or lilo.conf )
- build a new initrd file with mkinitrd
( read carefully the boot-messages, mostly it gives good hints)

It should be work then.

If not, it is possible your MBR will not co-operate, and keeps his old settings.
Try to break the MBR and rebuild.
I have done it once as final solution with the install-dvd.

Grretings and success,
Ronno




Floriola wrote:
Hi Nitin,

Thanks for your answer. My /etc/fstab contains the following line for the root filesystem:

/dev/VolGroup00/LogVol01 / ext3 rw 1 1

However, I changed it to

/dev/VolGroup00/LogVol01 / ext3 defaults 1 1

and rebooted, but the same problem hapened.

It looks like in the early stage of the booting, when the kernel is using the initrd to load the
modules, the /etc/fstab does not matter.

I still do not understand why in my new initrd file, with the new kernel, the root filesystem is
nounted read-write, instead of read-only.

Regards,
Floriola

--- Nitin B <forumswatch@xxxxxxxxx> wrote:

Boot your system in single user mode using new kernel and check /etc/fstab.
If it doesn't have default options edit it and add "defaults" . Oce this is
done reboot.



On 25/06/06, Floriola <floriola2000@xxxxxxxxx> wrote:
Hi,

I have a RHES4 server running kernel version 2.6.9-34.EL. During this
night, I have updated to
latest kernel-2.6.9-34.0.1.EL. The problem is that with the new kernel, my
linux is not booting
anymore. During the boot, I have the following error:

Checking root filesystem
[/sbin/fsck.ext3 (1) -- /] fsck.ext3 -a /dev/VolGroup00/LogVol01
/dev/VolGroup00/LogVol01 is mounted. e2fsck: Cannot continue, aborting.


[FAILED]

*** An error occurred during the file system check.
*** Dropping you to a shell; the system will reboot
*** when you leave the shell.
*** Warning -- SELinux is active
*** Disabling security enforcement for system recovery.
*** Run 'setenforce 1' to reenable.
Give root password for maintenance
(or type Control-D to continue):

Luckily, I still have the old kernel installed, so I booted with the old
one, without any
problems.

I dig a bit more, and I found the following:

In the old 2.6.9-34.EL kernel that I am able to boot with, the init script
in the initrd contains
the following mount command:

mount -o defaults --ro -t ext2 /dev/root /sysroot

while with the new kernel 2.6.9-34.0.1.EL that I have just installed, the
init file in the initrd
contanin the following command:

mount -o rw --ro -t ext2 /dev/root /sysroot

So this is why with the new kernel, my root filesystem si already mounted
read-write during the
boot process, before the fsck.

However, this looks quite weird. First, I cannot find anywhere what this
--ro means (there are no
info about this option in the man page). Most probably, it means that the
filesystem should be
mount read-only, but then why in the new kernel the mount command contains
also "-o rw" option?

And why in the previous kernel, the root filesystem was mounted with the
"-o defaults" option, and
the new one is mounted with the "-o rw" option?

Any ideeas?

Thank you in advance,

Floriola

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com


--

Ron de Kuijer
Theraview Technology
The Netherlands
support@xxxxxxxxxxxxx


--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



Relevant Pages

  • Re: 2.6.22-git17 boot failure
    ... But I know far too less about initrd to ... some bug which only appears with particular kernel memory layouts, ... standard behaviour of a Suse that cannot mount its root filesystem: ...
    (Linux-Kernel)
  • Re: mount weirdness
    ... the first call to mount, just after boot ... the root partition, which contains /etc/fstab. ... grub and lilo load the kernel, but do no mounting of any kind (grub ... The kernel, once loaded, then mounts the root filesystem or loads code ...
    (uk.comp.os.linux)
  • Re: [opensuse] LILO/Grub Problem
    ... Linux kernel must be loaded before initrd. ... Should be as easy as, in a console as root, mount /dev/hdb1 /mnt, then ... partition to /data1 to get to it. ...
    (SuSE)
  • Re: Debian Unstable wont boot on 2.6.15-1/grub/raid1
    ... If I boot up on 2.6.16-1 the system will ... udev is not involved until after the root filesystem is mounted. ... problem is in the initrd, which prepares the system to mount root. ... The 2.6.15 kernel package on backports.org, at least, wants to use yaird ...
    (Debian-User)
  • [SLE] unable to get kernel (from kernel.org) to work
    ... I'm trying to compile a kernel for my 8.2 system. ... but It won't mount the root filesystem. ... I use grub and here is my entry in grub ... I get the following error just after it tries to mount the filesystem ...
    (SuSE)