en :: ru

RAD GNU/Linux project home is under development. Thank you for your patience.

site root/ faq/ installation/

How can I boot up RAD GNU/Linux via DHCP? (index)

shadow
shadow  

There's a report that syslinux 2.06 was unable to download init ramdisk from the boot server. If your problem is like this one, try to update syslinux (checked verion: 2.11)

At first, you must have dhcpd and tftpd servers installed. I recommend ISC dhcpd. On ALT Linux you have to use

apt-get install dhcp-server tftp-server syslinux

dhcpd config example:

# common options: define time, dns servers, router etc.
option ntp-servers 192.168.0.1;
option time-servers 192.168.0.1;
option domain-name-servers 192.168.0.1,217.170.64.5;
option domain-name "home";
option broadcast-address 192.168.0.255;
option subnet-mask 255.255.255.0;
option routers 192.168.0.1;

# allow bootp protocol
allow booting;
allow bootp;
option tag-150 code 150 = text;

# define subnet to serve
subnet 192.168.0.0 netmask 255.255.255.0 {
    max-lease-time 3600;
    default-lease-time 3600;
    range 192.168.0.128 192.168.0.254;
    # these two directives are required for bootp:
    # tftp server and filename to get
    next-server 192.168.0.1;
    filename "/pxelinux.0";
}

File "/pxelinux.0" is a binary image from syslinux package, used to boot with PXE (Pre-eXecution Environment) agents. It must be in tftp directory, in ALT Linux it is /var/lib/tftpboot.

With dhcp and tftp servers running (tftpd must be enabled in xinetd config), you'll have this picture:

1)

diskless station                boot server
     |                              |
  PXE agent --------------------- DHCPd
             address request

2)

diskless station                boot server
     |                              |
  PXE agent --------------------- DHCPd
      client's and boot server addresses

3)

diskless station                boot server
     |                              |
  PXE agent --------------------- TFTPd
             get "/pxelinux.0"

4)

diskless station                boot server
     |                              |
  pxelinux.0 --------------------- TFTPd
          get "/pxelinux.cfg/XXX" *)

5)

diskless station                boot server
     |                              |
  pxelinux.0 --------------------- TFTPd
      get "/vmlinuz", get "/initrd.img"

6)

boot up kernel with initrd.img

*) Two words about tftp directory:

[[email protected] peet]$ ls -lR /var/lib/tftpboot/
/var/lib/tftpboot/:
total 11400
-rw-r--r--  1 root root 10706944 Mar 30  2005 initrd.img
-rw-r--r--  1 root root    11300 Oct  1  2003 pxelinux.0
drwxr-xr-x  2 root root     4096 May  5 10:37 pxelinux.cfg
-rw-r--r--  1 root root   915204 Mar 30  2005 vmlinuz

/var/lib/tftpboot/pxelinux.cfg:
total 8
-rw-r--r--  1 root root  95 Mar 30  2005 C0A86501

pxelinux.0 is a boot agent, vmlinuz and initrd.img are obvious, but what does "C0A86501" mean? For details, look in syslinux' documentation; shortly, this file is pxelinux' config for certain IP, C0A86501 == 192.168.101.1 and so on.

[[email protected] peet]$ cat /var/lib/tftpboot/pxelinux.cfg/C0A86501 
# Rein
label linux
    kernel vmlinuz
    append ramdisk_size=20480 initrd=initrd.img panic=60