Issues with fai-cd and static networking setup

Ulrich Zehl ulrich-listen at
Thu Mar 3 08:34:38 CET 2011

I have some servers that I want to set up with FAI and squeeze on a network
without DHCP, and I have run into problems with the network configuration
along the way.

The grub.cfg and menu.lst in /etc/fai include examples of how to set the
(static) network address of an install client (ip=...) in the format of the
Linux kernel nfsroot parameter, as also documented in the live-boot(7) man

Unfortunately, this is not how live-boot actually works (filed as bug 
#616197); it rather expects ip=<device>:<ipaddr>:<mask>:<gw>.

This grub.cfg snippet works for me:

menuentry "FAI -- server42" {
  linux   /boot/vmlinuz boot=live FAI_ACTION=install FAI_FLAGS="verbose,sshd" ip=eth0: hostname=server42
  initrd  /boot/initrd.img

This is not simply a problem with the examples, because setnet() in
get-boot-info expects the nfsroot-style format, and thus sets IPADDR=eth0,
causing problems in (my own) scripts later on.
The patch at the end of this mail fixes this issue for me.


--- a/usr/lib/fai/get-boot-info	2010-12-24 09:59:36.000000000 +0100
+++ b/usr/lib/fai/get-boot-info	2011-03-02 14:50:49.000000000 +0100
@@ -91,14 +91,16 @@
 setnet() {
     local ips=$1
+    # Device is first, ignore
+    ips=${ips#*:}
-    SERVER=${ips%%:*}
+    NETMASK=${ips%%:*}
-    ips=${ips#*:}
-    NETMASK=${ips%%:*}
+    # Server not part of static live-boot config
+    SERVER=
     cat >> $bootlog <<-EOF

More information about the linux-fai mailing list