Gentoo Archives: gentoo-user

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

Replies

Subject Author
Re: [gentoo-user] Howto erase the "Insert root floppy and press enter" item before the kernel panic? David Relson <relson@×××××××××××××.com>