1. install dhcp3-server and tftpd-hpa
2. get the netboot files
3. prepare the tftp dir
4. mount the cd images
5. share the cd mount dirs
6. edit the pxelinux.cfg/default file
7. restart services
1. install dhcp3-server and tftpd-hpa
sudo apt-get install dhcp3-server tftpd-hpa
My /etc/dhcp3/dhcpd.conf:
ddns-updates on;
option domain-name "vstrom.local";
option domain-name-servers 192.168.0.2;
default-lease-time 86400;
max-lease-time 86400;
authoritative;
log-facility local7;
# vstrom
subnet 192.168.0.0 netmask 255.255.255.0 {
option domain-name-servers 192.168.0.2;
option domain-name "vstrom.local vstrom";
option subnet-mask 255.255.255.0;
range 192.168.0.50 192.168.0.59;
option routers 192.168.0.1;
ddns-update-style ad-hoc;
filename "pxelinux.0";
next-server 192.168.0.2;
}
My /etc/default/tftpd-ha:
#Defaults for tftpd-hpa
RUN_DAEMON="yes"
OPTIONS="-l -s /var/lib/tftpboot"
2. get the netboot files
lftp -c "open http://archive.ubuntu.com/ubuntu/dists/intrepid/main/installer-i386/current/images/; mirror netboot/"
sudo mv netboot/* /var/lib/tftpboot
rm -r netboot
3. prepare the tftp dir
cd /var/lib/netboot
All I have in the tftp dir is pxelinux.0 and pxelinux.cfg so just delete the rest
Now create a distribution folder for the ubuntu installations
mkdir -p ubuntu/{intrepid,intrepid-live,jaunty,jaunty-live}4. mount the cd images
I mount my cd images in /media/
mkdir -p /media/{intrepid,intrepid-live,jaunty,jaunty-live}My /etc/fstab entries for the images:
ubuntu-8.10-desktop-i386.iso /media/intrepid-live udf,iso9660 user,auto,loop 0 0
ubuntu-8.10-alternate-i386.iso /media/intrepid udf,iso9660 user,auto,loop 0 0
jaunty-desktop-i386.iso /media/jaunty-live udf,iso9660 user,auto,loop 0 0
jaunty-alternate-i386.iso /media/jaunty udf,iso9660 user,auto,loop 0 0
(The paths to the isos are actually longer, like: /Public/OS/linux/...)
5. share the cd mount dirs
My /etc/exports entries (for nfs)
/media/intrepid-live *(insecure,rw,no_root_squash,async,no_subtree_check)
/media/intrepid *(insecure,rw,no_root_squash,async,no_subtree_check)
/media/jaunty-live *(insecure,rw,no_root_squash,async,no_subtree_check)
/media/jaunty *(insecure,rw,no_root_squash,async,no_subtree_check)
6. edit the pxelinux.cfg/default file
My /var/lib/tftpboot/pxelinux.cfg/default which is read by tftpd-hpa at start or reload
DISPLAY boot.txt
DEFAULT intrepid_live
LABEL intrepid-live
kernel ubuntu/intrepid-live/vmlinuz
append root=/dev/nfs boot=casper netboot=nfs nfsroot=192.168.0.2:/media/intrepid-live file=preseed/ubuntu.seed initrd=ubuntu/intrepid-live/initrd.gz --
LABEL intrepid
kernel ubuntu/intrepid/linux
append vga=normal initrd=ubuntu/intrepid/initrd.gz --
LABEL jaunty-live
kernel ubuntu/jaunty-live/vmlinuz
append root=/dev/nfs boot=casper netboot=nfs nfsroot=192.168.0.2:/media/intrepid-live file=preseed/ubuntu.seed initrd=ubuntu/jaunty-live/initrd.gz --
LABEL jaunty
kernel ubuntu/jaunty/linux
append vga=normal initrd=ubuntu/jaunty/initrd.gz --
LABEL gparted
kernel gparted/vmlinuz1
append initrd=gparted/initrd1.img boot=live union=aufs noswap noprompt vga=788 fetch=http://192.168.0.2/gparted/filesystem.squashfs
LABEL grml
KERNEL grml/linux26
APPEND root=/dev/nfs rw nfsroot=192.168.0.2:/media/grml boot=live lang=us nomce quiet apm=power-off nodhcp noprompt noeject initrd=grml/initrd.gz vga=791
My boot.txt, just to type the boot commands available
=============================================
Ubuntu 9.04 Jaunty Jackalope
jaunty-live
jaunty (alternative install)
Ubuntu 8.10 Intrepid Ibex
intrepid-live
intrepid (alternative install)
Tools
gparted
grml
7. restart services
sudo /etc/init.d/nfs-kernel-server restart
sudo /etc/init.d/tftpd-hpa restart

5 comments:
This is the steps that i really want to get. Thanks for your sharing bro.
Glad to help!
hi vigstrom
are you still about? can I get some help with this?
This is very helpful, and I was able to get most of it to work, and to complete an install.... but using the kernel and initrd from the ubuntu-installer directory.
However, in your example you show different kernels and initrd's, such as "kernel ubuntu/intrepid-live/vmlinuz" and I can't quite figure out where it lives or is coming from... the path doesn't quite make sense.
Hello,
I want to create an installation server installing from the alt CD or server CD. I tried your setup with the server CD it works but it does not use the packages on the CD instead it draws all from the ubuntu mirror. Do you get to work with local data only?
Post a Comment