Bug 187628 - sys-apps/baselayout-2.0.0_rc1 does not boot with read-only root filesystem
|
Bug#:
187628
|
Product: Gentoo Linux
|
Version: unspecified
|
Platform: All
|
|
OS/Version: Linux
|
Status: VERIFIED
|
Severity: normal
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: base-system@gentoo.org
|
Reported By: corsair@gentoo.org
|
|
Component: baselayout
|
|
|
URL:
|
|
Summary: sys-apps/baselayout-2.0.0_rc1 does not boot with read-only root filesystem
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2007-08-03 17:10 0000
|
I've two problems with baseyout-2*:
First problem is that sys-apps/baselayout-2.0.0_rc1 does not boot with
read-only root filesystem. I have to append "root=/dev/sda3 rw" to the kernel
options, else I'm getting this:
(this is powerpc64 and it *did* boot without rw appended the first time I
booted with baselayout-2*. I've seen this after first reboot. I've upgraded
from baselayout 1* straight to 2*)
Welcome to yaboot version 1.3.13
Enter "help" to get some basic usage information
boot: linux
Please wait, loading kernel...
Elf64 kernel loaded...
Loading System.map ...
System.map loaded at 01a00000, size: 1024 Kbytes
OF stdout device is: /pci@fef00000/isa@b/serial@i3f8
command line: root=/dev/sda3
memory layout at init:
alloc_bottom : 000000000186f000
alloc_top : 0000000020000000
alloc_top_hi : 0000000020000000
rmo_top : 0000000020000000
ram_top : 0000000020000000
Looking for displays
found display : /pci@fee00000/display@b, opening ... done
[...]
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 10
lo: Disabled Privacy Extensions
tunl0: Disabled Privacy Extensions
IPv6 over IPv4 tunneling driver
sit0: Disabled Privacy Extensions
NET: Registered protocol family 17
kjournald starting. Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 176k freed
INIT: version 2.86 booting
INIT: Entering runlevel: 3
* failed to open `/lib64/rcscripts/init.d/softlevel': Read-only file system
This is (none) (Linux ppc64 2.6.21.6) 17:56:21
(none) login:
The second problem is, that /proc does not get mounted if I append
"root=/dev/sda3 rw". /proc is empty.
Could you check the dates of /etc/profile.env and
/lib/rcscripts/init.d/deptree?
Also, see if moving those files to /tmp and regenerating them helps
/sbin/env-update
/etc/init.d/urandom restart
If it does help, then please attach those files here so I can see what is
causing rc to crash out.
This are the dates (before regenerating the two files):
power3 ~ # ls -lh /etc/profile.env
-rw-r--r-- 1 root root 845 Aug 4 16:39 /etc/profile.env
power3 ~ # ls /lib64/rcscripts/init.d/deptree -lh
-rw-r--r-- 1 root root 5.9K Aug 3 17:29 /lib64/rcscripts/init.d/deptree
power3 ~ # date
Sat Aug 4 16:40:47 CEST 2007
I've regenerated the files now, but that didn't help. I'm getting the same
error.
Interesting that rc doesn't appear to be running at all.
Try this
RUNLEVEL="1" /sbin/rc sysinit
If that fails, could I get a strace of it please?
Or backtrace if it dumps core.
power3 ~ # RUNLEVEL="1" /sbin/rc sysinit
GCouldnt open /dev/console
power3 ~ # ls /dev/console -l
crw------- 1 root tty 5, 1 Aug 4 16:58 /dev/console
power3 ~ # chmod g+rw /dev/console
power3 ~ # RUNLEVEL="1" /sbin/rc sysinit
GCouldnt open /dev/console
power3 ~ # chmod o+rw /dev/console
power3 ~ # RUNLEVEL="1" /sbin/rc sysinit
GCouldnt open /dev/console
doh?
I just did the following:
1. removing baselayout 2.0.0_rc1 (including all cruft; i.e. files modified by
me, so portage didn't unmerge them)
2. install baselayout 1.12.9-r2
3. reboot was successful (proc get's mounted and I can start without "rw")
4. update to baselayout 2.0.0_rc1 again
5. etc-update (let everything overwrite)
6. reboot and I'm getting the error
I'm not sure, why it booted the first time after the first upgrade, but I'm
pretty sure it did.
Could you add set-x near the top of /lib/rcscripts/sh/init.sh and
/lib/rcscripts/sh/init-early.sh so we can see where they're going wrong as I
think the error is there somewhere.
we should add a gentoo=debug or something that gets parsed at the start of boot
so people dont need to add 'set -x' and such ...
Placing "set -x" here and there I found this: if I place it exactly here
--- /lib64/rcscripts/sh/init-early.sh.orig 2007-08-04 18:27:43.000000000
+0200
+++ /lib64/rcscripts/sh/init-early.sh 2007-08-04 18:51:29.000000000 +0200
@@ -11,5 +11,6 @@
CONSOLE="${CONSOLE:-/dev/console}"
[ -c "${CONSOLE}" ] && cons="-C ${CONSOLE}"
setfont ${cons} "${RC_LIBDIR}"/console/"${font}"
+ set -x
fi
fi
then the machine starts fine:
[...]
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 176k freed
INIT: version 2.86 booting
GCouldnt open /dev/console
Gentoo/Linux; http://www.gentoo.org/
Copyright 1999-2007 Gentoo Foundation; Distributed under the GPLv2
Press I to enter interactive boot mode
* Mounting proc at /proc ...
[ ok ]
[following output as usual]
If I place it one line above the "setfont" line, then it fails. Dunno what this
means.
I should note, that all output comes from serial console. There is no
monitor/keyboard attached to the machine, but the kernel seems to open the open
firmware device. ("found display : /pci@fee00000/display@b, opening ... done"
at the very first lines of the kernel)
no, it does not... same error.
yes! that fixed it! thanks a lot! even the "Couldnt open /dev/console" message
is gone now.
Only one tiny little thing is missing ;-)
[...]
Freeing unused kernel memory: 176k freed
INIT: version 2.86 booting
G
Gentoo/Linux; http://www.gentoo.org/
Copyright 1999-2007 Gentoo Foundation; Distributed under the GPLv2
[...]
You see it? There is a "G". Where does that one come from?
(In reply to comment #13)
> [...]
> Freeing unused kernel memory: 176k freed
> INIT: version 2.86 booting
> G
> Gentoo/Linux; http://www.gentoo.org/
> Copyright 1999-2007 Gentoo Foundation; Distributed under the GPLv2
> [...]
>
> You see it? There is a "G". Where does that one come from?
It's an ASCII escape code to put the console into unicode mode.
If you don't want to see it, then remove consolefont from the boot runlevel.
that last patch works fine, too.
(In reply to comment #15)
> It's an ASCII escape code to put the console into unicode mode.
> If you don't want to see it, then remove consolefont from the boot runlevel.
thanks for clarification. Unfortunately "rc-update" does not work as expected:
power3 ~ # rc-update del consolefont default
* rc-update: unknown applet
power3 ~ # rc-update -s
* rc-update: unknown applet
power3 ~ # rc-update -h
* rc-update: unknown applet
another bug?
rc-update is already fixed in rc2, I'll push out an -r1 with this patch
Fixed in rc2-r1 - thanks.
(In reply to comment #8)
> we should add a gentoo=debug or something that gets parsed at the start of boot
> so people dont need to add 'set -x' and such ...
It's a good idea, but that only works if /proc is already mounted so we can
read the cmdline. So it wouldn't have helped in this case.