[clug] some notes on last nights talk

Robert Edwards bob at cs.anu.edu.au
Fri May 26 01:40:12 GMT 2006

Here are some notes on what I did last night at CLUG. A couple
of things I forgot to do and say:
  - forgot to remove /etc/hostname on client image (debootstrap
	copies this from the host, so both had the same hostname!)
  - also need to apt-get install dhcp3-client on image so that
	client can get it's hostname from dhcp
  - meant to say that a diskless client

To get server ready to serve a PXE client:

apt-get install dhcp3-server tftpd-hpa syslinux

need to:
  - configure /etc/dhcp3/dhcpd.conf
  - mkdir /var/lib/tftpboot/pxelinux.cfg
  - cp /usr/lib/syslinux/pxelinux.0 /var/lib/tftpboot

To create the image for the client(s), need a directory
with about 2Gb free (I used LVM to create a dedicated
file-system called /image1)

apt-get install debootstrap

debootstrap dapper /image1 http://au.archive.ubuntu.com/ubuntu/

(wait for the basic install)

chroot into /image1

install linux-source, build-essential (compilers etc.):
apt-get install linux-source-2.6.15 build-essential libncurses5-dev

untar, configure and build the kernel in the chroot env.
install the kernel and the modules in the chroot

apt-get install nfs-common ssh dhcp3-client

configure /etc/fstab, /etc/network/interfaces
remove /etc/hostname

out of the chroot, you need a script to build the initial RAM disk
with everything from the image directory, except:
  - /boot
  - /usr
  - /var/cache/apt
  - /var/cache/debconf
  - /var/lib/apt
  - /var/lib/dpkg

copy the initial RAM disk image and the kernel image into

Write a /var/lib/tftpboot/pxelinux.cfg/default file with the
name of the kernel and initial RAM disk:

LABEL linux
   KERNEL vmlinuz-image1
   APPEND initrd=image1.gz ramdisk=49152 root=/dev/ram0 rw udev 

(re)start dhcp3, tftpd and boot up your diskless machine.

Let me know if you need more details. One day I'll script a lot
of this and package it all up nicely!!!

Bob Edwards.

More information about the linux mailing list