HowTo use FAI under GUTSY
FAI under Ubuntu Gutsy is currently broken :
- make-fai-bootfloppy doesn't work since FAI 3.2 because the kernels are getting to large to fit on the floppy. This problem even affects you if you only create a CD, since it's getting created as a floppy first.
- the Kernel in Ubuntu Gutsy has a version of Union-nfs which doen't support NFS. This is necessary for FAI to work
The first problem can be solved easily by tweaking the grub of the FAI-CD to boot on our NFSROOT on the network. Note that the kernel on the boot media (FAI-CD) must be the same than the one on the NFSROOT, so we will need to construct our own FAI-CD.
The second problem is a little trickier to circumvent. We will need to create a NFSROOT under Feisty so that FAI can boot on it. And we will copy the Gutsy installation base in it, so that it install Gutsy.
I'm upgrading a working Dapper FAI installation system, so I may unintentionally (or lazily) skip some steps. Feel free to correct and complete me, this is a wiki.
Installing FAI on the server
I use the FAI packages from the Ubuntu Fai PPA to have more recent package, but also to have the same FAI version between Feisty and Gutsy.
Put this line in your source.list to enable the PPA repository:
deb http://ppa.launchpad.net/fai/ubuntu gutsy main
then install the fai-packages
apt-get install nfs-kernel-server fai-doc fai-server
Create the Mirror
We will create a local copy of the Ubuntu Gutsy repository that we will export to our client via NFS. It speeds up the installation and gives us the extra avantage of having control on version and update. We use the directory /mirror
- apt-get install debmirror
debmirror --progress --method=http --proxy=http://di-net:80/ --verbose --nosource --arch=i386 --dist=gutsy,gutsy-security,gutsy-updates,gutsy-backports --section=main,restricted,universe,multiverse --host=ubuntu.mirrors.skynet.be --root=pub/ubuntu.com/ubuntu/ /mirror
Adapt the command to your needs. The whole gutsy mirror takes 20GB, but you probably don't really need everything.
apt-proxy
As an extra, I have installed an apt-cache server so it doesn't have to re-download the feisty packages every time I reconstruct the NFSROOT. You may skip this step if you have a very fast connection.
apt-get install apt-proxy
Then configure /etc/apt-proxy/apt-proxy-v2.conf Add proxy info if you have any, change the ubuntu repository to a local one to go faster. And add this section for the Ubuntu FAI PPA :
[fai]
backends = http://ppa.launchpad.net/fai/ubuntu
min_refresh_delay = 15m
Gutsy NFSROOT
Now let's configure FAI so that we can construct a Gutsy NFSROOT.
Change the FAI_DEBOOTSTRAP variable in /etc/fai/make-fai-nfsroot.conf so that it uses our mirror :
FAI_DEBOOTSTRAP="gutsy http://192.168.0.100:9999/ubuntu/"
Do the same with the source.list provided in /etc/fai/apt. It's the one used to create the NFSROOT. Configure fai.conf and NFSROOT files to your tastes. Don't forget to indicate your mirror in FAI_DEBMIRROR.
Now launch the construction of the NFSROOT :
make-fai-nfsroot
Make a backup of the file /var/tmp/base.tgz in your NFSROOT, it's the one that matters.
Feisty NFSROOT
Now let's create the Feisty NFSROOT on which we will boot.
Change the FAI_DEBOOTSTRAP variable in /etc/fai/make-fai-nfsroot.conf to install Feisty in our NFSROOT.
FAI_DEBOOTSTRAP=“feisty http://192.168.0.100:9999/ubuntu/”
If you didn't install apt-proxy, use an external repository instead.
We also need to modify the source.list to Feisty or it will upgrade our NFSROOT to Gutsy, and we absolutly don't want that since that will update to the buggy kernel version. Keep a copy of the Gutsy one : we will need it after.
deb http://192.168.0.100:9999/ubuntu feisty main universe
deb http://192.168.0.100:9999/fai feisty main universe
Recreate the NFSROOT :
make-setup
(this command creates the nfsroot but also creates your nfs exports)
When this is done, copy the base.tgz from the Gutsy NFSROOT (you did make a backup right?), and move the Gutsy source.file in the etc/apt/source.list of your NFSROOT.
Boot CD
Now let's create a CD so we can boot on the clients machines.
We will first need to modify the grub menu that will be installed on these CDs so that it will boot on our server's NFSROOT instead of its own copy of the NFSROOT. The file is in /etc/fai/menu.lst. Here is what I have in mine : # grub menu.lst for fai-cd
# Boot automatically after some secs.
timeout 30
color light-gray/black light-gray/red
default 0
title Fully Automatic Installation for NO4
root (cd)
kernel /boot/vmlinuz root=/dev/nfs boot=live FAI_FLAGS=“verbose,createvt” FAI_ACTION=install ip=dhcp rw nfsroot=192.168.0.100:/fai/nfsroot/
initrd /boot/initrd.img
Finally we can build the CD image :
fai-cd -m /tmp/bla -f cd_gutsy.iso
The directory /tmp/bla is an empty directory since we don't need to copy any package to the cd.
I haven't tested it but you can also use the command fai-cd to create a bootable FAI USB stick, read the man-page for more info.
Burn it, boot it, and pray that is noodly appendages may bless you.