FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo User

 
 
LinkBack Thread Tools
 
Old 10-10-2008, 08:34 AM
David Wei
 
Default Howto erase the "Insert root floppy and press enter" item before the kernel panic?

Hi,
I am trying kexec with "kernel panic reboot" cause i have to manage my server remotely.
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:
"VFS: Unable to mount root fs via NFS,trying floppy
Insert root floppy and Press Enter."
And the system hungup there waiting for my Enter.
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.
Thank you in advance.

-------------------------------
*亮 David Wei

您可以通过下面的方式和我联系:
MSN: inadavid@hotmail.com
Gtalk: inadavid@gmail.com
Email: davidwei@newbread.tj.cn
 
Old 10-10-2008, 02:05 PM
"Andrey Vul"
 
Default Howto erase the "Insert root floppy and press enter" item before the kernel panic?

2008/10/10 David Wei <davidwei@newbread.tj.cn>:
> Hi,
> I am trying kexec with "kernel panic reboot" cause i have to manage my server remotely.
> 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:
> "VFS: Unable to mount root fs via NFS,trying floppy
> Insert root floppy and Press Enter."
> And the system hungup there waiting for my Enter.
> 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.
> Thank you in advance.
I'm guessing that this is due to the floppy being compiled into the
emergency kernel.
In any case, can you post your .config for the emergency kernel?

--
Andrey Vul

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
 
Old 10-11-2008, 02:33 AM
David Wei
 
Default Howto erase the "Insert root floppy and press enter" item before the kernel panic?

Sorry, I forgot that file .
the .config is in the attachment this time.
Thank you .

On Fri, 10 Oct 2008 10:05:36 -0400
"Andrey Vul" <andrey.vul@gmail.com> wrote:

> 2008/10/10 David Wei <davidwei@newbread.tj.cn>:
> > Hi,
> > I am trying kexec with "kernel panic reboot" cause i have to manage my server remotely.
> > 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:
> > "VFS: Unable to mount root fs via NFS,trying floppy
> > Insert root floppy and Press Enter."
> > And the system hungup there waiting for my Enter.
> > 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.
> > Thank you in advance.
> I'm guessing that this is due to the floppy being compiled into the
> emergency kernel.
> In any case, can you post your .config for the emergency kernel?
>
> --
> Andrey Vul
>
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
>


-------------------------------
*亮 David Wei

您可以通过下面的方式和我联系:
MSN: inadavid@hotmail.com
Gtalk: inadavid@gmail.com
Email: davidwei@newbread.tj.cn
 
Old 10-11-2008, 03:06 AM
"Andrey Vul"
 
Default Howto erase the "Insert root floppy and press enter" item before the kernel panic?

On Fri, Oct 10, 2008 at 10:33 PM, David Wei <davidwei@newbread.tj.cn> wrote:
> Sorry, I forgot that file .
> the .config is in the attachment this time.
> Thank you .
>
> On Fri, 10 Oct 2008 10:05:36 -0400
> "Andrey Vul" <andrey.vul@gmail.com> wrote:
>
>> 2008/10/10 David Wei <davidwei@newbread.tj.cn>:
>> > Hi,
>> > I am trying kexec with "kernel panic reboot" cause i have to manage my server remotely.
>> > 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:
>> > "VFS: Unable to mount root fs via NFS,trying floppy
>> > Insert root floppy and Press Enter."
>> > And the system hungup there waiting for my Enter.
>> > 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.
>> > Thank you in advance.
>> I'm guessing that this is due to the floppy being compiled into the
>> emergency kernel.
>> In any case, can you post your .config for the emergency kernel?
>>

Nothing in the .config looks suspicious.
It looks like it's inevitable that kernel patching will be needed, at
least, using the preprocessor to "hide" the floppy code.
Try this (it comments out floppy support which happens after NFS support):
comment_floppy.patch
--- init/do_mounts.c 2008-04-16 22:49:44.000000000 -0400
+++ init/do_mounts2.c 2008-10-10 23:03:06.867876561 -0400
@@ -308,7 +308,8 @@
ROOT_DEV = Root_FD0;
}
#endif
-#ifdef CONFIG_BLK_DEV_FD
+/* #ifdef CONFIG_BLK_DEV_FD */
+#if 0
if (MAJOR(ROOT_DEV) == FLOPPY_MAJOR) {
/* rd_doload is 2 for a dual initrd/ramload setup */
if (rd_doload==2) {

cd to your /usr/src/linux-... and run patch -p0 < comment_floppy.patch
It should fix the _specific_ issue. It might not fix the root cause, however.

--
Andrey Vul

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
 
Old 10-11-2008, 04:00 AM
David Wei
 
Default Howto erase the "Insert root floppy and press enter" item before the kernel panic?

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?

Thanks again!!

On Fri, 10 Oct 2008 23:06:09 -0400
"Andrey Vul" <andrey.vul@gmail.com> wrote:

> On Fri, Oct 10, 2008 at 10:33 PM, David Wei <davidwei@newbread.tj.cn> wrote:
> > Sorry, I forgot that file .
> > the .config is in the attachment this time.
> > Thank you .
> >
> > On Fri, 10 Oct 2008 10:05:36 -0400
> > "Andrey Vul" <andrey.vul@gmail.com> wrote:
> >
> >> 2008/10/10 David Wei <davidwei@newbread.tj.cn>:
> >> > Hi,
> >> > I am trying kexec with "kernel panic reboot" cause i have to manage my server remotely.
> >> > 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:
> >> > "VFS: Unable to mount root fs via NFS,trying floppy
> >> > Insert root floppy and Press Enter."
> >> > And the system hungup there waiting for my Enter.
> >> > 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.
> >> > Thank you in advance.
> >> I'm guessing that this is due to the floppy being compiled into the
> >> emergency kernel.
> >> In any case, can you post your .config for the emergency kernel?
> >>
>
> Nothing in the .config looks suspicious.
> It looks like it's inevitable that kernel patching will be needed, at
> least, using the preprocessor to "hide" the floppy code.
> Try this (it comments out floppy support which happens after NFS support):
> comment_floppy.patch
> --- init/do_mounts.c 2008-04-16 22:49:44.000000000 -0400
> +++ init/do_mounts2.c 2008-10-10 23:03:06.867876561 -0400
> @@ -308,7 +308,8 @@
> ROOT_DEV = Root_FD0;
> }
> #endif
> -#ifdef CONFIG_BLK_DEV_FD
> +/* #ifdef CONFIG_BLK_DEV_FD */
> +#if 0
> if (MAJOR(ROOT_DEV) == FLOPPY_MAJOR) {
> /* rd_doload is 2 for a dual initrd/ramload setup */
> if (rd_doload==2) {
>
> cd to your /usr/src/linux-... and run patch -p0 < comment_floppy.patch
> It should fix the _specific_ issue. It might not fix the root cause, however.
>
> --
> Andrey Vul
>
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?
>


-------------------------------
*亮 David Wei

您可以通过下面的方式和我联系:
MSN: inadavid@hotmail.com
Gtalk: inadavid@gmail.com
Email: davidwei@newbread.tj.cn
 
Old 10-11-2008, 06:08 AM
"Andrey Vul"
 
Default Howto erase the "Insert root floppy and press enter" item before the kernel panic?

On Sat, Oct 11, 2008 at 12:00 AM, David Wei <davidwei@newbread.tj.cn> wrote:
> 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?
>
You can use the floppy drive, but the kernel cannot run init / use
initrd from a floppy (i.e. you are not allowed to use root=/dev/fd0 or
initrd=/dev/fd0). This is because the floppy is fallback code if the
NFS mount of / fails.

But this is Gentoo, you make your own kernel (hopefully), and never
have to worry about initrd.

/ and /dev/root are used interchangeably, for readabilty, similar to /
and /dev/hdaX.

All I did was comment out the floppy fallback code.

This is how mount_root was originally written:
If CONFIG_ROOT_NFS is defined
If root device is NFS
If the NFS root mounted
Return
Print message "VFS: Unable to mount root fs via NFS, trying floppy.
"
Set root device as floppy disk 0
If CONFIG_BLK_DEV_FD (floppy disk) is defined
If the root device is a floppy
If dual initrd/ramload is enabled
If the first partition of the ramdisk image could be
loaded into memory
Set the root device as a ramdisk
Set the root device name as null
Else
Prompt for root floppy
If CONFIG_BLOCK is defined
Create a device named "/dev/root" with the major & minor modes
equal to the root device
Mount "/dev/root" with root device mountflags

If you want more detail, you should post to lkml.

All I have done was replace the following line:
If CONFIG_BLK_DEV_FD (floppy disk) is defined
with
If false

}
> Thanks again!!
No problem.
In reality, the fix was simple.
All I did was grep the source tree for the exact string (grep -R "VFS:
Unable to mount root fs via NFS, trying floppy" .
)
Then open up vim (or emacs or nano), find the line, and add an #if 0
... #endif block where needed.
>
> On Fri, 10 Oct 2008 23:06:09 -0400
> "Andrey Vul" <andrey.vul@gmail.com> wrote:
>
>> On Fri, Oct 10, 2008 at 10:33 PM, David Wei <davidwei@newbread.tj.cn> wrote:
>> > Sorry, I forgot that file .
>> > the .config is in the attachment this time.
>> > Thank you .
>> >
>> > On Fri, 10 Oct 2008 10:05:36 -0400
>> > "Andrey Vul" <andrey.vul@gmail.com> wrote:
>> >
>> >> 2008/10/10 David Wei <davidwei@newbread.tj.cn>:
>> >> > Hi,
>> >> > I am trying kexec with "kernel panic reboot" cause i have to manage my server remotely.
>> >> > 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:
>> >> > "VFS: Unable to mount root fs via NFS,trying floppy
>> >> > Insert root floppy and Press Enter."
>> >> > And the system hungup there waiting for my Enter.
>> >> > 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.
>> >> > Thank you in advance.
>> >> I'm guessing that this is due to the floppy being compiled into the
>> >> emergency kernel.
>> >> In any case, can you post your .config for the emergency kernel?
>> >>
>>
>> Nothing in the .config looks suspicious.
>> It looks like it's inevitable that kernel patching will be needed, at
>> least, using the preprocessor to "hide" the floppy code.
>> Try this (it comments out floppy support which happens after NFS support):
>> comment_floppy.patch
>> --- init/do_mounts.c 2008-04-16 22:49:44.000000000 -0400
>> +++ init/do_mounts2.c 2008-10-10 23:03:06.867876561 -0400
>> @@ -308,7 +308,8 @@
>> ROOT_DEV = Root_FD0;
>> }
>> #endif
>> -#ifdef CONFIG_BLK_DEV_FD
>> +/* #ifdef CONFIG_BLK_DEV_FD */
>> +#if 0
>> if (MAJOR(ROOT_DEV) == FLOPPY_MAJOR) {
>> /* rd_doload is 2 for a dual initrd/ramload setup */
>> if (rd_doload==2) {
>>
>> cd to your /usr/src/linux-... and run patch -p0 < comment_floppy.patch
>> It should fix the _specific_ issue. It might not fix the root cause, however.
>>
>> --
>> Andrey Vul
>>
>> A: Because it messes up the order in which people normally read text.
>> Q: Why is top-posting such a bad thing?
>> A: Top-posting.
>> Q: What is the most annoying thing in e-mail?
>>
>
>
> -------------------------------
> *亮 David Wei
>
> 您可以通过下面的方式和我联系:
> MSN: inadavid@hotmail.com
> Gtalk: inadavid@gmail.com
> Email: davidwei@newbread.tj.cn
>
>



--
Andrey Vul

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
 
Old 10-11-2008, 06:30 AM
David Wei
 
Default Howto erase the "Insert root floppy and press enter" item before the kernel panic?

I'm gonna do that next time before I post here.
thanks Andrey.

On Sat, 11 Oct 2008 02:08:56 -0400
"Andrey Vul" <andrey.vul@gmail.com> wrote:

> On Sat, Oct 11, 2008 at 12:00 AM, David Wei <davidwei@newbread.tj.cn> wrote:
> > 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?
> >
> You can use the floppy drive, but the kernel cannot run init / use
> initrd from a floppy (i.e. you are not allowed to use root=/dev/fd0 or
> initrd=/dev/fd0). This is because the floppy is fallback code if the
> NFS mount of / fails.
>
> But this is Gentoo, you make your own kernel (hopefully), and never
> have to worry about initrd.
>
> / and /dev/root are used interchangeably, for readabilty, similar to /
> and /dev/hdaX.
>
> All I did was comment out the floppy fallback code.
>
> This is how mount_root was originally written:
> If CONFIG_ROOT_NFS is defined
> If root device is NFS
> If the NFS root mounted
> Return
> Print message "VFS: Unable to mount root fs via NFS, trying floppy.
"
> Set root device as floppy disk 0
> If CONFIG_BLK_DEV_FD (floppy disk) is defined
> If the root device is a floppy
> If dual initrd/ramload is enabled
> If the first partition of the ramdisk image could be
> loaded into memory
> Set the root device as a ramdisk
> Set the root device name as null
> Else
> Prompt for root floppy
> If CONFIG_BLOCK is defined
> Create a device named "/dev/root" with the major & minor modes
> equal to the root device
> Mount "/dev/root" with root device mountflags
>
> If you want more detail, you should post to lkml.
>
> All I have done was replace the following line:
> If CONFIG_BLK_DEV_FD (floppy disk) is defined
> with
> If false
>
> }
> > Thanks again!!
> No problem.
> In reality, the fix was simple.
> All I did was grep the source tree for the exact string (grep -R "VFS:
> Unable to mount root fs via NFS, trying floppy" .
> )
> Then open up vim (or emacs or nano), find the line, and add an #if 0
> ... #endif block where needed.
> >
> > On Fri, 10 Oct 2008 23:06:09 -0400
> > "Andrey Vul" <andrey.vul@gmail.com> wrote:
> >
> >> On Fri, Oct 10, 2008 at 10:33 PM, David Wei <davidwei@newbread.tj.cn> wrote:
> >> > Sorry, I forgot that file .
> >> > the .config is in the attachment this time.
> >> > Thank you .
> >> >
> >> > On Fri, 10 Oct 2008 10:05:36 -0400
> >> > "Andrey Vul" <andrey.vul@gmail.com> wrote:
> >> >
> >> >> 2008/10/10 David Wei <davidwei@newbread.tj.cn>:
> >> >> > Hi,
> >> >> > I am trying kexec with "kernel panic reboot" cause i have to manage my server remotely.
> >> >> > 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:
> >> >> > "VFS: Unable to mount root fs via NFS,trying floppy
> >> >> > Insert root floppy and Press Enter."
> >> >> > And the system hungup there waiting for my Enter.
> >> >> > 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.
> >> >> > Thank you in advance.
> >> >> I'm guessing that this is due to the floppy being compiled into the
> >> >> emergency kernel.
> >> >> In any case, can you post your .config for the emergency kernel?
> >> >>
> >>
> >> Nothing in the .config looks suspicious.
> >> It looks like it's inevitable that kernel patching will be needed, at
> >> least, using the preprocessor to "hide" the floppy code.
> >> Try this (it comments out floppy support which happens after NFS support):
> >> comment_floppy.patch
> >> --- init/do_mounts.c 2008-04-16 22:49:44.000000000 -0400
> >> +++ init/do_mounts2.c 2008-10-10 23:03:06.867876561 -0400
> >> @@ -308,7 +308,8 @@
> >> ROOT_DEV = Root_FD0;
> >> }
> >> #endif
> >> -#ifdef CONFIG_BLK_DEV_FD
> >> +/* #ifdef CONFIG_BLK_DEV_FD */
> >> +#if 0
> >> if (MAJOR(ROOT_DEV) == FLOPPY_MAJOR) {
> >> /* rd_doload is 2 for a dual initrd/ramload setup */
> >> if (rd_doload==2) {
> >>
> >> cd to your /usr/src/linux-... and run patch -p0 < comment_floppy.patch
> >> It should fix the _specific_ issue. It might not fix the root cause, however.
> >>
> >> --
> >> Andrey Vul
> >>
> >> A: Because it messes up the order in which people normally read text.
> >> Q: Why is top-posting such a bad thing?
> >> A: Top-posting.
> >> Q: What is the most annoying thing in e-mail?
> >>
> >
> >
> > -------------------------------
> > *亮 David Wei
> >
> > 您可以通过下面的方式和我联系:
> > MSN: inadavid@hotmail.com
> > Gtalk: inadavid@gmail.com
> > Email: davidwei@newbread.tj.cn
> >
> >
>
>
>
> --
> Andrey Vul
>
> A: Because it messes up the order in which people normally read text.
> Q: Why is top-posting such a bad thing?
> A: Top-posting.
> Q: What is the most annoying thing in e-mail?


-------------------------------
*亮 David Wei

您可以通过下面的方式和我联系:
MSN: inadavid@hotmail.com
Gtalk: inadavid@gmail.com
Email: davidwei@newbread.tj.cn
 
Old 10-11-2008, 12:01 PM
David Relson
 
Default Howto erase the "Insert root floppy and press enter" item before the kernel panic?

On Fri, 10 Oct 2008 23:06:09 -0400
Andrey Vul wrote:

> On Fri, Oct 10, 2008 at 10:33 PM, David Wei <davidwei@newbread.tj.cn>
> wrote:
> > Sorry, I forgot that file .
> > the .config is in the attachment this time.
> > Thank you .
> >
> > On Fri, 10 Oct 2008 10:05:36 -0400
> > "Andrey Vul" <andrey.vul@gmail.com> wrote:
> >
> >> 2008/10/10 David Wei <davidwei@newbread.tj.cn>:
> >> > Hi,
> >> > I am trying kexec with "kernel panic reboot" cause i have to
> >> > manage my server remotely. 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: "VFS: Unable to mount
> >> > root fs via NFS,trying floppy Insert root floppy and Press
> >> > Enter." And the system hungup there waiting for my Enter. 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. Thank you in advance.
> >> I'm guessing that this is due to the floppy being compiled into the
> >> emergency kernel.
> >> In any case, can you post your .config for the emergency kernel?
> >>
>
> Nothing in the .config looks suspicious.
> It looks like it's inevitable that kernel patching will be needed, at
> least, using the preprocessor to "hide" the floppy code.
> Try this (it comments out floppy support which happens after NFS
> support): comment_floppy.patch
> --- init/do_mounts.c 2008-04-16 22:49:44.000000000 -0400
> +++ init/do_mounts2.c 2008-10-10 23:03:06.867876561 -0400
> @@ -308,7 +308,8 @@
> ROOT_DEV = Root_FD0;
> }
> #endif
> -#ifdef CONFIG_BLK_DEV_FD
> +/* #ifdef CONFIG_BLK_DEV_FD */
> +#if 0
> if (MAJOR(ROOT_DEV) == FLOPPY_MAJOR) {
> /* rd_doload is 2 for a dual initrd/ramload setup */
> if (rd_doload==2) {
>
> cd to your /usr/src/linux-... and run patch -p0 < comment_floppy.patch
> It should fix the _specific_ issue. It might not fix the root cause,
> however.
>
> --
> Andrey Vul

Looking in do_mounts.c, the code that generates the message is:

#ifdef CONFIG_ROOT_NFS
if (MAJOR(ROOT_DEV) == UNNAMED_MAJOR) {
if (mount_nfs_root())
return;

printk(KERN_ERR "VFS: Unable to mount root fs via NFS, trying floppy.
");
ROOT_DEV = Root_FD0;
}
#endif

Looking at the .config file, I see "CONFIG_ROOT_NFS=y". Since the
message is being printed, we know that

if (MAJOR(ROOT_DEV) == UNNAMED_MAJOR)

is true which wmeans that the

if (MAJOR(ROOT_DEV) == FLOPPY_MAJOR)

is false, i.e. the change to "#if 0" looks to be incorrect.

Perhaps "CONFIG_ROOT_NFS=y" in .config is the root cause. I'd suggest
changing the .config.

HTH,

David
 
Old 10-11-2008, 05:23 PM
"Andrey Vul"
 
Default Howto erase the "Insert root floppy and press enter" item before the kernel panic?

On Sat, Oct 11, 2008 at 8:01 AM, David Relson <relson@osagesoftware.com> wrote:
> On Fri, 10 Oct 2008 23:06:09 -0400
> Andrey Vul wrote:
>
>> On Fri, Oct 10, 2008 at 10:33 PM, David Wei <davidwei@newbread.tj.cn>
>> wrote:
>> > Sorry, I forgot that file .
>> > the .config is in the attachment this time.
>> > Thank you .
>> >
>> > On Fri, 10 Oct 2008 10:05:36 -0400
>> > "Andrey Vul" <andrey.vul@gmail.com> wrote:
>> >
>> >> 2008/10/10 David Wei <davidwei@newbread.tj.cn>:
>> >> > Hi,
>> >> > I am trying kexec with "kernel panic reboot" cause i have to
>> >> > manage my server remotely. 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: "VFS: Unable to mount
>> >> > root fs via NFS,trying floppy Insert root floppy and Press
>> >> > Enter." And the system hungup there waiting for my Enter. 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. Thank you in advance.
>> >> I'm guessing that this is due to the floppy being compiled into the
>> >> emergency kernel.
>> >> In any case, can you post your .config for the emergency kernel?
>> >>
>>
>> Nothing in the .config looks suspicious.
>> It looks like it's inevitable that kernel patching will be needed, at
>> least, using the preprocessor to "hide" the floppy code.
>> Try this (it comments out floppy support which happens after NFS
>> support): comment_floppy.patch
>> --- init/do_mounts.c 2008-04-16 22:49:44.000000000 -0400
>> +++ init/do_mounts2.c 2008-10-10 23:03:06.867876561 -0400
>> @@ -308,7 +308,8 @@
>> ROOT_DEV = Root_FD0;
>> }
>> #endif
>> -#ifdef CONFIG_BLK_DEV_FD
>> +/* #ifdef CONFIG_BLK_DEV_FD */
>> +#if 0
>> if (MAJOR(ROOT_DEV) == FLOPPY_MAJOR) {
>> /* rd_doload is 2 for a dual initrd/ramload setup */
>> if (rd_doload==2) {
>>
>> cd to your /usr/src/linux-... and run patch -p0 < comment_floppy.patch
>> It should fix the _specific_ issue. It might not fix the root cause,
>> however.
>>
>> --
>> Andrey Vul
>
> Looking in do_mounts.c, the code that generates the message is:
>
> #ifdef CONFIG_ROOT_NFS
> if (MAJOR(ROOT_DEV) == UNNAMED_MAJOR) {
> if (mount_nfs_root())
> return;
>
> printk(KERN_ERR "VFS: Unable to mount root fs via NFS, trying floppy.
");
> ROOT_DEV = Root_FD0;
> }
> #endif
>
> Looking at the .config file, I see "CONFIG_ROOT_NFS=y". Since the
> message is being printed, we know that
>
> if (MAJOR(ROOT_DEV) == UNNAMED_MAJOR)
>
> is true which wmeans that the
>
> if (MAJOR(ROOT_DEV) == FLOPPY_MAJOR)
>
> is false, i.e. the change to "#if 0" looks to be incorrect.
>
> Perhaps "CONFIG_ROOT_NFS=y" in .config is the root cause. I'd suggest
> changing the .config.
He has explicity mentioned that his root device is NFS. You have
misinterpreted the code. The floppy event only occurs *if*
mount_nfs_root() failed.
It's false from the start, but becomes true when NFS mount-root failed.



--
Andrey Vul

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
 
Old 10-12-2008, 12:21 AM
David Relson
 
Default Howto erase the "Insert root floppy and press enter" item before the kernel panic?

On Sat, 11 Oct 2008 13:23:10 -0400
Andrey Vul wrote:

> On Sat, Oct 11, 2008 at 8:01 AM, David Relson
> <relson@osagesoftware.com> wrote:
> > On Fri, 10 Oct 2008 23:06:09 -0400
> > Andrey Vul wrote:
> >
> >> On Fri, Oct 10, 2008 at 10:33 PM, David Wei
> >> <davidwei@newbread.tj.cn> wrote:
> >> > Sorry, I forgot that file .
> >> > the .config is in the attachment this time.
> >> > Thank you .
> >> >
> >> > On Fri, 10 Oct 2008 10:05:36 -0400
> >> > "Andrey Vul" <andrey.vul@gmail.com> wrote:
> >> >
> >> >> 2008/10/10 David Wei <davidwei@newbread.tj.cn>:
> >> >> > Hi,
> >> >> > I am trying kexec with "kernel panic reboot" cause i have to
> >> >> > manage my server remotely. 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: "VFS: Unable to mount
> >> >> > root fs via NFS,trying floppy Insert root floppy and Press
> >> >> > Enter." And the system hungup there waiting for my Enter. 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. Thank you in advance.
> >> >> I'm guessing that this is due to the floppy being compiled into
> >> >> the emergency kernel.
> >> >> In any case, can you post your .config for the emergency kernel?
> >> >>
> >>
> >> Nothing in the .config looks suspicious.
> >> It looks like it's inevitable that kernel patching will be needed,
> >> at least, using the preprocessor to "hide" the floppy code.
> >> Try this (it comments out floppy support which happens after NFS
> >> support): comment_floppy.patch
> >> --- init/do_mounts.c 2008-04-16 22:49:44.000000000 -0400
> >> +++ init/do_mounts2.c 2008-10-10 23:03:06.867876561 -0400
> >> @@ -308,7 +308,8 @@
> >> ROOT_DEV = Root_FD0;
> >> }
> >> #endif
> >> -#ifdef CONFIG_BLK_DEV_FD
> >> +/* #ifdef CONFIG_BLK_DEV_FD */
> >> +#if 0
> >> if (MAJOR(ROOT_DEV) == FLOPPY_MAJOR) {
> >> /* rd_doload is 2 for a dual initrd/ramload setup
> >> */ if (rd_doload==2) {
> >>
> >> cd to your /usr/src/linux-... and run patch -p0 <
> >> comment_floppy.patch It should fix the _specific_ issue. It might
> >> not fix the root cause, however.
> >>
> >> --
> >> Andrey Vul
> >
> > Looking in do_mounts.c, the code that generates the message is:
> >
> > #ifdef CONFIG_ROOT_NFS
> > if (MAJOR(ROOT_DEV) == UNNAMED_MAJOR) {
> > if (mount_nfs_root())
> > return;
> >
> > printk(KERN_ERR "VFS: Unable to mount root fs via NFS, trying
> > floppy.
"); ROOT_DEV = Root_FD0;
> > }
> > #endif
> >
> > Looking at the .config file, I see "CONFIG_ROOT_NFS=y". Since the
> > message is being printed, we know that
> >
> > if (MAJOR(ROOT_DEV) == UNNAMED_MAJOR)
> >
> > is true which wmeans that the
> >
> > if (MAJOR(ROOT_DEV) == FLOPPY_MAJOR)
> >
> > is false, i.e. the change to "#if 0" looks to be incorrect.
> >
> > Perhaps "CONFIG_ROOT_NFS=y" in .config is the root cause. I'd
> > suggest changing the .config.
> He has explicity mentioned that his root device is NFS. You have
> misinterpreted the code. The floppy event only occurs *if*
> mount_nfs_root() failed.
> It's false from the start, but becomes true when NFS mount-root
> failed.

You are correct. I hadn't re-read the orginal post and didn't know the
use of NFS and I didn't look deeply enough into the code to learn that
Root_FD0 relates to FLOPPY_MAJOR.
 

Thread Tools




All times are GMT. The time now is 10:12 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org