Version 6 (modified by mitty, 14 years ago) (diff) |
---|
How to multiboot with syslinux/pxelinux
- see PXE/pxelinux
- #52
setup NIC and servers
- eth1を192.168.100.254に固定し、dhcpdとtftpdを立てる
NIC
- mitty@ubuntu:~$ sudo vim /etc/network/interfaces
@@ -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
@@ -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
@@ -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
- 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
@@ -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の起動に対応していない
- 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
- mitty@ubuntu:~$ sudo rm `find /srv/tftp/pxeboot -name *html*`
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
- mitty@ubuntu:~$ sudo wget http://lab.mitty.jp/svn/lab/trunk/TipAndDoc/pxelinux.cfg/memtest.cfg -P /srv/tftp/pxeboot/pxelinux.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 |-- 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 16 directories, 17 files
Attachments (1)
- pxe-multiboot.png (27.9 KB) - added by mitty 14 years ago.
Download all attachments as: .zip