wiki:TipAndDoc/boot/multiboot

How to multiboot with syslinux/pxelinux

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

  • mitty@ubuntu:~$ sudo mkdir /srv/tftp/pxeboot

Ubuntu 10.04 Lucid

Debian 6.0 Squeeze

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 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

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
    
Last modified 14 years ago Last modified on Mar 6, 2011 10:57:58 PM

Attachments (1)

Download all attachments as: .zip