Sunday, June 4

Ubuntu dapper PXE network install

I've been testing out the Ubuntu network install environment today. All you need to use the PXE installer is to configure a DHCP server and TFTP server on your network, if you want a more hands off install you can use a "preseed" file. Quite easy to use and it is much more flexible then the ananconda kickstart files.
Ubuntu actually support the kickstart file format as well, so if you don't want to learn the new preconfigure "preseed" format you can just write a normal kickstart syntax file and netboot Ubuntu exactly the same way you would a Redhat/Centos/Fedora box.

Simple instructions on how to configure a Ubuntu netboot server. My install server "tessy" has IP 192.168.95.20 in this example and I'm installing the VIA C3 shoebox PC "elmer" with IP 192.168.95.30.
Don't forget to disable any other DHCP servers you may have on the network such as in broadband routers. Download the netboot.tar.gz and Ubuntu ISO of your choice. I saved both files in the /dl volume on my server.
apt-get install tftpd-hpa
apt-get install dhcp3-server
mkdir -p /var/www/ubuntu-606-server-i386/
mount -o loop /dl/ubuntu-6.06-server-i386.iso /var/www/ubuntu-606-server-i386/
tar xzvf /dl/netboot.tar.gz -C /var/lib/tftpboot

Update the following files to suite your setup:
/etc/default/tftpd-hpa
RUN_DAEMON="yes"
OPTIONS="-l -s /var/lib/tftpboot"


/etc/dhcp3/dhcpd.conf
ddns-update-style none;
option domain-name "hifichoice.com";
option domain-name-servers 83.146.21.6, 212.158.248.5;
ping-check = 1;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
subnet 192.168.95.0 netmask 255.255.255.0 {
range 192.168.95.100 192.168.95.150;
option routers 192.168.95.1;
filename="pxelinux.0";
next-server 192.168.95.20;
}


/var/lib/tftpboot/pxelinux.cfg/default
DISPLAY ubuntu-installer/i386/boot-screens/boot.txt
PROMPT 1
TIMEOUT 0
label install-simple
kernel ubuntu-installer/i386/linux
append initrd=ubuntu-installer/i386/initrd.gz \ -
ramdisk_size=14984 root=/dev/rd/0 rw preseed/locale=en_US \ -
kbd-chooser/method=us netcfg/wireless_wep= netcfg/choose_interface=eth0 \ -
netcfg/get_hostname=elmer preseed/url=http://192.168.95.20/preseed-606-auto.cfg --
LABEL install
kernel ubuntu-installer/i386/linux
append vga=normal initrd=ubuntu-installer/i386/initrd.gz ramdisk_size=14332 \ -
root=/dev/rd/0 rw --

My /var/www/preseed-606-auto.cfg
You'll get a few prompts, but nothing annoying. I'll have a deeper look into the preseed file format some other day. I'm sure a hands-off install is possible.

The Ubuntu wiki has a netboot article here and you can read more about the preseed file here.

135 comments: