StatelessLinux/PrepareImage

= Stateless Linux - Preparing An Image =

See  Stateless Linux HOWTO

Once you have prepared a base image, you need to modify it so that it can be used by stateless clients.

One thing to bear in mind is that the same image should be usable on a client using NFS root, NFS loop root, cached root or, indeed, by a standalone system or a Xen guest.

The basic things you must do are:


 * Switch on readonly-root:

$> echo "READONLY=yes" > /etc/sysconfig/readonly-root

This ensures that the init scripts do not remount the root filesystem read-write and various directories (see ) are made writable using tmpfs mounts.


 * Remove the  and   entries from


 * Disable firstboot:

$> echo "RUN_FIRSTBOOT=no" > nfs/etc/sysconfig/firstboot

You should also:


 * Check the network interface is configured to use DHCP:

$> cat > /etc/sysconfig/networking-scripts/ifcfg-eth0 << EOF DEVICE=eth0 ONBOOT=yes BOOTPROTO=dhcp EOF


 * Configure the firewall

FIXME: details


 * Ensure  exists or the attempt to mount a   on   will fail trying to lock

FIXME: this seems bogus; we should be able to survive this


 * Run all the default cronjobs

FIXME: why? what does this fix?


 * Remove unwanted files

FIXME: what leaves all these lying around? Can we fix them to not be left around?


 * and  : temporary files
 * : client's will get the nameservers using DHCP
 * : what's this?
 * : stale RPM locks

Notes:


 * With your NIC configured to use DHCP, you need  in order for the lease obtained by the initrd to be passed to the   that gets run later