While reading the PXELINUX documentation I came across an option which may be of use [1]. Adding 'ipappend 2' to the host's pxelinux config file makes PXELINUX append the mac address of that interface to the kernel options.
Example:
BOOTIF=01-AA-BB-CC-DD-EE-FF
This allows the initrd to access to the mac address of the interface which PXE booted and is probably the interface we want to use for DHCP.
Obviously, this allows someone to set this kernel option without the need for PXE booting (which is an added bonus).
I have written a script (attached) which I'm executing from the debian-installer-startup.d directory of the initrd. The script reads the value of the 'BOOTIF' kernel option and looks to see if there is an interface name with this mac address. It then uses 'debconf-set' to change the 'netcfg/choose_interface' option to this interface name.
The script may be a little rough around the edges, and specific to PXELINUX, but seems to work when tested on a variety of hardware running Hardy (8.04.2).
Example
/var/lib/tftpboot/pxelinux.cfg/default:
LABEL install
kernel hardy-amd64
ipappend 2
append interface=auto [the rest of your options]
While reading the PXELINUX documentation I came across an option which may be of use [1]. Adding 'ipappend 2' to the host's pxelinux config file makes PXELINUX append the mac address of that interface to the kernel options.
Example:
BOOTIF= 01-AA-BB- CC-DD-EE- FF
This allows the initrd to access to the mac address of the interface which PXE booted and is probably the interface we want to use for DHCP.
Obviously, this allows someone to set this kernel option without the need for PXE booting (which is an added bonus).
I have written a script (attached) which I'm executing from the debian- installer- startup. d directory of the initrd. The script reads the value of the 'BOOTIF' kernel option and looks to see if there is an interface name with this mac address. It then uses 'debconf-set' to change the 'netcfg/ choose_ interface' option to this interface name.
The script may be a little rough around the edges, and specific to PXELINUX, but seems to work when tested on a variety of hardware running Hardy (8.04.2).
Example
/var/lib/ tftpboot/ pxelinux. cfg/default:
LABEL install
kernel hardy-amd64
ipappend 2
append interface=auto [the rest of your options]
[1]: http:// syslinux. zytor.com/ wiki/index. php/SYSLINUX# IPAPPEND_ flag_val_ .5BPXELINUX_ only.5D