[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: NFS boot with a dhcpless network



On Tue, 09 Dec 2008 14:14:23 -0600
Ron Johnson <ron.l.johnson@cox.net> 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 <ron.l.johnson@cox.net> 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.


Reply to: