It should be possible to share a running live CD on the network, for use by thin clients or other machines without a CD drive.


Being able to share a live CD with machines that don't have a CD-ROM drive for installation is useful. Sharing the live CD to machines which doesn't have a CD-ROM can be useful too, by treating the live CD as a poor-man's server.

Use cases


Affects the live seeds, casper and a new tool which will allow the user to control sharing of the live CD.

Design and implementation

Write a simple graphical tool which does the following:

Outstanding issues

Prototype machine configuration

For I (RobertCollins) setup a machine that shared out a liveCD, perhaps called a LiveNetboot ;). Anyway, thats really what this spec aims to automate the creation of, so I figure this is a good place to document what was involved in getting an edgy i386 environment working.

TODO to make the prototype more useful for this spec

  • Generate the NFS exports via a script, or provide some form of $LOCAL_NET etc for the NFS permissions.
  • Investigate why GFXBOOT and GFXBOOT-BACKGROUND are not recognized by pzelinux.

1. I copied the ISO to the local disk for performance, and then loopback mounted it for nfs export:

$ sudo mount isos/ubuntu-6.10-desktop-i386.iso /mnt/ubuntu610 -o loop=/dev/loop1
$ cat /etc/exports

1. I configured up dhcpd for boot loading - the entire /etc/dhcpd.conf is:

allow bootp; allow booting;
# option definitions common to all supported networks...
option domain-name "";
option domain-name-servers;

option subnet-mask;
default-lease-time 60000;
max-lease-time 7200;

subnet netmask {
  option broadcast-address;
  option routers;
  next-server; # tftp boot server, same as this machine *in this case*.
  filename "pxelinux.0";

1. Installed atftpd, my preferred tftpd. This is configured via the inetd line:

tftp            dgram   udp     wait    nobody /usr/sbin/tcpd /usr/sbin/in.tftpd --tftpd-timeout 300 --retry-timeout 5   --no-blksize --no-multicast    --maxthread 100 --verbose=5  /tftpboot

1. Install pxelinux:

sudo apt-get install syslinux
sudo cp /usr/lib/syslinux/pxelinux.0 /tftpboot/
sudo mkdir /tftpboot/pxelinux.cfg

1. Setup architecture config. (I was allowing for more than one netboot architecture, this spec does not need that, but - may as well do it cleanly).

sudo cp -a /mnt/ubuntu610/isolinux /tftpboot/i386
# see the pxelinux documentation for the search path - this should match 
# the subnet being served from dhcpd, at enough granularity to be accurate
# to the right architecture.
sudo cp /mnt/ubuntu610/isolinux/isolinux.cfg /tftpboot/pxelinux.cfg/C
# I did this by hand, need to automate:
sudo vim C
# change /casper/vmlinuz to i386/vmlinuz throughout
# change /casper/initrd.gz to i386/initrd.gz
# change /casper/bootlogo to i386/bootlogo
# for the default, live, xforce-vesa APPEND lines append the NFS root option to boot:
# netboot=nfs nfsroot=
# change the DISPLAY line to i386/isolinux.txt, and the F? lines likewise.

# link the boot image to the root where pxelinux looks - should be arch neutral
sudo ln -s /tftpboot/i386/splash.rle /tftpboot/
sudo ln -s /tftpboot/i386/splash.pcx /tftpboot/

1. Create a new kernel and initramfs capable of NFS booting casper, in feisty this step should not be needed as casper will have NFS support.

  • sudo rm /tftpboot/i386/vmlinuz /tftpboot/i386/initrd.gz
  • Install a version of casper with NFS support. I had to use the debian version, as ubuntu was literally merging the relevant changes at the same time. I needed to rollback some changes from debian, to fit with the edgy squashfs, which we want to use unaltered.
    • grep for live_media in /usr/share/initramfs-tools/ and change it to cdrom

    • edit /etc/casper.conf and set the user and hostname variables to 'ubuntu', and the BUILD_SYSTEM one to 'Ubuntu'.
    • edit /usr/share/initramfs-tools/scripts/casper and make udev be run totally earlier, to get full network support:

--- debiancasper/usr/share/initramfs-tools/scripts/casper       2006-12-03 03:02:11.000000000 +1100
+++ /usr/share/initramfs-tools/scripts/casper   2007-01-09 18:04:17.000000000 +1100
@@ -226,6 +226,10 @@

     modprobe "${MP_QUIET}" af_packet # For DHCP

+    # ask udev to find network devices.
+    sbin/udevtrigger # -bpci -Iclass=0x06* if we want to limit it to just network cards, but it should be fine as is.
+    sbin/udevsettle
     ipconfig ${DEVICE} /tmp/net-${DEVICE}.conf | tee /netboot.config

     if [ "${NFSROOT}" = "auto" ]; then
  • Generate a new initrd and copy the desired vmlinuz into place:

sudo cp /boot/vmlinuz-VERSION /tftpboot/i386/vmlinuz
sudo mkinitramfs -o /tftpboot/i386/initrd.gz VERSION

1. Check portmap is listening on all interfaces:

$ cat /etc/default/portmap

1. Start your NFS server and restart portmap. You may also need to check /etc/hosts.allow to ensure access is permitted.

At this point, clients can netboot, and will come up just like the liveCD, be able to perform installations and run applications. Network access may glitch, as resolv.conf wasn't correctly configured for me, we should look at passing that through from casper.


LiveCDShareThisCD (last edited 2008-08-06 17:00:57 by localhost)