Gentoo Archives: gentoo-user

From: David Relson <relson@×××××××××××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Howto erase the "Insert root floppy and press enter" item before the kernel panic?
Date: Sat, 11 Oct 2008 12:01:50
Message-Id: 20081011080147.33a1916e@osage.osagesoftware.com
In Reply to: Re: [gentoo-user] Howto erase the "Insert root floppy and press enter" item before the kernel panic? by Andrey Vul
1 On Fri, 10 Oct 2008 23:06:09 -0400
2 Andrey Vul wrote:
3
4 > On Fri, Oct 10, 2008 at 10:33 PM, David Wei <davidwei@×××××××××××.cn>
5 > wrote:
6 > > Sorry, I forgot that file .
7 > > the .config is in the attachment this time.
8 > > Thank you .
9 > >
10 > > On Fri, 10 Oct 2008 10:05:36 -0400
11 > > "Andrey Vul" <andrey.vul@×××××.com> wrote:
12 > >
13 > >> 2008/10/10 David Wei <davidwei@×××××××××××.cn>:
14 > >> > Hi,
15 > >> > I am trying kexec with "kernel panic reboot" cause i have to
16 > >> > manage my server remotely. the "kernel panic
17 > >> > reboot" (http://gentoo-wiki.com/TIP_Kernel_Panic_Reboot) has
18 > >> > beening working so good so far for the regular kernel
19 > >> > panic.However,sometimes when i were missed some file system
20 > >> > items,the booking process would ask me: "VFS: Unable to mount
21 > >> > root fs via NFS,trying floppy Insert root floppy and Press
22 > >> > Enter." And the system hungup there waiting for my Enter. How
23 > >> > can I remove this item from the booting process and panic
24 > >> > directly so that it can reboot? Besides,I want to keep the NFS
25 > >> > service. Thank you in advance.
26 > >> I'm guessing that this is due to the floppy being compiled into the
27 > >> emergency kernel.
28 > >> In any case, can you post your .config for the emergency kernel?
29 > >>
30 >
31 > Nothing in the .config looks suspicious.
32 > It looks like it's inevitable that kernel patching will be needed, at
33 > least, using the preprocessor to "hide" the floppy code.
34 > Try this (it comments out floppy support which happens after NFS
35 > support): comment_floppy.patch
36 > --- init/do_mounts.c 2008-04-16 22:49:44.000000000 -0400
37 > +++ init/do_mounts2.c 2008-10-10 23:03:06.867876561 -0400
38 > @@ -308,7 +308,8 @@
39 > ROOT_DEV = Root_FD0;
40 > }
41 > #endif
42 > -#ifdef CONFIG_BLK_DEV_FD
43 > +/* #ifdef CONFIG_BLK_DEV_FD */
44 > +#if 0
45 > if (MAJOR(ROOT_DEV) == FLOPPY_MAJOR) {
46 > /* rd_doload is 2 for a dual initrd/ramload setup */
47 > if (rd_doload==2) {
48 >
49 > cd to your /usr/src/linux-... and run patch -p0 < comment_floppy.patch
50 > It should fix the _specific_ issue. It might not fix the root cause,
51 > however.
52 >
53 > --
54 > Andrey Vul
55
56 Looking in do_mounts.c, the code that generates the message is:
57
58 #ifdef CONFIG_ROOT_NFS
59 if (MAJOR(ROOT_DEV) == UNNAMED_MAJOR) {
60 if (mount_nfs_root())
61 return;
62
63 printk(KERN_ERR "VFS: Unable to mount root fs via NFS, trying floppy.\n");
64 ROOT_DEV = Root_FD0;
65 }
66 #endif
67
68 Looking at the .config file, I see "CONFIG_ROOT_NFS=y". Since the
69 message is being printed, we know that
70
71 if (MAJOR(ROOT_DEV) == UNNAMED_MAJOR)
72
73 is true which wmeans that the
74
75 if (MAJOR(ROOT_DEV) == FLOPPY_MAJOR)
76
77 is false, i.e. the change to "#if 0" looks to be incorrect.
78
79 Perhaps "CONFIG_ROOT_NFS=y" in .config is the root cause. I'd suggest
80 changing the .config.
81
82 HTH,
83
84 David

Replies