Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 36847 - generates initrd that fails to start init and can't find root
Summary: generates initrd that fails to start init and can't find root
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Brad House
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-30 14:57 UTC by Paul Pacheco
Modified: 2004-01-20 10:41 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Pacheco 2003-12-30 14:57:13 UTC
genkernel-3.0.1_beta2
sys-kernel/gentoo-dev-sources-2.6.0-r1
sys-apps/baselayout-1.8.6.12-r3 *

with genkernel, I successfully compile and build the kernel and the initrd. However when I try to boot, init gives an error and then it complains about not being able to find the root fs.

Note, it does mount successfully the root device and pivot into it. I tested that by specifying a different real_root, typing shell, and doing everything on the linuxrc. 

The problem seems to be that when doing
exec /sbin/init
it gives the Usage: init 0123456SsQqAaBbCcUu
this line is at the very end of linuxrc
and exits, leaving it to the kernel to try to use the old method of pivoting root and all that which fails.

It seems you need to give init a parameter. maybe
exec /sbin/init 3
but I could be talking nonsense here.


Reproducible: Always
Steps to Reproduce:
1.emerge genkernel
2.emerge gentoo-dev-sources
3.mount /boot
4.genkernel --menuconfig --bootsplash --install all
5.update /boot/grub/grub.conf
3.reboot

Actual Results:  
Then, when I start the computer, linuxrc gets past:
step 1
step 2
step 3
step 4
step 5

and on step 6 I get the following error messages:

STEP 6: pivot_root and exec/chroot real init
umount: /tmp/.initrd/dev: device is busy
Usage: init 0123456SsQqAaBbCcUu
VFS: Cannot open root device "sdb5" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on unknown-block(0,0)


Expected Results:  
I would expect init to start and boot normally.

Portage 2.0.49-r18 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20031222-r0,
2.6.0-gentoo)
=================================================================
System uname: 2.6.0-gentoo i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.3.12
distcc 2.12 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
ccache version 2.3 [enabled]
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=pentium3 -pipe -mmmx -fstack-protector"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config
/usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/usr/share/texmf/xdvi/ /var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -march=pentium3 -pipe -mmmx -fstack-protector"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs buildpkg ccache distcc sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j7"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X X509 acpi acpi4linux alsa amd apache2 apm arts artswrappersuid autofs avi
berkdb composite crypt cups directfb dnd doc dvd emacs encode esd fbcon
foomaticdb gd gd-external gdbm gif gpm gtk2 imagemagick imlib java jbig jpeg kde
lcms libg++ libwww mad mikmod motif mozilla mozsvg mpeg music mysql ncurses nls
oci8 odbc oggvorbis opengl oss pam pdflib perl php pic png python qt quicktime
radeon rage128 readline samba sdl slang spell sse ssl svga tcltk tcpd tetex tiff
truetype type1 usb wmf wxwindows x86 xml2 xmms xv xvid zlib"
Comment 1 Matteo Settenvini 2004-01-05 03:51:57 UTC
It happens the same thing also to me. It's pretty annoying.

Other kernels don't have this problem, i guess it's on with initrd or something like that.
Whilst the old genkernel built always the busybox and etc, now it uses the cached tbz2. Could it be a problem (since they should be re-generated)?

Quite critical, indeed, as specifying the real partition when asked result in a awful kernel panic.

Genkernel 1.9 didn't do that.

PS Also tried manually compiling the kernel. The only thing I left out was initrd and busybox, so I guess the problem should be with that.
Comment 2 Marcus J. van Dijk, Jr. 2004-01-12 12:27:52 UTC
It occurs to me as well, the root partition is XFS over here.
Comment 3 Paul Pacheco 2004-01-13 08:08:18 UTC
I found the solution.

In grub, you have to add the following parameters to the kernel line:

root=/dev/ram0 init=/linuxrc real_root=/dev/hda

Of course, replace /dev/hda for your real root partition. This is what I have in my grub file:

title=Gentoo
root (hd2,0)
kernel /boot/kernel-2.6.1-gentoo root=/dev/ram0 init=/linuxrc real_root=/dev/sdb5 video=vesa:ywrap,mtrr vga=0x317 quiet splash=silent
initrd /boot/initrd-2.6.1-gentoo

If it does not come out right, the kernel line ends with splash=silent
Comment 4 Paul Pacheco 2004-01-16 09:31:48 UTC
I am going to close this bug since it works now with those parameters.
Comment 5 Matteo Settenvini 2004-01-17 09:29:11 UTC
I use lilo. What have I to set it to?
Comment 6 Brad House 2004-01-18 08:04:48 UTC
invalid bug.
RTFM
/usr/share/genkenel/README

you MUST pass   root=/dev/ram0 real_root=/dev/hdX1
to the kernel
Comment 7 Jon Portnoy (RETIRED) gentoo-dev 2004-01-20 10:41:23 UTC
For lilo, you can pass the same arguments by using append= under your kernel image. Please see `man lilo.conf` for more information on using append=