Академический Документы
Профессиональный Документы
Культура Документы
How to use PXE network boot to install workstations automatically. This article is
a work in progress. Copyright 2006-2008 Tero Karvinen
next-server 172.28.1.103;
filename "pxelinux.0";
Install TFTP server. Also install client for testing. Trivial file transfer
protocol is not related to FTP.
Configure TFTP server. Notice nice path for TFTPd root (don�t use
�/tftpsomething�). In RUN_DAEMON, �yes� must be small caps.
# /etc/default/tftpd-hpa
RUN_DAEMON="yes"
OPTIONS="-l -s /home/pxetero/"
Allow your normal user to modify /home/pxetero/. Ues your own username and group
instead of tkarvine.
$ whoami
tkarvine
$ sudo chown pxetero.tkarvine /home/pxetero/
$ sudo chmod g+rwx /home/pxetero
Now you can modify files in TFTPd root dir (/home/pxetero/) without using sudo.
$ cd /home/pxetero
$ wget -np -r http://archive.ubuntu.com/ubuntu/dists/breezy/main/installer-
i386/current/images/netboot/
$ mv archive.ubuntu.com/ubuntu/dists/breezy/main/installer-
i386/current/images/netboot/* .
$ rm -rf archive.ubuntu.com/
Kernel �linux� and initial RAM disk image �initrd.gz� must match the version of
your distribution. Change version nickname (breezy, dapper, feisty, gutsy) in the
url accordingly. For example, 7.04 Feisty�s kernel and initrd are
http://archive.ubuntu.com/ubuntu/dists/feisty/main/installer-
i386/current/images/netboot/ubuntu-installer/i386/initrd.gz and
http://archive.ubuntu.com/ubuntu/dists/feisty/main/installer-
i386/current/images/netboot/ubuntu-installer/i386/linux
Start TFTP server and test it
Now that it works (pxelinux.0 was downloaded successfully), start DHCP server:
Boot your target workstation (the one whose MAC number is in dhcpd.conf). The
installer should start automatically.
$ nano /home/pxetero/pxelinux.cfg/default
Under �label linux�, in the end of �append� row, add your kickstart like
ks=http://www.example.com/ks.cfg
timeout 100
Now that you boot your workstation from network, kickstart should work and
workstation should install automatically.
You can even automate waking up the computer from shutdown state. Enable
�universe�, and install �wakeonlan� or �etherwake�.
Try booting the client computer (either manually choosing network boot or by magic
packet). If the installer starts and asks for language, congratulations, your
setup works!
What Next?
In Helia labs, boot with magic packet usually works once, and the it does not work
for a long while. Probably related to switch settings.
It works, now what? - Collect IP numbers from switch - Make your own mirror of all
ubuntu packages (use wget -r -X to download) - Test the whole package: magic
packet, pxe, kickstart
Appendix: Modified dhcpd.conf for PXE
display ubuntu-installer/i386/boot-screens/syslinux.txt
default linux
F1 ubuntu-installer/i386/boot-screens/f1.txt
F2 ubuntu-installer/i386/boot-screens/f2.txt
F3 ubuntu-installer/i386/boot-screens/f3.txt
F4 ubuntu-installer/i386/boot-screens/f4.txt
F5 ubuntu-installer/i386/boot-screens/f5.txt
F6 ubuntu-installer/i386/boot-screens/f6.txt
F7 ubuntu-installer/i386/boot-screens/f7.txt
F8 ubuntu-installer/i386/boot-screens/f8.txt
F9 ubuntu-installer/i386/boot-screens/f9.txt
F0 ubuntu-installer/i386/boot-screens/f10.txt
label linux
kernel ubuntu-installer/i386/linux
append vga=normal initrd=ubuntu-installer/i386/initrd.gz
ramdisk_size=16432 root=/dev/rd/0 rw -- ks=http://iki.fi/karvinen/notexists-
ks.cfg
label expert
kernel ubuntu-installer/i386/linux
append DEBCONF_PRIORITY=low vga=normal initrd=ubuntu-
installer/i386/initrd.gz ramdisk_size=16432 root=/dev/rd/0 rw --
label server
kernel ubuntu-installer/i386/linux
append base-config/package-selection= base-config/install-language-
support=false vga=normal initrd=ubuntu-installer/i386/initrd.gz ramdisk_size=16432
root=/dev/rd/0 rw --
label server-expert
kernel ubuntu-installer/i386/linux
append base-config/package-selection= base-config/install-language-
support=false DEBCONF_PRIORITY=low vga=normal initrd=ubuntu-
installer/i386/initrd.gz
ramdisk_size=16432 root=/dev/rd/0 rw --
prompt 1
timeout 20