Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 40210

Summary: machine reboots trying to boot using kernel generated by genkernel (3.0.1_beta9)
Product: Gentoo Hosted Projects Reporter: Moshe Kamensky <kamensky.fb>
Component: genkernelAssignee: x86-kernel (DEPRECATED) <x86-kernel>
Severity: critical CC: nico
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---

Description Moshe Kamensky 2004-02-02 12:00:29 UTC
I was using genkernel 3.0.1_beta9 to compile the kernel. When I tried to boot that kernel, I was getting, in step 6, two lines that said:

/linuxrc: 285: test: not found

and shortly after, the machine would reboot. This happened both with kernel 2.4.22-gentoo-r5 and 2.6.1. 

Reproducible: Always
Steps to Reproduce:
1. genkernel all
2. reboot
3. try to boot the new kernel

Actual Results:  
The machine reboots after step 6

Expected Results:  
Should boot normally

emerge info:
Portage 2.0.50_pre21 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20040117-r0, 2.
System uname: 2.4.22-gentoo-r5 i686 AMD Duron(tm) Processor
Gentoo Base System version
Autoconf: sys-devel/autoconf-2.59
Automake: sys-devel/automake-1.7.8
CFLAGS="-O2 -march=athlon-tbird -funroll-loops -fprefetch-loop-arrays -pipe -fom
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/ /us
r/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/games /etc/gconf /etc/hotplug /etc/sound /etc/ssl /etc
/svgalib /etc/env.d"
CXXFLAGS="-O2 -march=athlon-tbird -funroll-loops -fprefetch-loop-arrays -pipe -f
FEATURES="autoaddcvs buildpkg ccache digest fixpackages sandbox"
GENTOO_MIRRORS=" http://gentoo.
USE="3dnow X aalib aavm acl acpi alsa apache2 apm arts avi berkdb bidi crypt cup
s dga directfb doc encode esd fbcon foomaticdb gdbm gif gnome gpm gtk gtk2 imap 
imlib ipv6 java javascript jbig jikes jpeg kde ldap libg++ libwww mad mbox mikmo
d mmx motif mozilla mpeg mpi multilib ncurses nls nocd nptl offensive oggvorbis 
opengl oss pam pdflib perl plotutils png python qt quicktime readline sdl spell 
sse ssl svga t1lib tcltk tcpd tetex threads tiff truetype type1 unicode usb wmf 
wxwin wxwindows x86 xatrix xml xml2 xmms xv zlib"

I eventually managed to fix it by modifying linuxrc: first, I replaced the test
statements with []. This eliminated the error lines, but the machine still was
rebooting. Then I removed the line that says 'umount /dev', and replaced 'exec
/sbin/init' with the chroot line as in the initrd documentation. This solved the
problem. I don't know which one.
Comment 1 Brad House 2004-02-02 15:51:12 UTC
what coreutils version do you have installed?
This has been reported before, but most people do not see this.
Comment 2 Moshe Kamensky 2004-02-02 21:49:20 UTC
coreutils-5.0.91-r4 (+acl +nls)
Comment 3 Jan Philipp Giel 2004-02-03 15:14:38 UTC
I have the same problems with my Asus M6800N laptop.

It is weird that I cannot boot the 2.6.1-gentoo kernel using root, real_root and init as parameters, but when I only put root=/dev/hda1 and then type /dev/ram0 when the bootscript asks for a boot partition, I can continue booting.

i tried the following kernels:

and i was only able to boot 2.6.1-gentoo successfully.
Comment 4 Philip B Chase 2004-02-05 05:52:25 UTC
A search in Google Groups shows reports of first boot problems like
this starting on January 19th, 2004.  Search for the string "root
block device unspecified on boot" e.g.,

I experienced this on a machine that I built this week according to the GRP (I
did stage 3) except that I did an emerge sync and did not ask emerge
to use local packages.  Two separate install attempts failed this way.  
I warned one of my coworkers about this, he skipped the emerge sync 
and is booting fine.

It seems like an ebuild released in mid-January was flawed.
Comment 5 Jan Philipp Giel 2004-02-05 06:27:20 UTC
I could fix it the way Moshe Kaminsky suggested:
edit linuxrc on the initrd, 
change test to [ and add ] at the end of these lines
remove umount /dev
and change the last line to the chroot way - the author of the script seems to be unsure about how this should be done, look at the comments
Comment 6 Brad House 2004-02-07 07:30:33 UTC
well, I removed 'test' because too many people have reported
this now.  I was told by Weeve that using [ ] on old coreutils
versions did not work, as we've pivot_root'd at that point,
and it uses the executables found on the root filesystem at that
point.  on _beta10 this is changed back to using [ ], so hopefully
we won't see this issue anymore
Comment 7 Moshe Kamensky 2004-02-08 22:28:16 UTC
Well, this removed the previous errors, but now I get:

/linuxrc: 295: cannot open /dev/console: No such file

and right after that (the rather dramatic)

kernel panic: Attempted to kill init!

I still can boot with my version of linuxrc, where the line

umount /dev

(in step 6) is removed, and no ${CMDLINE} in the arguments to init
Comment 8 Brad House 2004-02-09 11:41:43 UTC
sounds like when you installed your OS, you had a bad stage.
There was a bug in some previous stages that did not have a /dev
filesystem filled in with default device nodes.  You must chroot into
your filesystem with the livecd, and   mkdir -p /dev ; MAKEDEV generic
and try again.

Comment 9 Nicolás Echániz 2004-07-03 17:00:03 UTC
I'm having the exact same error as <a href="">#7</a>

Using kernel 2.6.7-r6

Anyone else still experimenting this problem? I wouldn't mark it as fixed.

I tried:
livecd / # mkdir -p /dev ; MAKEDEV generic
and got:
Running MAKEDEV in your root filesystem is a VERY BAD IDEA.

Are you sure this is a good thing to do?

My /dev looks fine, with all the nodes there.

any hints?