[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#615600: BOOTIF= kernel commandline option does not work

On Sun, Feb 27, 2011 at 04:22:28PM -0400, Joey Hess wrote:
> Thomas Mieslinger wrote:
> > I try to install a HP DL180G6 fully automated. The Server has an
> > addtional dualport NIC. kernel and initrd are loaded over the NIC
> > labeled 0 on the Box, after the kernel has initialized all NICs the
> > first Ethernet on the add in card is eth0.
> > 
> > ~ # cat /proc/cmdline
> > initrd=/boot/DEBIAN6_x8664/initrd.gz
> > preseed/url=
> BOOTIF is a pxelinux boot parameter. It is supported by the Debian
> initramfs when pxe booting, but it is not supported by the Debian
> installer.
> Perhaps it should be. In the meantime, you can use the documented
> preseeding interface of booting with interface=eth1. I don't think
> netcfg allows specifying a interface by MAC though.

I guess the following changes do kind of a job:
etc/udev/rules.d/69-bootif.rules (inside the installer's initrd)
ACTION=="add", SUBSYSTEM=="net", IMPORT{program}="bootif $attr{address}"

lib/udev/bootif (inside the installer's initrd)

bootif="$(< /proc/cmdline sed 's/.*[[:space:]]BOOTIF=\([-0-9A-Fa-f]\+\).*/\1/' | tr '[A-F-]' '[a-f:]')"

if [ "01:$1" = "$bootif" ]; then
  echo INTERFACE_NAME=eth0

Unfortunately, this seems to go a little too far. My test system comes
up with the second interface being the bootif, so it's eth1 without
these additions. With my additions, the following numbering happens:

MAC Address    without additions    with additions
     A            eth0                 eth4
     B            eth1                 eth0
     C            eth2                 eth3
     D            eth3                 eth5

The /etc/udev/rules.d/70-persistent-net.rules that is being generated
has the first interface found twice:

ATTR{address}   NAME with additions
     C            eth2
     C            eth3
     B            eth0
     A	          eth4
     D            eth5

I guess there may be a race going on. Is there any possibility to have
bootif honored without generating a broken 70-persistent-net.rules and
with still having the interfaces numbered consecutively?


Marc Haber         | "I don't trust Computers. They | Mailadresse im Header
Mannheim, Germany  |  lose things."    Winona Ryder | Fon: *49 621 72739834
Nordisch by Nature |  How to make an American Quilt | Fax: *49 621 72739835

Reply to: