1 |
I'm gonna do that next time before I post here. |
2 |
thanks Andrey. |
3 |
|
4 |
On Sat, 11 Oct 2008 02:08:56 -0400 |
5 |
"Andrey Vul" <andrey.vul@×××××.com> wrote: |
6 |
|
7 |
> On Sat, Oct 11, 2008 at 12:00 AM, David Wei <davidwei@×××××××××××.cn> wrote: |
8 |
> > Thanks Andrey, that patch works , my test kernel dose not ask for the floppy before the panic. Just by the way,dose that mean I cannot use floppy drive on this box? |
9 |
> > |
10 |
> You can use the floppy drive, but the kernel cannot run init / use |
11 |
> initrd from a floppy (i.e. you are not allowed to use root=/dev/fd0 or |
12 |
> initrd=/dev/fd0). This is because the floppy is fallback code if the |
13 |
> NFS mount of / fails. |
14 |
> |
15 |
> But this is Gentoo, you make your own kernel (hopefully), and never |
16 |
> have to worry about initrd. |
17 |
> |
18 |
> / and /dev/root are used interchangeably, for readabilty, similar to / |
19 |
> and /dev/hdaX. |
20 |
> |
21 |
> All I did was comment out the floppy fallback code. |
22 |
> |
23 |
> This is how mount_root was originally written: |
24 |
> If CONFIG_ROOT_NFS is defined |
25 |
> If root device is NFS |
26 |
> If the NFS root mounted |
27 |
> Return |
28 |
> Print message "VFS: Unable to mount root fs via NFS, trying floppy.\n" |
29 |
> Set root device as floppy disk 0 |
30 |
> If CONFIG_BLK_DEV_FD (floppy disk) is defined |
31 |
> If the root device is a floppy |
32 |
> If dual initrd/ramload is enabled |
33 |
> If the first partition of the ramdisk image could be |
34 |
> loaded into memory |
35 |
> Set the root device as a ramdisk |
36 |
> Set the root device name as null |
37 |
> Else |
38 |
> Prompt for root floppy |
39 |
> If CONFIG_BLOCK is defined |
40 |
> Create a device named "/dev/root" with the major & minor modes |
41 |
> equal to the root device |
42 |
> Mount "/dev/root" with root device mountflags |
43 |
> |
44 |
> If you want more detail, you should post to lkml. |
45 |
> |
46 |
> All I have done was replace the following line: |
47 |
> If CONFIG_BLK_DEV_FD (floppy disk) is defined |
48 |
> with |
49 |
> If false |
50 |
> |
51 |
> } |
52 |
> > Thanks again!! |
53 |
> No problem. |
54 |
> In reality, the fix was simple. |
55 |
> All I did was grep the source tree for the exact string (grep -R "VFS: |
56 |
> Unable to mount root fs via NFS, trying floppy" . |
57 |
> ) |
58 |
> Then open up vim (or emacs or nano), find the line, and add an #if 0 |
59 |
> ... #endif block where needed. |
60 |
> > |
61 |
> > On Fri, 10 Oct 2008 23:06:09 -0400 |
62 |
> > "Andrey Vul" <andrey.vul@×××××.com> wrote: |
63 |
> > |
64 |
> >> On Fri, Oct 10, 2008 at 10:33 PM, David Wei <davidwei@×××××××××××.cn> wrote: |
65 |
> >> > Sorry, I forgot that file . |
66 |
> >> > the .config is in the attachment this time. |
67 |
> >> > Thank you . |
68 |
> >> > |
69 |
> >> > On Fri, 10 Oct 2008 10:05:36 -0400 |
70 |
> >> > "Andrey Vul" <andrey.vul@×××××.com> wrote: |
71 |
> >> > |
72 |
> >> >> 2008/10/10 David Wei <davidwei@×××××××××××.cn>: |
73 |
> >> >> > Hi, |
74 |
> >> >> > I am trying kexec with "kernel panic reboot" cause i have to manage my server remotely. |
75 |
> >> >> > the "kernel panic reboot" (http://gentoo-wiki.com/TIP_Kernel_Panic_Reboot) has beening working so good so far for the regular kernel panic.However,sometimes when i were missed some file system items,the booking process would ask me: |
76 |
> >> >> > "VFS: Unable to mount root fs via NFS,trying floppy |
77 |
> >> >> > Insert root floppy and Press Enter." |
78 |
> >> >> > And the system hungup there waiting for my Enter. |
79 |
> >> >> > How can I remove this item from the booting process and panic directly so that it can reboot? Besides,I want to keep the NFS service. |
80 |
> >> >> > Thank you in advance. |
81 |
> >> >> I'm guessing that this is due to the floppy being compiled into the |
82 |
> >> >> emergency kernel. |
83 |
> >> >> In any case, can you post your .config for the emergency kernel? |
84 |
> >> >> |
85 |
> >> |
86 |
> >> Nothing in the .config looks suspicious. |
87 |
> >> It looks like it's inevitable that kernel patching will be needed, at |
88 |
> >> least, using the preprocessor to "hide" the floppy code. |
89 |
> >> Try this (it comments out floppy support which happens after NFS support): |
90 |
> >> comment_floppy.patch |
91 |
> >> --- init/do_mounts.c 2008-04-16 22:49:44.000000000 -0400 |
92 |
> >> +++ init/do_mounts2.c 2008-10-10 23:03:06.867876561 -0400 |
93 |
> >> @@ -308,7 +308,8 @@ |
94 |
> >> ROOT_DEV = Root_FD0; |
95 |
> >> } |
96 |
> >> #endif |
97 |
> >> -#ifdef CONFIG_BLK_DEV_FD |
98 |
> >> +/* #ifdef CONFIG_BLK_DEV_FD */ |
99 |
> >> +#if 0 |
100 |
> >> if (MAJOR(ROOT_DEV) == FLOPPY_MAJOR) { |
101 |
> >> /* rd_doload is 2 for a dual initrd/ramload setup */ |
102 |
> >> if (rd_doload==2) { |
103 |
> >> |
104 |
> >> cd to your /usr/src/linux-... and run patch -p0 < comment_floppy.patch |
105 |
> >> It should fix the _specific_ issue. It might not fix the root cause, however. |
106 |
> >> |
107 |
> >> -- |
108 |
> >> Andrey Vul |
109 |
> >> |
110 |
> >> A: Because it messes up the order in which people normally read text. |
111 |
> >> Q: Why is top-posting such a bad thing? |
112 |
> >> A: Top-posting. |
113 |
> >> Q: What is the most annoying thing in e-mail? |
114 |
> >> |
115 |
> > |
116 |
> > |
117 |
> > ------------------------------- |
118 |
> > 魏亮 David Wei |
119 |
> > |
120 |
> > 您可以通过下面的方式和我联系: |
121 |
> > MSN: inadavid@×××××××.com |
122 |
> > Gtalk: inadavid@×××××.com |
123 |
> > Email: davidwei@×××××××××××.cn |
124 |
> > |
125 |
> > |
126 |
> |
127 |
> |
128 |
> |
129 |
> -- |
130 |
> Andrey Vul |
131 |
> |
132 |
> A: Because it messes up the order in which people normally read text. |
133 |
> Q: Why is top-posting such a bad thing? |
134 |
> A: Top-posting. |
135 |
> Q: What is the most annoying thing in e-mail? |
136 |
|
137 |
|
138 |
------------------------------- |
139 |
魏亮 David Wei |
140 |
|
141 |
您可以通过下面的方式和我联系: |
142 |
MSN: inadavid@×××××××.com |
143 |
Gtalk: inadavid@×××××.com |
144 |
Email: davidwei@×××××××××××.cn |