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

Re: questions about NFSROOT + TFTP

Adam Di Carlo wrote:
> I'm going though your instructions on TFTP + NFSROOT; I've never done
> this and documenting "cold" (without any way to test) so I'd
> appreciate some clarifications.
> BTW, I think it would be nice if we enabled TFTP boot on x86 and all
> architectures.  I don't think it'd be hard; we'd just have to
> repurpose the Sparc method.  I believe that the big varience between
> platforms is how you actually kick up the TFTP boot installation;
> i.e., on x86 (??) you can use LILO/syslinux arguments.
> On to the text, from the sparc_release_notes file:
>   2. put the linux kernel image on your TFTP server after you have uncompressed
>      it:
> 	$ zcat linux > kernel-2.0.33
> Where does the kernel image come from?

Oops, now it is named linux-a.out and it is in the latest disks-sparc release.
BTW, kernel is now 2.0.35 ;-)

>   3. untar the root archive on your NFS server (could be the same as your TFTP
>      server):
> 	$ cd /tftpboot
> 	$ tar xvzf root.tar.gz
>     Be sure to use the GNU tar (other tar programs, like the SunOS one, badly
>     handle devices as plain files).
>   4. export your /tftpboot/debian-sparc-root directory with root access to your
>      client.  Eg. add the following line to /etc/exports (linux syntax):
> 	/tftpboot/debian-sparc-root	client(rw,no_root_squash)
> Is that supposed to be /boot or /tftpboot on a debian system?

Mine is /tftpboot but it seems not to be Debian compliant.  I surely set it by
hand ;-)
It is really the path put as last argument to the tftp entry in /etc/inetd.conf.
Debian set it to /boot by default.
I guess I changed it not to populate the /boot directory on my PC box (my
TFTP+NFS server) with non i386 kernels.
Maybe putting the "sparc" literal to the kernel filename is wise to avoid
misinterpretation of kernel files (eg. kernel-2.0.35-sparc) when you put it
under /boot.

>   5. create a symbolic link from <your client IP addr in dotted notation>
>      to debian-sparc-root in the /tftpboot directory:
> 	$ ln -s debian-sparc-root
>      for a client IP address which is
>   6. now you can boot your client as above.
> Really?  It will automatically pick that up?  'boot net' will use an
> NFS root dir if it can?

Yes.  sparc kernel is compiled with NFSROOT, BOOTP & RARP options.  After the
kernel is loaded in memory, it broadcasts BOOTP & RARP requests.  I just make
use of RARP, so I can describe it a bit.  Don't know about BOOTP, sorry :-((

Your RARP server send back to the client its IP address based on the MAC addr
registered in its internal tables (with rarp -s ... in the linux world).
Then the client try to mount the /tftpboot/<client IP addr> directory as its
root fs.  It assumes the RARP server is also an NFS server.

Hey, here is why I really chose /tftpboot as the TFTP directory ;-)  It is
hardcoded in the kernel to compose it's root fs path to NFS server !!!

Hope it helps.

 Eric Delaunay                 | "La guerre justifie l'existence des militaires.
 delaunay@lix.polytechnique.fr | En les supprimant." Henri Jeanson (1900-1970)

Reply to: