BOOT ON LAN

In order to make pi1 / pi2 computers bootable from LAN the following action has been performed :

0/ pi1 / pi2 configuration

1/ Setup BIOS :

2/ prepare proper kernel, the following options must be checked in make xconfig :

Kompilacja jadra :
      make
      make modules
      make modules_install
      make install

3/ install and configure DHCP and TFTP on server machine

            option subnet-mask              255.255.255.0;
            option domain-name              "lco.cl";
            #option domain-name-servers      200.28.147.2;
            #option time-servers 193.0.81.18;
 
            ddns-update-style interim;
            ignore client-updates;
 
            deny unknown-clients;
 
            subnet 192.168.0.0 netmask 255.255.255.0 {
                host pi1 {
                    hardware ethernet 00:0C:F1:AB:BC:33;
                    fixed-address 192.168.0.44;
                    next-server 192.168.0.43;
                    filename "pxelinux.0";
                    #option root-path "192.168.0.43:/disk01/pxeclient";
                }
            }  

        Note - this is for case where server machine have 2 interfaces one connected to WLAN and second to PXE boot machine, in
        case of single card setup one line was different :

                    filename "/tftpboot/pxelinux.0";

        and the rest was :       

        subnet 200.28.147.0 netmask 255.255.255.0 {
            host pi2 {
                    hardware ethernet 00:07:E9:68:21:00;
                    fixed-address 200.28.147.186;
                    next-server 200.28.147.185;
                    filename "pxelinux.0";
            }
        }

         RUN :
            service dhcpd start
           Configure tftp - edit file /etc/xinetd.d/tftp , make sure it contains the red line :
                service tftp
                {
                    disable = no
                    socket_type             = dgram
                    protocol                = udp
                    wait                    = yes
                    user                    = root
                    server                  = /usr/sbin/in.tftpd
                    server_args             = -s /tftpboot
                    per_source              = 11
                    cps                     = 100 2
                    flags                   = IPv4
                }

          and start tftp-server by :
               
            chkconfig tftp on
           
/sbin/service xinetd reload

4/ configure NFS :

5/ prepare file /tftpboot/pxelinux.cfg/default

6/ restart remote computer, expect following lines in /var/log/messages file of boot-server:
                    

    Nov 28 11:48:37 localhost kernel: e1000: eth1 NIC Link is Down
    Nov 28 11:48:39 localhost kernel: e1000: eth1 NIC Link is Up 100 Mbps Full Duplex
    Nov 28 11:48:45 localhost kernel: e1000: eth1 NIC Link is Down
    Nov 28 11:48:47 localhost kernel: e1000: eth1 NIC Link is Up 1000 Mbps Full Duplex
    Nov 28 11:48:51 localhost dhcpd: DHCPDISCOVER from 00:07:e9:68:21:00 via eth0
    Nov 28 11:48:51 localhost dhcpd: DHCPOFFER on 200.28.147.186 to 00:07:e9:68:21:00 via e
    Nov 28 11:48:53 localhost dhcpd: DHCPREQUEST for 200.28.147.186 (200.28.147.185) from 0
    Nov 28 11:48:53 localhost dhcpd: DHCPACK on 200.28.147.186 to 00:07:e9:68:21:00 via eth
    Nov 28 14:48:53 localhost in.tftpd[30463]: tftp: client does not accept options
    Nov 28 11:48:59 localhost kernel: e1000: eth1 NIC Link is Down
    Nov 28 11:49:02 localhost kernel: e1000: eth1 NIC Link is Up 1000 Mbps Full Duplex
    Nov 28 11:49:05 localhost dhcpd: DHCPDISCOVER from 00:07:e9:68:21:00 via eth0
    Nov 28 11:49:05 localhost dhcpd: DHCPOFFER on 200.28.147.186 to 00:07:e9:68:21:00 via e
    Nov 28 11:49:05 localhost dhcpd: DHCPREQUEST for 200.28.147.186 (200.28.147.185) from 0
    Nov 28 11:49:05 localhost dhcpd: DHCPACK on 200.28.147.186 to 00:07:e9:68:21:00 via eth
    Nov 28 11:49:05 localhost rpc.mountd: authenticated mount request from pi2:800 for /dat
    Nov 28 11:49:05 localhost kernel: e1000: eth1 NIC Link is Down
    Nov 28 11:49:07 localhost kernel: e1000: eth1 NIC Link is Up 1000 Mbps Full Duplex
    Nov 28 11:58:22 localhost kernel: e1000: eth1 NIC Link is Down
    Nov 28 11:58:33 localhost dhcpd: dhcpd shutdown succeeded
    Nov 28 11:59:28 localhost kernel: e1000: eth1 NIC Link is Up 100 Mbps Full Duplex
    Nov 28 11:59:35 localhost kernel: e1000: eth1 NIC Link is Down
    Nov 28 11:59:37 localhost kernel: e1000: eth1 NIC Link is Up 1000 Mbps Full Duplex
    Nov 28 12:00:59 localhost kernel: e1000: eth1 NIC Link is Down
    Nov 28 12:01:01 localhost kernel: e1000: eth1 NIC Link is Up 1000 Mbps Full Duplex
    Nov 28 12:01:04 localhost kernel: e1000: eth1 NIC Link is Down
    Nov 28 12:01:06 localhost kernel: e1000: eth1 NIC Link is Up 1000 Mbps Full Duplex

7/ pi1 :

       /data2/bootonlan/pxeclient/
       ( safe copy kept in /data1/bootonlan/pxeclient )


8/ Fedora Core 7

   UWAGA : /dev/ musi byc skopiowany na dzialajacym systemie , inaczej jest pusty, trzeba dodac opcje dla kernela selinux=0 !!!
   W tej chwili to juz dziala , nawet z heplx43, zapiski z konfiguracji smok2 tutaj

9/ Możliwe problemy


  1.   UWAGA : /dev/ musi byc skopiowany na dzialajacym systemie !!! , inaczej jest pusty, trzeba dodac opcje dla kernela selinux=0 !!!
       W tej chwili to juz dziala , nawet z heplx43, zapiski z konfiguracji smok2 tutaj
    To sie zdarza czesto na tych nowszych systemach, ktore dev tworza sobie "w locie" wystapilo tez na SL5.5 itp, Np u mnie objrawialo sie tym ze zawisl po takich komunikatach :

    Warning: unable to open an initial console.
    SELinux: Disabled at runtime.
    SELinux: Unregistering netfilter hooks
    audit(1295361972.627:2): selinux=0 auid=4294967295
    hostname used greatest stack depth: 1444 bytes left
    start_udev used greatest stack depth: 1260 bytes left

  2. Jesli przy boocie pojawia sie :
    "Looking up port of RPC 10003/2 on"
    To zwykle oznacza, że driver karty sieciowej nie zostal wkompilowany na stałe w kernel tylko jako moduł pewnie i dlatego wogóle na nim sieć nie działa
  3. W nowszych wersjach nie dziala poprawnie shutdown bo eth0 zamyka sie za wczesnie i przez to zawisa i już nie nie moze zrobić ( podcina gałąź na której siedzi ).
    Żeby to poprawić trzeba albo zmienić kolejność wyłaczania tak żeby eth0 sie na samiutkim końcu wyłączał albo po prostu przeedytowac /etc/init.d/network i
    w stop) skasować wszystko i wstawić samo "exit 1;" i już po prostu sieć się nie wyłączy i shutdown będzie poprawnie działał