Booting TSL from an NFS-root

From TrustixWiki

Jump to: navigation, search

-note- this article is a stub and needs some fleshing out --Mortenn 19:15, 30 November 2005 (EST)

We will assume 3 boxes are involved;

  • 10.0.0.1 - The BOOTP/TFTP server
  • 10.0.0.2 - The NFS server
  • 10.0.0.3 - The diskless unit

Contents

BOOTP/TFTP

  • build a suitable kernel for the target box
  • install/enable tftpd
  • install/enable dhcpd (most likely, this is already done)

TFTP setup

/etc/sysconfig/tftpd

TFTPD_OPTIONS="-l -u tftpd -p"
TFTPD_USE_XINETD="no"
TFTPD_DIRECTORY="/tftpboot"

/tftpboot/pxelinux.cfg/01-xx-xx-xx-xx-xx-xx (replace xx-..-xx with clients mac)

LABEL linux
       KERNEL vmlinuz-diskless
       APPEND init=/sbin/init root=/dev/nfs ip=bootp

copy the bzImage you made into /tftpboot

install syslinux to get pxelinux.0 and copy it from /usr/lib/syslinux to /tftpboot

BOOTP setup

/etc/dhcpd.conf

subnet 10.0.0.0 netmask 255.255.255.0 {
       option routers                  10.0.0.1;
       option subnet-mask              255.255.255.0;
       next-server                     10.0.0.1;
       filename                        "pxelinux.0";
       range dynamic-bootp             10.0.0.100 10.0.0.254;
       host diskless.example.com {
               hardware ethernet xx:xx:xx:xx:xx:xx;
               fixed-address 10.0.0.3;
               option root-path "10.0.0.2:/path/to/root";
       }
}

NFS setup

/etc/exports

/root/to/path 10.0.0.3(rw,no_root_squash,no_all_squash)
Personal tools