Linux

I dati della macchina da installare sono:
Mac Address    : 08:00:20:09:56:17
IP Address        : 192.168.0.161
IP Address(hex)    : C0A800A1
 
There are two different ways to run rarp on Linux. You can use the userland rarpd, or build it into your (<2.3) kernel.

Linux userland rarpd (should work with all kernels)

There are at least two known implementations of userland rarp. There is an older one (by D.Brashear & J.Hutzelman) at ftp://ftp.dementia.org/pub/net-tools (source only), and a newer one (by A. Kuznetsov & J.Jelinek) that comes in all (?) recent distributions.

 

  1. Get the package as an RPM from ftp://rawhide.redhat.com/ or the Debian woody with apt-get rarpd.
    Sources can be found at least on a local debian mirror under /pool/main/r/rarpd/.

     

  2. Create an /etc/ethers file, listing your client:
    #/etc/ethers
    CC:CC:CC:CC:CC:CC     client

     

  3. Add your client to the /etc/hosts file:
    192.168.1.10 client

     

  4. # /path/to/rarpd -A
    See rarp(8) for more details.

If RARP fails, the client will print:

No response for RARP request
le(0,0,0,0): Unknown error: code 60
boot: Unknown error: code 60
If RARP succeeds, the client will print:
boot: client IP address: 192.168.1.10

Continue on to setting up bootparams

Linux kernel rarp ( kernel<2.3 )

If you don't want to (or can't) use the userland rarpd, you will need to compile rarp support in the kernel or (if your kernel supports it) add it as a loadable module.

 

  1. Compile a kernel with RARP support. Run one of the following:
    # make config
    # make menuconfig
    # make xconfig

     

  2. Alternatively, add the RARP kernel module:
    # modprobe rarp
    Note, this does not require rebooting, but you will need to run this command after each reboot to keep RARP enabled.

     

  3. Add your client to the /etc/hosts file:
    192.168.1.10 client

     

  4. # /sbin/arp -s client CC:CC:CC:CC:CC:CC

     

  5. # /sbin/arp -a
    This will print the arp cache. Check to make sure your client is there:
    Address                HWtype  HWaddress           Flags Mask      Iface
    client.test.net        ether   CC:CC:CC:CC:CC:CC   CM    *         eth0

     

  6. # /sbin/rarp -s client CC:CC:CC:CC:CC:CC
    If RARP is not compiled into your kernel, you will get one of the two following error messages:
    SIOCSRARP: Invalid argument
    This kernel does not support RARP.

     

  7. # /sbin/rarp -a
    This will print the rarp cache. Check to make sure your client is there:
    IP address       HW type             HW address
    192.168.1.10     10Mbps Ethernet     CC:CC:CC:CC:CC:CC

If RARP fails, the client will print:

No response for RARP request
le(0,0,0,0): Unknown error: code 60
boot: Unknown error: code 60
If RARP succeeds, the client will print:
boot: client IP address: 192.168.1.10

Continue on to setting up bootparams

Adesso si passa a configurare bootparams

 
The bootparam daemon should come with all recent distributions as of this writing (2001/March/01). If you don't have /usr/sbin/rpc.bootparamd then you'll have to download the newest netkit-bootparamd sources from
ftp://ftp.uk.linux.org/pub/linux/Networking/netkit.

 

  1. If needed, extract and compile the daemon. See the README for details, but the following should "just work":
    # ./configure; make; make install

     

  2. Create the /etc/bootparams file:
    #/etc/bootparams
    client root=nfsserver:/export/client/root

     

  3. # /usr/[local/]sbin/rpc.bootparamd -d

This runs the bootparamd server in debugging mode. When the bootparamd server gets a request, it will print the following messages:

whoami got question for 192.168.1.10
This is host client.test.net
Returning client   (none)    127.0.0.1
getfile got question for "client" and file "root"
returning server:nfsserver path:/export/client/root address: 192.168.1.5

If the bootparams requests fail, the client will print:

bootparamd: `whoami' call failed
le(0,0,0,0): Unknown error: code 60
boot: Unknown error: code 60

There have been several reports of problems with the bootparamd that ships with some distributions of linux. If you run into this, try compiling the NetKit bootparamd from source and check that your rarpd is working. Debian/woody with kernels 2.4.x, rarpd-0.981107 and netkit-bootparamd-0.17 are reported to work without problems.

If the bootparams requests succeed, the client will print:

boot: client name: client.test.net
root addr=192.168.1.5 path=/export/client/root

Continue on to setting up nfs or tftpd

Adesso si configura il tftpd

Linux (using inetd.conf)

 
  1. Edit /etc/inetd.conf and remove the # from the following line:
    tftp  dgram   udp     wait    nobody  /usr/sbin/tcpd  in.tftpd /tftpboot

     

  2. Ensure that the last item on the line is /tftpboot

     

  3. # ps aux | grep inetd
    kill -HUP that process to force it to reread /etc/inetd.conf.

You can test your tftpd from any unix machine, by running:

# tftp tftpserver.test.net
tftp> get C0A8010A.SUN4C
Received 683 bytes in 0.3 seconds
tftp> quit
In this case, we use C0A8010A.SUN4C, the sparc kernel name as the test file to get.

Continue on to setting up nfs

Configurazione NFS

 
  1. # mkdir -p /export/client/root/dev

     

  2. # mkdir /export/client/usr

     

  3. # mkdir /export/client/home

     

  4. # touch /export/client/swap

     

  5. # cd /export/client/root

     

  6. tar [--numeric-owner] -xvpzf /export/client/NetBSD-1.5.2/binary/sets/kern.tgz

     

  7. mknod /export/client/root/dev/console c 0 0

     

  8. Add the following lines to /etc/exports:
    #/etc/exports
    /export/client/root client.test.net(rw,no_root_squash)
    /export/client/swap client.test.net(rw,no_root_squash)
    /export/client/usr client.test.net(rw,root_squash)
    /export/client/home client.test.net(rw,root_squash)

     

  9. # ps aux | grep mountd
    If mountd is running, then kill -HUP that process. This will force it to reread the /etc/exports file. If it's not already running, then you need to:
    # /sbin/rpc.mountd [--no-nfs-version 3]
    You may need to add the --no-nfs-version 3 if you're having problems. See below.

     

  10. # ps aux | grep nfsd
    If the nfsdaemons are running, then you need to restart them so that they reread the /etc/exports file. If they're not already running, then you need to:
    # /sbin/rpc.nfsd

Se digitando questo comando compare il messaggio di errore
      nfssvc: Function not implemented
significa che il kernel non e' compilato con l'nfs, in tal caso si puo' aggiungere al volo con
      modprobe nfsd

 
If the server isn't running the NFS daemons, the client will print:
le(0,0,0,0): Unknown error: code -1
boot: Unknown error: code -1
If the server is running NFS, but isn't exporting the root directory to the client, the client will print:
boot: no such file or directory
If everything is working properly, you will see a few numbers and a spinning cursor on the client. This means you have succeeded! At this point, your client isn't bootable. If you let it continue, it will panic when attempting to start init.

Kernel NFS Problem:

Most versions of linux only implement NFS2, in which case NetBSD will try NFS3 and then automatically fall back. Some versions (notably RedHat 6.0) will incorrectly answer both NFS2 and NFS3 mount requests, then ignore any attempt to access the filesystem using NFS3. This causes untold pain and hassle.

The workaround is to kill mountd and start it with options preventing NFS3 problems (i.e., rpc.mountd --no-nfs-version 3).

Continue on to setting up the client filesystem