Netboot-Sparc

From CLFS-HINTS

Jump to: navigation, search

This is a rough sketch, fill in as we go:

/mnt/clfs

    Follow the book in the boot section up to silo. There is no need for silo at this time.
    If you wish to have a way to connect to the machine instead of physically using the machine
    to build the rest of the system, build telnetd from net-tools-1.60. You will need to install
    iana-etc or just specify the port at the command line with telnetd -n 23. This will let you
    login to the system after it is ready and just hit enter for the password as root has no password.
    Whatever you think you will need, it is best to build right now using the cross-tools.

RARPD

Get rarpd source from: http://ftp.de.debian.org/debian/pool/main/r/rarpd/rarpd_0.981107.orig.tar.gz

Get the needed patch as well: http://ftp.de.debian.org/debian/pool/main/r/rarpd/rarpd_0.981107-7.diff.gz

Build rarpd and install it into the host's /usr/sbin directory:

    make &&
    install -v -m755 -o root -u root rarpd /usr/sbin

Execute rarpd:

    /usr/sbin/rarpd -A

Test rarpd:

   setup /etc/ethers (example):
       echo "08:00:20:c8:d0:76 element.localnet.net" > /etc/ethers
   
   setup /etc/hosts (example):
       172.16.23.14 element.localnet.net element
   
   tail -f /var/log/daemon
   net boot the sparc box:
        ok> boot net root=/dev/nfs nfsroot=/mnt/clfs ip=<check nfsroot.txt in linux kernel documentation>
        (example) ip=dhcp or ip=172.16.23.14:172.16.23.16:172.16.23.1:255.255.255.224:element:eth0
   rarpd should respond as follows:
        Mar 17 17:35:43 ionic rarpd[4387]: RARP request from 08:00:20:c8:d0:76 on eth1
        Mar 17 17:35:43 ionic rarpd[4387]: RARP response to 08:00:20:c8:d0:76 172.16.23.14 on eth1

tftpd

   Get a tftp daemon and build it (atftp is another option).
   
   For in.tftpd from netkit-tftp at http://ftp.uk.linux.org/pub/linux/Networking/netkit/netkit-tftp-0.17.tar.gz
   configure and install into /usr/sbin

If using netkit-tftp install xinetd from http://cblfs.cross-lfs.org:

   Use the following config for /etc/xinetd.d/tftp:
   (change only_from as required)
   service tftp
   {
       protocol           = udp
       port                   = 69
       socket_type     = dgram
       wait                   = yes
       user                   = nobody
       group                = nobody
       server                = /usr/sbin/in.tftpd
       server_args      = 
       only_from         = 172.16.23.0 
       disable              = no
   }
   Start xinetd and /var/log/daemon should show this:
       Mar 17 16:55:34 ionic xinetd[4133]: Started working: 1 available service

Kernel

   Default directory for tftpd is /tftpboot
   Make sure all files in that directory have read permissions.
   Build the kernel and include these option(s) in networking options:
       (kernel autoconfig options)
       CONFIG_IP_PNP=y
       CONFIG_IP_PNP_DHCP=y
       CONFIG_IP_PNP_BOOTP=y
       CONFIG_IP_PNP_RARP=y
   Include these options as well under NFS in the filesystems section:
        CONFIG_ROOT_NFS=y  (root over nfs)
   After building the kernel, copy vmlinux to /tftpboot with the filename in the hex format of the IP address of the sparc machine.
        (example):   172.16.23.14 is AC10170E
        cp vmlinux /tftpboot/AC10170E
        If you are not sure what it will be, you can find calculators online or you can net boot the sparc from the ok> prompt and
        view /var/log/daemon.log to see what filename is being requested as such:
             Mar 17 17:41:57 ionic xinetd[4439]: xinetd Version 2.3.14 started with loadavg options compiled in.
             Mar 17 17:41:57 ionic xinetd[4439]: Started working: 1 available service
             Mar 17 17:43:26 ionic rarpd[4444]: RARP response to ,v^G 172.16.23.14 on <88>Nÿ¿ÿÿÿÿ^A
             Mar 17 17:43:26 ionic tftpd[4446]: tftpd: trying to get file: AC10170E
             Mar 17 17:43:26 ionic tftpd[4446]: tftpd: serving file from /tftpboot
             Mar 17 17:43:26 ionic xinetd[4439]: START: tftp pid=4445 from=172.16.23.14
     The machine should then receive the kernel and execute it.

NFS

   Build NFS from http://cblfs.cross-lfs.org   (portmap and NFS)
   setup /etc/exports something like this:
        /mnt/clfs element(rw,no_root_squash)
    Then run:
        exportfs -a
     After rarpd and tftp are going, then this should be seen in /var/log/daemon.log:
        (example):  Mar 18 01:05:29 ionic mountd[682]: authenticated mount request from 172.16.23.14:834 for /mnt/clfs (/mnt/clfs)

Complete log process

   Mar 17 17:41:57 ionic xinetd[4439]: xinetd Version 2.3.14 started with loadavg options compiled in.
   Mar 17 17:41:57 ionic xinetd[4439]: Started working: 1 available service
   Mar 17 17:43:26 ionic rarpd[4444]: RARP response to ,v^G 172.16.23.14 on <88>Nÿ¿ÿÿÿÿ^A
   Mar 17 17:43:26 ionic tftpd[4446]: tftpd: trying to get file: AC10170E
   Mar 17 17:43:26 ionic tftpd[4446]: tftpd: serving file from /tftpboot
   Mar 17 17:43:26 ionic xinetd[4439]: START: tftp pid=4445 from=172.16.23.14
   Mar 17 17:44:11 ionic tftpd[4453]: tftpd: trying to get file: AC10170E
   Mar 17 17:44:11 ionic tftpd[4453]: tftpd: serving file from /tftpboot
   Mar 18 01:05:29 ionic mountd[682]: authenticated mount request from 172.16.23.14:834 for /mnt/clfs (/mnt/clfs)
Personal tools