NFS boot with a dhcpless network

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

NFS boot with a dhcpless network

michf
I want to setup three machines to boot over the network from an nfs root.
The network doesn't have a dhcp server (I prefer if it's possible to do it
without one) and the network card is only supported with newer kernels
(2.6.28-rc).

Is there a way to do it through grub or do I need to setup a minimal system and
boot from it?

Any pointers on how to set this up?

Thanks


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: NFS boot with a dhcpless network

Ron Johnson
On 12/09/08 09:58, Micha Feigin wrote:
> I want to setup three machines to boot over the network from an nfs root.
> The network doesn't have a dhcp server (I prefer if it's possible to do it
> without one) and the network card is only supported with newer kernels
> (2.6.28-rc).
>
> Is there a way to do it through grub or do I need to setup a minimal system and
> boot from it?
>
> Any pointers on how to set this up?

PXE boot seems like what you want, where the client's NIC requests
the boot files from the server.

Or am I misunderstanding your questions?

--
Ron Johnson, Jr.
Jefferson LA  USA

How does being physically handicapped make me Differently-Abled?
What different abilities do I have?


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: NFS boot with a dhcpless network

michf
On Tue, 09 Dec 2008 10:27:28 -0600
Ron Johnson <[hidden email]> wrote:

> On 12/09/08 09:58, Micha Feigin wrote:
> > I want to setup three machines to boot over the network from an nfs root.
> > The network doesn't have a dhcp server (I prefer if it's possible to do it
> > without one) and the network card is only supported with newer kernels
> > (2.6.28-rc).
> >
> > Is there a way to do it through grub or do I need to setup a minimal system
> > and boot from it?
> >
> > Any pointers on how to set this up?
>
> PXE boot seems like what you want, where the client's NIC requests
> the boot files from the server.
>
> Or am I misunderstanding your questions?
>

Yes, theoretically that is what I want, but if I'm not mistaken PXE boot is
dependent on a dhcp server giving the machine an IP and declaring that it has
a boot image to provide, or am I wrong.

I want to give the ip as an option and use a given nfs server as a root, not
resolve these values at run time

thanks


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: NFS boot with a dhcpless network

Eric Gerlach-2
Micha Feigin wrote:
> Yes, theoretically that is what I want, but if I'm not mistaken PXE boot is
> dependent on a dhcp server giving the machine an IP and declaring that it has
> a boot image to provide, or am I wrong.
>
> I want to give the ip as an option and use a given nfs server as a root, not
> resolve these values at run time

Are these diskless machines?  If not, then theoretically you could set
up your initial RAM disk to give the IP and mount the NFS root.  I
couldn't tell you exactly how to go about it, though.

If they're diskless, you'll need a DHCP server (I think).

Cheers,

--
Eric Gerlach, Network Administrator
Federation of Students
University of Waterloo
p: (519) 888-4567 x36329
e: [hidden email]


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: NFS boot with a dhcpless network

Ron Johnson
In reply to this post by michf
On 12/09/08 11:25, Micha Feigin wrote:

> On Tue, 09 Dec 2008 10:27:28 -0600
> Ron Johnson <[hidden email]> wrote:
>
>> On 12/09/08 09:58, Micha Feigin wrote:
>>> I want to setup three machines to boot over the network from an nfs root.
>>> The network doesn't have a dhcp server (I prefer if it's possible to do it
>>> without one) and the network card is only supported with newer kernels
>>> (2.6.28-rc).
>>>
>>> Is there a way to do it through grub or do I need to setup a minimal system
>>> and boot from it?
>>>
>>> Any pointers on how to set this up?
>> PXE boot seems like what you want, where the client's NIC requests
>> the boot files from the server.
>>
>> Or am I misunderstanding your questions?
>>
>
> Yes, theoretically that is what I want, but if I'm not mistaken PXE boot is
> dependent on a dhcp server giving the machine an IP and declaring that it has
> a boot image to provide, or am I wrong.
>
> I want to give the ip as an option and use a given nfs server as a root, not
> resolve these values at run time

Hmmm, yes, you're right.  There's got to be a way, though, using
bootp, MAC address and tftp, since that's how we did it 10 years ago
with X Terminals.

--
Ron Johnson, Jr.
Jefferson LA  USA

How does being physically handicapped make me Differently-Abled?
What different abilities do I have?


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: NFS boot with a dhcpless network

Boyd Stephen Smith Jr.-2
On Tuesday 2008 December 09 11:49:42 Ron Johnson wrote:

>On 12/09/08 11:25, Micha Feigin wrote:
>> On Tue, 09 Dec 2008 10:27:28 -0600
>> Ron Johnson <[hidden email]> wrote:
>>> On 12/09/08 09:58, Micha Feigin wrote:
>>>> I want to setup three machines to boot over the network from an nfs
>>>> root. The network doesn't have a dhcp server (I prefer if it's possible
>>>> to do it without one) and the network card is only supported with newer
>>>> kernels (2.6.28-rc).
>>>>
>>>> Is there a way to do it through grub or do I need to setup a minimal
>>>> system and boot from it?
>>>>
>>>> Any pointers on how to set this up?
>>>
>>> PXE boot seems like what you want, where the client's NIC requests
>>> the boot files from the server.
>>>
>>> Or am I misunderstanding your questions?
>>
>> Yes, theoretically that is what I want, but if I'm not mistaken PXE boot
>> is dependent on a dhcp server giving the machine an IP and declaring that
>> it has a boot image to provide, or am I wrong.
>>
>> I want to give the ip as an option and use a given nfs server as a root,
>> not resolve these values at run time
>
>Hmmm, yes, you're right.  There's got to be a way, though, using
>bootp, MAC address and tftp, since that's how we did it 10 years ago
>with X Terminals.
DHCP is an extension to bootp.  Anything you were doing with bootp 10 years
ago should be done with DHCP today.  IIRC, dhcpd from ISC can do bootp
without the DHCP extensions.

And, yeah, for a full PXE boot, you will need a TFTP server on the network.  
(It could be the DHCP server, but doesn't have to be.)  I could be wrong, but
I believe that PXE is actually proprietary Intel extensions to and older,
standard "netboot" protocol.

If you just want NFS root, it's suppored by the kernel, I think something like
root=IP:/path, but you'll need some storage in the clients for the
bootloader, kernel image, and initrd (if any).

If you want the kernel image and initrd loaded from the network, you'll need a
DHCP server that responds to requests with the IP of the TFTP server (as path
to the file?).  That response will have to include some IP address, possibly
with a very short lease, that the client will use during the TFTP download.  
This IP can, of course, be overridden with configuration in the
kernel/initrd.

You can do both and, if the client needs access to more data than fits in RAM,
you'll need to.  The kernel/initrd will be loaded from the TFTP server
specified in the DHCP response.  The initrd will then mount the NFS root
filesystem and chroot/switch_root/pivot_root into it.
--
Boyd Stephen Smith Jr.                     ,= ,-_-. =.
[hidden email]                      ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-'
http://iguanasuicide.org/                      \_/    

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: NFS boot with a dhcpless network

Ron Johnson
On 12/09/08 13:47, Boyd Stephen Smith Jr. wrote:

> On Tuesday 2008 December 09 11:49:42 Ron Johnson wrote:
>> On 12/09/08 11:25, Micha Feigin wrote:
>>> On Tue, 09 Dec 2008 10:27:28 -0600
>>> Ron Johnson <[hidden email]> wrote:
>>>> On 12/09/08 09:58, Micha Feigin wrote:
>>>>> I want to setup three machines to boot over the network from an nfs
>>>>> root. The network doesn't have a dhcp server (I prefer if it's possible
>>>>> to do it without one) and the network card is only supported with newer
>>>>> kernels (2.6.28-rc).
>>>>>
>>>>> Is there a way to do it through grub or do I need to setup a minimal
>>>>> system and boot from it?
>>>>>
>>>>> Any pointers on how to set this up?
>>>> PXE boot seems like what you want, where the client's NIC requests
>>>> the boot files from the server.
>>>>
>>>> Or am I misunderstanding your questions?
>>> Yes, theoretically that is what I want, but if I'm not mistaken PXE boot
>>> is dependent on a dhcp server giving the machine an IP and declaring that
>>> it has a boot image to provide, or am I wrong.
>>>
>>> I want to give the ip as an option and use a given nfs server as a root,
>>> not resolve these values at run time
>> Hmmm, yes, you're right.  There's got to be a way, though, using
>> bootp, MAC address and tftp, since that's how we did it 10 years ago
>> with X Terminals.
>
> DHCP is an extension to bootp.  Anything you were doing with bootp 10 years
> ago should be done with DHCP today.  IIRC, dhcpd from ISC can do bootp
> without the DHCP extensions.
>
> And, yeah, for a full PXE boot, you will need a TFTP server on the network.  
> (It could be the DHCP server, but doesn't have to be.)  I could be wrong, but
> I believe that PXE is actually proprietary Intel extensions to and older,
> standard "netboot" protocol.
>
> If you just want NFS root, it's suppored by the kernel, I think something like
> root=IP:/path, but you'll need some storage in the clients for the
> bootloader, kernel image, and initrd (if any).
>
> If you want the kernel image and initrd loaded from the network, you'll need a
> DHCP server that responds to requests with the IP of the TFTP server (as path
> to the file?).  That response will have to include some IP address, possibly
> with a very short lease, that the client will use during the TFTP download.  
> This IP can, of course, be overridden with configuration in the
> kernel/initrd.
>
> You can do both and, if the client needs access to more data than fits in RAM,
> you'll need to.  The kernel/initrd will be loaded from the TFTP server
> specified in the DHCP response.  The initrd will then mount the NFS root
> filesystem and chroot/switch_root/pivot_root into it.

And can't you tell DHCP to associate IP addresses to MAC addresses?
  So even though OP doesn't want to use DHCP, he'd use it but not
for it's usual purpose...

--
Ron Johnson, Jr.
Jefferson LA  USA

How does being physically handicapped make me Differently-Abled?
What different abilities do I have?


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: NFS boot with a dhcpless network

Rick Thomas
In reply to this post by Ron Johnson

On Dec 9, 2008, at 12:49 PM, Ron Johnson wrote:

>> Yes, theoretically that is what I want, but if I'm not mistaken  
>> PXE boot is
>> dependent on a dhcp server giving the machine an IP and declaring  
>> that it has
>> a boot image to provide, or am I wrong.
>> I want to give the ip as an option and use a given nfs server as a  
>> root, not
>> resolve these values at run time
>
> Hmmm, yes, you're right.  There's got to be a way, though, using  
> bootp, MAC address and tftp, since that's how we did it 10 years  
> ago with X Terminals.

Setting up a DHCP server that does exactly what your bootp server did  
10 years ago is not that hard.

DHCP doesn't *have* to assign IP addresses from a dynamic pool.  It  
can have fixed IP addresses for each of the MAC addresses you want to  
serve, and refuse to supply anything for unknown MACs.

Total time to install the DHCP server software, read the  
documentation, and configure the setup should be no more than a few  
hours.  At least, that's how long it took me to do an equivalent  
setup for my home network.

Rick


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: NFS boot with a dhcpless network

Boyd Stephen Smith Jr.-2
In reply to this post by Ron Johnson
On Tuesday 2008 December 09 14:14:23 Ron Johnson wrote:
>Can't you tell DHCP to associate IP addresses to MAC addresses?

I suppose it depends on the server software, but dhcpd from ISC certainly
provides that feature though the "fixed-address" and "hardware" directives.
--
Boyd Stephen Smith Jr.                     ,= ,-_-. =.
[hidden email]                      ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-'
http://iguanasuicide.org/                      \_/    

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: NFS boot with a dhcpless network

michf
In reply to this post by Ron Johnson
On Tue, 09 Dec 2008 14:14:23 -0600
Ron Johnson <[hidden email]> wrote:

> On 12/09/08 13:47, Boyd Stephen Smith Jr. wrote:
> > On Tuesday 2008 December 09 11:49:42 Ron Johnson wrote:
> >> On 12/09/08 11:25, Micha Feigin wrote:
> >>> On Tue, 09 Dec 2008 10:27:28 -0600
> >>> Ron Johnson <[hidden email]> wrote:
> >>>> On 12/09/08 09:58, Micha Feigin wrote:
> >>>>> I want to setup three machines to boot over the network from an nfs
> >>>>> root. The network doesn't have a dhcp server (I prefer if it's possible
> >>>>> to do it without one) and the network card is only supported with newer
> >>>>> kernels (2.6.28-rc).
> >>>>>
> >>>>> Is there a way to do it through grub or do I need to setup a minimal
> >>>>> system and boot from it?
> >>>>>
> >>>>> Any pointers on how to set this up?
> >>>> PXE boot seems like what you want, where the client's NIC requests
> >>>> the boot files from the server.
> >>>>
> >>>> Or am I misunderstanding your questions?
> >>> Yes, theoretically that is what I want, but if I'm not mistaken PXE boot
> >>> is dependent on a dhcp server giving the machine an IP and declaring that
> >>> it has a boot image to provide, or am I wrong.
> >>>
> >>> I want to give the ip as an option and use a given nfs server as a root,
> >>> not resolve these values at run time
> >> Hmmm, yes, you're right.  There's got to be a way, though, using
> >> bootp, MAC address and tftp, since that's how we did it 10 years ago
> >> with X Terminals.
> >
> > DHCP is an extension to bootp.  Anything you were doing with bootp 10 years
> > ago should be done with DHCP today.  IIRC, dhcpd from ISC can do bootp
> > without the DHCP extensions.
> >
> > And, yeah, for a full PXE boot, you will need a TFTP server on the
> > network. (It could be the DHCP server, but doesn't have to be.)  I could be
> > wrong, but I believe that PXE is actually proprietary Intel extensions to
> > and older, standard "netboot" protocol.
> >
> > If you just want NFS root, it's suppored by the kernel, I think something
> > like root=IP:/path, but you'll need some storage in the clients for the
> > bootloader, kernel image, and initrd (if any).
> >
> > If you want the kernel image and initrd loaded from the network, you'll
> > need a DHCP server that responds to requests with the IP of the TFTP server
> > (as path to the file?).  That response will have to include some IP
> > address, possibly with a very short lease, that the client will use during
> > the TFTP download. This IP can, of course, be overridden with configuration
> > in the kernel/initrd.
> >
> > You can do both and, if the client needs access to more data than fits in
> > RAM, you'll need to.  The kernel/initrd will be loaded from the TFTP server
> > specified in the DHCP response.  The initrd will then mount the NFS root
> > filesystem and chroot/switch_root/pivot_root into it.
>
> And can't you tell DHCP to associate IP addresses to MAC addresses?
>   So even though OP doesn't want to use DHCP, he'd use it but not
> for it's usual purpose...
>

I can't use a dhcp server on this network. These machines are exposed to the
general network which already has a dhcp server and if I add another one I'm
going to cause trouble over the whole network.

Besides a dhcp server with the specific setup is going to be a serious pain.

The machines do have disks which are meant mostly for local user data. The idea
is to have as little as possible in terms of a system on each machine to make
it easier to maintain and keep safe from the users. Looks like the easiest
solution is to have grub and a kernel installed locally on each machine.


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: NFS boot with a dhcpless network

Ron Johnson
On 12/09/08 15:38, Micha Feigin wrote:
> On Tue, 09 Dec 2008 14:14:23 -0600
> Ron Johnson <[hidden email]> wrote:
[snip]

>> And can't you tell DHCP to associate IP addresses to MAC addresses?
>>   So even though OP doesn't want to use DHCP, he'd use it but not
>> for it's usual purpose...
>>
>
> I can't use a dhcp server on this network. These machines are exposed to the
> general network which already has a dhcp server and if I add another one I'm
> going to cause trouble over the whole network.
>
> Besides a dhcp server with the specific setup is going to be a serious pain.
>
> The machines do have disks which are meant mostly for local user data. The idea
> is to have as little as possible in terms of a system on each machine to make
> it easier to maintain and keep safe from the users. Looks like the easiest
> solution is to have grub and a kernel installed locally on each machine.

The existing dhcp server could point the diskless machines to the
machine that has the boot files on it.

Or would that entail too much bureaucracy and/or interference from
know-nothing MSCEs?

--
Ron Johnson, Jr.
Jefferson LA  USA

How does being physically handicapped make me Differently-Abled?
What different abilities do I have?


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: NFS boot with a dhcpless network

Tzafrir Cohen
In reply to this post by michf
On Tue, Dec 09, 2008 at 11:38:39PM +0200, Micha Feigin wrote:

> I can't use a dhcp server on this network. These machines are exposed to the
> general network which already has a dhcp server and if I add another one I'm
> going to cause trouble over the whole network.

Etherboot and others support using port 1067 for the DHCP server, if
you're in a network with a hostile DHCP server.

--
Tzafrir Cohen         | [hidden email] | VIM is
http://tzafrir.org.il |                    | a Mutt's
[hidden email] |                    |  best
ICQ# 16849754         |                    | friend


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: NFS boot with a dhcpless network

michf
In reply to this post by Ron Johnson
On Tue, 09 Dec 2008 15:46:31 -0600
Ron Johnson <[hidden email]> wrote:

> On 12/09/08 15:38, Micha Feigin wrote:
> > On Tue, 09 Dec 2008 14:14:23 -0600
> > Ron Johnson <[hidden email]> wrote:
> [snip]
> >> And can't you tell DHCP to associate IP addresses to MAC addresses?
> >>   So even though OP doesn't want to use DHCP, he'd use it but not
> >> for it's usual purpose...
> >>
> >
> > I can't use a dhcp server on this network. These machines are exposed to the
> > general network which already has a dhcp server and if I add another one I'm
> > going to cause trouble over the whole network.
> >
> > Besides a dhcp server with the specific setup is going to be a serious pain.
> >
> > The machines do have disks which are meant mostly for local user data. The
> > idea is to have as little as possible in terms of a system on each machine
> > to make it easier to maintain and keep safe from the users. Looks like the
> > easiest solution is to have grub and a kernel installed locally on each
> > machine.
>
> The existing dhcp server could point the diskless machines to the
> machine that has the boot files on it.
>
> Or would that entail too much bureaucracy and/or interference from
> know-nothing MSCEs?
>

It's a university departmental dhcp server, do you think that there is any
chance that I can convince them to do something like that ;-)


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: NFS boot with a dhcpless network

Ron Johnson
On 12/09/08 17:34, Micha Feigin wrote:

> On Tue, 09 Dec 2008 15:46:31 -0600
> Ron Johnson <[hidden email]> wrote:
>
>> On 12/09/08 15:38, Micha Feigin wrote:
>>> On Tue, 09 Dec 2008 14:14:23 -0600
>>> Ron Johnson <[hidden email]> wrote:
>> [snip]
>>>> And can't you tell DHCP to associate IP addresses to MAC addresses?
>>>>   So even though OP doesn't want to use DHCP, he'd use it but not
>>>> for it's usual purpose...
>>>>
>>> I can't use a dhcp server on this network. These machines are exposed to the
>>> general network which already has a dhcp server and if I add another one I'm
>>> going to cause trouble over the whole network.
>>>
>>> Besides a dhcp server with the specific setup is going to be a serious pain.
>>>
>>> The machines do have disks which are meant mostly for local user data. The
>>> idea is to have as little as possible in terms of a system on each machine
>>> to make it easier to maintain and keep safe from the users. Looks like the
>>> easiest solution is to have grub and a kernel installed locally on each
>>> machine.
>> The existing dhcp server could point the diskless machines to the
>> machine that has the boot files on it.
>>
>> Or would that entail too much bureaucracy and/or interference from
>> know-nothing MSCEs?
>>
>
> It's a university departmental dhcp server, do you think that there is any
> chance that I can convince them to do something like that ;-)

Depends on how ossified and/or ignorant they are.

--
Ron Johnson, Jr.
Jefferson LA  USA

How does being physically handicapped make me Differently-Abled?
What different abilities do I have?


--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: NFS boot with a dhcpless network

anoop aryal
In reply to this post by Ron Johnson


On Tue, 2008-12-09 at 23:38 +0200, Micha Feigin wrote:
> On Tue, 09 Dec 2008 14:14:23 -0600
> Ron Johnson <[hidden email]> wrote:

[snip]

> I can't use a dhcp server on this network. These machines are exposed
to the
> general network which already has a dhcp server and if I add another
one I'm
> going to cause trouble over the whole network.
>
> Besides a dhcp server with the specific setup is going to be a serious
pain.
>
> The machines do have disks which are meant mostly for local user data.
The idea
> is to have as little as possible in terms of a system on each machine
to make
> it easier to maintain and keep safe from the users. Looks like the
easiest
> solution is to have grub and a kernel installed locally on each
machine.
>
>

I once was futzing around with 4 really old machines with no PXE
support. I was able to get it to boot with a CD with just grub (and just
a kernel) on it. Had to use a special stage2 for GRUB in order for it to
boot.

See here:
http://lists.gnu.org/archive/html/bug-grub/2004-04/msg00152.html.

Or google for 'GRUB El Torito'.

I remember having trouble initially. But once that was figured out, it
turned out to be a handy bootloader with a default menu.lst with shell
for when menu.lst didn't cut it.

Now, I think I put the IP addresses into the menu.lst which then passed
it onto the kernel which was built with diskless (NFS root) support.

So grub would load the NFSroot kernel on the CD (and I burned almost
identical CD - the only difference being a different IP address on the
menu.lst file) and the kernel would then proceed with the NFS root
filesystem.

At least that is how I recall it. It could all be a figment of my
imagination/hazy-memory. I might still have the CD lying around
somewhere so if you run into trouble email me and I'll look for it.

Anoop.





--
To UNSUBSCRIBE, email to [hidden email]
with a subject of "unsubscribe". Trouble? Contact [hidden email]