Current status of multi-homes machines
Stephan Hermann
sh at sourcecode.de
Mon Dec 13 15:37:23 CET 2010
Hi Carsten,
On Thu, 2010-12-09 at 10:13 +0100, Carsten Aulbert wrote:
> Hi
>
> On Tuesday 07 December 2010 12:27:15 Stephan Hermann wrote:
> > >
> > > But I can certainly try IPAPPEND=2 as well
> >
> > No Sorry...it's IPAPPEND 2
> >
> > But this works here...with the changes on initramfs-live
>
> No, Tried it with IPAPPEND 2 as well as IPAPPEND 3 with a standard squeeze
> NFSroot and FAI 3.4.5 as well as with grml's patched live-initramfs...
>
> I'll probably start from scratch in case I changed something without
> remembering.
please check the following in your NFSROOT:
1. /usr/share/initramfs-tools/scripts/live
in function Arguments there should be something like
BOOTIF=*)
BOOTIF="${x#BOOTIF=}"
;;
and in function do_netmount
there should be something similar like this:
if [ -n "${BOOTIF}" ]; then
# pxelinux sets BOOTIF to a value based on the mac
address of the
# network card used to PXE boot, so use this value for
DEVICE rather
# than a hard-coded device name from initramfs.conf.
this facilitates
# network booting when machines may have multiple
network cards.
# pxelinux sets BOOTIF to 01-$mac_address
# strip off the leading "01-", which isn't part of the
mac
# address
temp_mac=${BOOTIF#*-}
# convert to typical mac address format by replacing "-"
with ":"
bootif_mac=""
IFS='-'
for x in $temp_mac ; do
if [ -z "$bootif_mac" ]; then
bootif_mac="$x"
else
bootif_mac="$bootif_mac:$x"
fi
done
unset IFS
# look for devices with matching mac address, and set
DEVICE to
# appropriate value if match is found.
for device in /sys/class/net/* ; do
if [ -f "$device/address" ]; then
current_mac=$(cat "$device/address")
if [ "$bootif_mac" = "$current_mac" ];
then
DEVICE=${device##*/}
break
fi
fi
done
fi
Regards,
\ſh
--
Stephan '\sh' Hermann
SysAdmin / Ubuntu Developer
xmpp: sh at sourcecode.de
More information about the linux-fai
mailing list