[[PageOutline]] = How to multiboot with syslinux/pxelinux = * see [../PXE/pxelinux] * #52 * [[Image(pxe-multiboot.png,33%)]] == setup NIC and servers == * eth1を192.168.100.254に固定し、dhcpdとtftpdを立てる === NIC === * mitty@ubuntu:~$ sudo vim /etc/network/interfaces {{{#!diff @@ -8,3 +8,8 @@ # The primary network interface auto eth0 iface eth0 inet dhcp + +auto eth1 +iface eth1 inet static + address 192.168.100.254 + netmask 255.255.255.0 }}} === DHCPd === * mitty@ubuntu:~$ sudo aptitude install -R dhcp3-server {{{ dhcp3-server }}} * mitty@ubuntu:~$ sudo vim /etc/default/dhcp3-server {{{#!diff @@ -8,4 +8,4 @@ # On what interfaces should the DHCP server (dhcpd) serve DHCP requests? # Separate multiple interfaces with spaces, e.g. "eth0 eth1". -INTERFACES="" +INTERFACES="eth1" }}} * mitty@ubuntu:~$ sudo vim /etc/dhcp3/dhcpd.conf {{{#!diff @@ -14,15 +14,15 @@ ddns-update-style none; # option definitions common to all supported networks... -option domain-name "example.org"; -option domain-name-servers ns1.example.org, ns2.example.org; +option domain-name "local.mitty.jp"; +option domain-name-servers 192.168.100.254; default-lease-time 600; max-lease-time 7200; # If this DHCP server is the official DHCP server for the local # network, the authoritative directive should be uncommented. -#authoritative; +authoritative; # Use this to send dhcp log messages to a different log file (you also # have to hack syslog.conf to complete the redirection). @@ -108,4 +108,12 @@ # deny members of "foo"; # range 10.0.29.10 10.0.29.230; # } -#} +#}a + +subnet 192.168.100.0 netmask 255.255.255.0 { + range 192.168.100.100 192.168.100.199; + option routers 192.168.100.254; + option ntp-servers 192.168.100.254; + option broadcast-address 192.168.100.255; + filename "/pxeboot/pxelinux.0"; +} }}} === tftpd === * see [../PXE#PrebooteXecutionEnvironment] * tftpdは使用せず、代わりにatftpdを使用する * mitty@ubuntu:~$ sudo aptitude install -R atftpd {{{ The following NEW packages will be installed: atftpd The following packages are RECOMMENDED but will NOT be installed: inetutils-inetd openbsd-inetd rlinetd xinetd 0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded. }}} * mitty@ubuntu:~$ sudo vim /etc/default/atftpd {{{#!diff @@ -1,2 +1,2 @@ -USE_INETD=true -OPTIONS="--tftpd-timeout 300 --retry-timeout 5 --mcast-port 1758 --mcast-addr 239.239.239.0-255 --mcast-ttl 1 --maxthread 100 --verbose=5 /srv/tftp" +USE_INETD=false +OPTIONS="--tftpd-timeout 300 --retry-timeout 5 --mcast-port 1758 --mcast-addr 239.239.239.0-255 --mcast-ttl 1 --maxthread 100 --verbose=5 /srv/tftp --bind-address 192.168.100.254" }}} == set data == * tftp越しに転送されるpxelinuxと、その他カーネル等を配置する * Ubuntu 10.04のsyslinuxパッケージは2:3.63+dfsg-2ubuntu3で、Debian Squeezeの起動に対応していない * see also http://syslinux.zytor.com/wiki/index.php/Download * mitty@ubuntu:~$ sudo mkdir /srv/tftp/pxeboot === Ubuntu 10.04 Lucid === * mitty@ubuntu:~$ sudo wget -m -np -nv -nH --cut-dir=8 -erobots=off http://jp.archive.ubuntu.com/ubuntu/dists/lucid/main/installer-i386/current/images/netboot/ubuntu-installer/ -P /srv/tftp/pxeboot * mitty@ubuntu:~$ sudo wget -m -np -nv -nH --cut-dir=8 -erobots=off http://jp.archive.ubuntu.com/ubuntu/dists/lucid/main/installer-amd64/current/images/netboot/ubuntu-installer/ -P /srv/tftp/pxeboot === Debian 6.0 Squeeze === * mitty@ubuntu:~$ sudo wget -m -np -nv -nH --cut-dir=8 -erobots=off http://ftp.jp.debian.org/debian/dists/squeeze/main/installer-i386/current/images/netboot/debian-installer/ -P /srv/tftp/pxeboot * mitty@ubuntu:~$ sudo wget -m -np -nv -nH --cut-dir=8 -erobots=off http://ftp.jp.debian.org/debian/dists/squeeze/main/installer-amd64/current/images/netboot/debian-installer/ -P /srv/tftp/pxeboot === remove index.html* === * mitty@ubuntu:~$ sudo rm !`find /srv/tftp/pxeboot -name *html*` === Ubuntu 10.10 Maverick === * 同様に /srv/tftp/pxeboot にミラーすると10.04 Lucidと被るため /srv/tftp/pxeboot/maverick にミラーする * それに併せて各 pxelinux cfg を書き換える * mitty@ubuntu:~$ sudo wget -m -np -nv -nH --cut-dir=8 -erobots=off http://jp.archive.ubuntu.com/ubuntu/dists/maverick/main/installer-i386/current/images/netboot/ubuntu-installer/ -P /srv/tftp/pxeboot/maverick * mitty@ubuntu:~$ sudo wget -m -np -nv -nH --cut-dir=8 -erobots=off http://jp.archive.ubuntu.com/ubuntu/dists/maverick/main/installer-amd64/current/images/netboot/ubuntu-installer/ -P /srv/tftp/pxeboot/maverick * mitty@ubuntu:~$ sudo rm !`find /srv/tftp/pxeboot/maverick -name *html*` * mitty@ubuntu:~$ sudo sed -i s#ubuntu-installer/#maverick/ubuntu-installer/#g /srv/tftp/pxeboot/maverick/ubuntu-installer/*/boot-screens/*.cfg * mitty@ubuntu:~$ sudo sed -i s#ubuntu-installer/#maverick/ubuntu-installer/#g /srv/tftp/pxeboot/maverick/ubuntu-installer/*/pxelinux.cfg/default * mitty@ubuntu:~$ sudo vim /home/lab/pxelinux.cfg/default === pxelinux.0 === * mitty@ubuntu:~$ sudo ln -s debian-installer/amd64/pxelinux.0 /srv/tftp/pxeboot/pxelinux.0 * Debian Squeezeのpxelinuxを用いる === memtest === * mitty@ubuntu:~$ sudo mkdir /srv/tftp/pxeboot/memtest * mitty@ubuntu:~$ wget http://www.memtest86.com/memtest86-3.5a.tar.gz * mitty@ubuntu:~$ tar xzf memtest86-3.5a.tar.gz * mitty@ubuntu:~$ sudo cp --preserve=timestamp memtest86-3.5a/precomp.bin /srv/tftp/pxeboot/memtest/memtest86 * mitty@ubuntu:~$ sudo wget http://www.memtest.org/download/4.20/memtest86+-4.20.bin.gz -O /srv/tftp/pxeboot/memtest/memtest86.plus.gz * mitty@ubuntu:~$ sudo gunzip /srv/tftp/pxeboot/memtest/memtest86.plus.gz * mitty@ubuntu:~$ sudo mkdir /srv/tftp/pxeboot/pxelinux.cfg * mitty@ubuntu:~$ sudo wget http://lab.mitty.jp/svn/lab/trunk/TipAndDoc/pxelinux.cfg/default -P /srv/tftp/pxeboot/pxelinux.cfg * source:lab/trunk/TipAndDoc/pxelinux.cfg/default * mitty@ubuntu:~$ sudo wget http://lab.mitty.jp/svn/lab/trunk/TipAndDoc/pxelinux.cfg/memtest.cfg -P /srv/tftp/pxeboot/pxelinux.cfg * source:lab/trunk/TipAndDoc/pxelinux.cfg/memtest.cfg == file list == * mitty@ubuntu:~$ tree /srv/tftp/pxeboot/ -a --charset=ASCII -L 3 {{{ /srv/tftp/pxeboot/ |-- debian-installer | |-- amd64 | | |-- boot-screens | | |-- initrd.gz | | |-- linux | | |-- pxelinux.0 | | `-- pxelinux.cfg | `-- i386 | |-- boot-screens | |-- initrd.gz | |-- linux | |-- pxelinux.0 | `-- pxelinux.cfg |-- maverick | `-- ubuntu-installer | |-- amd64 | `-- i386 |-- memtest | |-- memtest86 | `-- memtest86.plus |-- pxelinux.0 -> debian-installer/amd64/pxelinux.0 |-- pxelinux.cfg | |-- default | `-- memtest.cfg `-- ubuntu-installer |-- amd64 | |-- boot-screens | |-- initrd.gz | |-- linux | |-- pxelinux.0 | `-- pxelinux.cfg `-- i386 |-- boot-screens |-- initrd.gz |-- linux |-- pxelinux.0 `-- pxelinux.cfg 20 directories, 17 files }}}