public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] make nfsroot accept server addresses from BOOTP root
@ 2001-02-19 23:12 Ben LaHaise
  2001-02-20 17:44 ` Tom Rini
  0 siblings, 1 reply; 6+ messages in thread
From: Ben LaHaise @ 2001-02-19 23:12 UTC (permalink / raw)
  To: linux-kernel; +Cc: alan

Hello,

Here's a handy little patch that makes the kernel parse out the ip
address of the nfs server from the bootp root path.  Otherwise it's
impossible to boot the kernel without command line options on diskless
workstations (I hate RPL).

		-ben

diff -ur v2.4.1-ac18/fs/nfs/nfsroot.c work/fs/nfs/nfsroot.c
--- v2.4.1-ac18/fs/nfs/nfsroot.c	Mon Sep 25 16:13:53 2000
+++ work/fs/nfs/nfsroot.c	Mon Feb 19 18:05:24 2001
@@ -224,8 +224,7 @@
 		}
 	}
 	if (name[0] && strcmp(name, "default")) {
-		strncpy(buf, name, NFS_MAXPATHLEN-1);
-		buf[NFS_MAXPATHLEN-1] = 0;
+		root_nfs_parse_addr(name);
 	}
 }



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] make nfsroot accept server addresses from BOOTP root
  2001-02-19 23:12 [PATCH] make nfsroot accept server addresses from BOOTP root Ben LaHaise
@ 2001-02-20 17:44 ` Tom Rini
  2001-02-20 18:12   ` Ben LaHaise
  0 siblings, 1 reply; 6+ messages in thread
From: Tom Rini @ 2001-02-20 17:44 UTC (permalink / raw)
  To: Ben LaHaise; +Cc: linux-kernel, alan

On Mon, Feb 19, 2001 at 06:12:12PM -0500, Ben LaHaise wrote:

> Here's a handy little patch that makes the kernel parse out the ip
> address of the nfs server from the bootp root path.  Otherwise it's
> impossible to boot the kernel without command line options on diskless
> workstations (I hate RPL).

Er, say that again?  Right now, for bootp if you specify "sa=xxx.xxx.xxx.xxx"
Linux uses that as the host for the NFS server (which does have the side
effect of if TFTP server != NFS server, you don't boot).  Are you saying
your patch takes "rp=xxx.xxx.xxx.xxx:/foo/root" ?  Just curious, since I
don't know, whats the RFC say about this?

-- 
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] make nfsroot accept server addresses from BOOTP root
  2001-02-20 17:44 ` Tom Rini
@ 2001-02-20 18:12   ` Ben LaHaise
  2001-02-20 18:20     ` Tom Rini
  2001-02-20 23:02     ` Russell King
  0 siblings, 2 replies; 6+ messages in thread
From: Ben LaHaise @ 2001-02-20 18:12 UTC (permalink / raw)
  To: Tom Rini; +Cc: linux-kernel, alan

On Tue, 20 Feb 2001, Tom Rini wrote:

> Er, say that again?  Right now, for bootp if you specify "sa=xxx.xxx.xxx.xxx"
> Linux uses that as the host for the NFS server (which does have the side
> effect of if TFTP server != NFS server, you don't boot).  Are you saying
> your patch takes "rp=xxx.xxx.xxx.xxx:/foo/root" ?  Just curious, since I
> don't know, whats the RFC say about this?

Yeah, that's the problem I was trying to work around, mostly because the
docs on dhcpd are sufficiently vague and obscure.  Personally, I don't
actually need tftp support, so I've just configured the system to now
point at the NFS server.  For anyone who cares, the last patch was wrong,
this one is right.

		-ben

diff -ur v2.4.1-ac18/fs/nfs/nfsroot.c work/fs/nfs/nfsroot.c
--- v2.4.1-ac18/fs/nfs/nfsroot.c	Mon Sep 25 16:13:53 2000
+++ work/fs/nfs/nfsroot.c	Tue Feb 20 01:59:32 2001
@@ -226,6 +226,7 @@
 	if (name[0] && strcmp(name, "default")) {
 		strncpy(buf, name, NFS_MAXPATHLEN-1);
 		buf[NFS_MAXPATHLEN-1] = 0;
+		root_nfs_parse_addr(buf);
 	}
 }



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] make nfsroot accept server addresses from BOOTP root
  2001-02-20 18:12   ` Ben LaHaise
@ 2001-02-20 18:20     ` Tom Rini
  2001-02-20 23:02     ` Russell King
  1 sibling, 0 replies; 6+ messages in thread
From: Tom Rini @ 2001-02-20 18:20 UTC (permalink / raw)
  To: Ben LaHaise; +Cc: linux-kernel, alan

On Tue, Feb 20, 2001 at 01:12:28PM -0500, Ben LaHaise wrote:
> On Tue, 20 Feb 2001, Tom Rini wrote:
> 
> > Er, say that again?  Right now, for bootp if you specify "sa=xxx.xxx.xxx.xxx"
> > Linux uses that as the host for the NFS server (which does have the side
> > effect of if TFTP server != NFS server, you don't boot).  Are you saying
> > your patch takes "rp=xxx.xxx.xxx.xxx:/foo/root" ?  Just curious, since I
> > don't know, whats the RFC say about this?
> 
> Yeah, that's the problem I was trying to work around, mostly because the

Er, the problem of having to use sa (which is TFTP server) to specify the
NFS server?

> docs on dhcpd are sufficiently vague and obscure.  Personally, I don't
> actually need tftp support, so I've just configured the system to now
> point at the NFS server.  For anyone who cares, the last patch was wrong,
> this one is right.

If the RFC doesn't say anything about the format rp= has to be in, this
is probably right.  Assuming it works. :)

-- 
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] make nfsroot accept server addresses from BOOTP root
  2001-02-20 18:12   ` Ben LaHaise
  2001-02-20 18:20     ` Tom Rini
@ 2001-02-20 23:02     ` Russell King
  2001-02-20 23:25       ` Tom Rini
  1 sibling, 1 reply; 6+ messages in thread
From: Russell King @ 2001-02-20 23:02 UTC (permalink / raw)
  To: Ben LaHaise; +Cc: Tom Rini, linux-kernel, alan

Ben LaHaise writes:
> Yeah, that's the problem I was trying to work around, mostly because the
> docs on dhcpd are sufficiently vague and obscure.  Personally, I don't
> actually need tftp support, so I've just configured the system to now
> point at the NFS server.  For anyone who cares, the last patch was wrong,
> this one is right.

This is the dhcp entry for a host that I use to tftp a kernel from a 
different machine to that running dhcpd:

                host tasslehoff
                {
                        hardware ethernet       00:10:57:00:03:EC;
                        fixed-address           tasslehoff;
                        next-server             raistlin;
                        filename                "/usr/src/k/tasslehoff";
                }

The booting host is called "tasslehoff".  The tftp server host is called
"raistlin", and the dhcp server is called "flint".

According to Tom, this should also cause Linux to nfs mount from the
"next-server" address, and it is fair that this is not documented by
the dhcp man pages since it appears to be a Linux Kernel quirk.

--
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] make nfsroot accept server addresses from BOOTP root
  2001-02-20 23:02     ` Russell King
@ 2001-02-20 23:25       ` Tom Rini
  0 siblings, 0 replies; 6+ messages in thread
From: Tom Rini @ 2001-02-20 23:25 UTC (permalink / raw)
  To: Russell King; +Cc: Ben LaHaise, linux-kernel, alan

On Tue, Feb 20, 2001 at 11:02:10PM +0000, Russell King wrote:
> Ben LaHaise writes:
> > Yeah, that's the problem I was trying to work around, mostly because the
> > docs on dhcpd are sufficiently vague and obscure.  Personally, I don't
> > actually need tftp support, so I've just configured the system to now
> > point at the NFS server.  For anyone who cares, the last patch was wrong,
> > this one is right.
> 
> This is the dhcp entry for a host that I use to tftp a kernel from a 
> different machine to that running dhcpd:
> 
>                 host tasslehoff
>                 {
>                         hardware ethernet       00:10:57:00:03:EC;
>                         fixed-address           tasslehoff;
>                         next-server             raistlin;
>                         filename                "/usr/src/k/tasslehoff";
>                 }
> 
> The booting host is called "tasslehoff".  The tftp server host is called
> "raistlin", and the dhcp server is called "flint".
> 
> According to Tom, this should also cause Linux to nfs mount from the
> "next-server" address, and it is fair that this is not documented by
> the dhcp man pages since it appears to be a Linux Kernel quirk.

Well, assuming next-server gets translated into TFTP server by the
dhcp-doing-bootp bit, yes.  I'm using that right now to bootp on
one box and NFS off another.

-- 
Tom Rini (TR1265)
http://gate.crashing.org/~trini/

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-02-20 23:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-19 23:12 [PATCH] make nfsroot accept server addresses from BOOTP root Ben LaHaise
2001-02-20 17:44 ` Tom Rini
2001-02-20 18:12   ` Ben LaHaise
2001-02-20 18:20     ` Tom Rini
2001-02-20 23:02     ` Russell King
2001-02-20 23:25       ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox