Chicken and Egg problem on booting RH9 (Shrike)
Hello all.
Just upgraded from 7.3 to 9 and all went relatively fine. Got one small
problem though.
On booting inittab checks partitions when ordered to do so in fstab and on
unclean unmounting. Since my root partition (/dev/hdb5) is setup to check on
every boot, fsck ran immediately after the upgrade. Unfortunately the root
partition is mounted on the linuxrc script in the ram boot image.
Excerpt of linuxrc:
---------------------------------------------------
.....
echo Creating root device
mkrootdev /dev/root
echo 0x100 > /proc/sys/kernel/real-root-dev
echo Mounting root filesystem
mount -o exec,dev,suid,rw --ro -t ext3 /dev/root /sysroot
pivot_root /sysroot /sysroot/initrd
umount /initrd/proc
---------------------------------------------------
Strange that there is a double hyphen before the ro. Can anyone explain that
one?
After this control passes back to the kernel which then starts the init
process.
While init is chugging through inittab and executing rc.sysinit it arrives
at the partition checking commands. This now fails because /dev/hdb5 is
already mounted.
NB the rw remount of root occurs a little later.
I cheated to get into my system by adding 'fastboot="yes"' in rc.sysinit but
of course this is not ideal.
I tried to remount root read only (after booting) but mount reported that
the /dev/hdb5 device is busy. I checked my mounts and the only thing that is
mounted is the /proc system, I am running X though. I know what you are
thinking; how can I not have any mounts and run X. As a left over from my
very first installation I have plonked everything into the one partition (I
know, shame on me).
Where I am getting stuck is that initrc has to mount and pivot the root
otherwise the kernel would never be able to find the init program but it
should not mount the root because as soon as it is mounted you cannot run
fsck anymore.
Any ideas where my logic goes astray, I am open to suggestions.
Thanks in advance
Alwin Leerling
|