Issues with fai-cd and static networking setup
Ulrich Zehl
ulrich-listen at topfen.net
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
page.
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:
--<snip>--
menuentry "FAI -- server42" {
linux /boot/vmlinuz boot=live FAI_ACTION=install FAI_FLAGS="verbose,sshd" ip=eth0:192.168.1.10:255.255.255.0:192.168.1.1 hostname=server42
initrd /boot/initrd.img
}
--<snip>--
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.
Regards,
Ulrich
--- 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#*:}
IPADDR=${ips%%:*}
ips=${ips#*:}
- SERVER=${ips%%:*}
+ NETMASK=${ips%%:*}
ips=${ips#*:}
GATEWAYS=${ips%%:*}
- ips=${ips#*:}
- NETMASK=${ips%%:*}
BROADCAST=${IPADDR%\.*}.255
+ # Server not part of static live-boot config
+ SERVER=
cat >> $bootlog <<-EOF
IPADDR=$IPADDR
More information about the linux-fai
mailing list