2002-10-14 12:56:12

by Theewara Vorakosit

[permalink] [raw]
Subject: NFS root on 2.4.18-14

Dear All,
I use Red Hat 8.0 and kernel 2.4.18-14, which come from redhat
distribution. I want create a NFS-root kernel to build a diskless linux
using NFS root. I select "IP kernel level configuration-> BOOTP, DHCP",
NFS root support. I boot client using my kernel, it does not requrest for
an IP address. It try to mount NFS root immediately. Do I forget
something?
Thanks,
Theewara



2002-10-14 13:14:03

by Andreas Steinmetz

[permalink] [raw]
Subject: Re: NFS root on 2.4.18-14

diff -rNu linux/net/ipv4/ipconfig.c linux-custom/net/ipv4/ipconfig.c
--- linux/net/ipv4/ipconfig.c 2002-09-27 14:05:32.000000000 +0200
+++ linux-custom/net/ipv4/ipconfig.c 2002-09-27 14:57:01.000000000 +0200
@@ -107,7 +107,7 @@
*/
int ic_set_manually __initdata = 0; /* IPconfig parameters set manually */

-int ic_enable __initdata = 0; /* IP config enabled? */
+int ic_enable __initdata = 1; /* IP config enabled? */

/* Protocol choice */
int ic_proto_enabled __initdata = 0


Attachments:
ip.patch (490.00 B)

2002-10-14 13:41:19

by Wakko Warner

[permalink] [raw]
Subject: Re: NFS root on 2.4.18-14

> > I use Red Hat 8.0 and kernel 2.4.18-14, which come from redhat
> > distribution. I want create a NFS-root kernel to build a diskless linux
> > using NFS root. I select "IP kernel level configuration-> BOOTP, DHCP",
> > NFS root support. I boot client using my kernel, it does not requrest for
> > an IP address. It try to mount NFS root immediately. Do I forget
> > something?
> If you try to boot from a floppy that was created like "dd if=vmlinuz
> of=/dev/fd0" you will need the attached patch. Alan Cox however told me
> that the ability to boot without boot manager (e.g. lilo) will
> eventually go away.

I hope it doesn't. I use it quite frequently at work. It's jsut so much
easier to use than installing a bootloader onto a floppy, mounting, copying
the kernel and so forth.

I did this patch which works for me, but only if root=/dev/nfs It was done
against 2.4.13 or something around there, but it applies with offset to all
newer 2.4 kernels and I believe all 2.5 kernels.

--- net/ipv4/ipconfig-orig.c 2001-11-19 20:48:35.000000000 -0500
+++ net/ipv4/ipconfig.c 2001-11-19 20:56:21.000000000 -0500
@@ -1105,7 +1105,11 @@
proc_net_create("pnp", 0, pnp_get_info);
#endif /* CONFIG_PROC_FS */

- if (!ic_enable)
+ if (!ic_enable
+#if defined(IPCONFIG_DYNAMIC) && defined(CONFIG_ROOT_NFS)
+ && ROOT_DEV != MKDEV(UNNAMED_MAJOR, 255)
+#endif
+ )
return 0;

DBG(("IP-Config: Entered.\n"));


--
Lab tests show that use of micro$oft causes cancer in lab animals

2002-10-14 15:09:43

by Andreas Steinmetz

[permalink] [raw]
Subject: Re: NFS root on 2.4.18-14

Wakko Warner wrote:
> I hope it doesn't. I use it quite frequently at work. It's jsut so much
> easier to use than installing a bootloader onto a floppy, mounting, copying
> the kernel and so forth.
Me too.
Oh, originally I posted my patch to lkml on Tue, 23 Oct 2001 13:20:50.
--
Andreas Steinmetz
D.O.M. Datenverarbeitung GmbH

2002-10-14 15:37:57

by Mr. James W. Laferriere

[permalink] [raw]
Subject: Re: NFS root on 2.4.18-14


Hello Andreas & All , I have to third that request that directly
bootable kernel floppies not go the way of staticly built kernels
and the dodo bird . JimL

On Mon, 14 Oct 2002, Andreas Steinmetz wrote:
> Wakko Warner wrote:
> > I hope it doesn't. I use it quite frequently at work. It's jsut so much
> > easier to use than installing a bootloader onto a floppy, mounting, copying
> > the kernel and so forth.
> Me too.
> Oh, originally I posted my patch to lkml on Tue, 23 Oct 2001 13:20:50.
> --
> Andreas Steinmetz
> D.O.M. Datenverarbeitung GmbH
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>

+------------------------------------------------------------------+
| James W. Laferriere | System Techniques | Give me VMS |
| Network Engineer | P.O. Box 854 | Give me Linux |
| [email protected] | Coudersport PA 16915 | only on AXP |
+------------------------------------------------------------------+

2002-10-14 17:49:41

by Samuel Flory

[permalink] [raw]
Subject: Re: NFS root on 2.4.18-14

Theewara Vorakosit wrote:

>Dear All,
> I use Red Hat 8.0 and kernel 2.4.18-14, which come from redhat
>distribution. I want create a NFS-root kernel to build a diskless linux
>using NFS root. I select "IP kernel level configuration-> BOOTP, DHCP",
>NFS root support. I boot client using my kernel, it does not requrest for
>an IP address. It try to mount NFS root immediately. Do I forget
>something?
>Thanks,
>Theewara
>
>
>
You need to give the kernel instructions to use dhcp. I've always
found this works:

ip=::::::dhcp nfsroot=192.168.1.5:/vol0/nfs/root/10.01