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

Bug#703743: live-boot: BOOTIF variable improperly initialised

Source: live-boot
Version: 3.0.1-1
Severity: normal
Tags: patch

Dear Maintainer,

I'm trying to netboot an x86 system which has multiple NICs, though only
one is recognised by the BIOS/PXE boot firmware and as such the full
netboot process should happen over this interface. However, during
early-userspace live-boot attempts to probe a set of NICs which may or
may not contain the one used for PXE due to seemingly variable delays in
the NIC becoming available.

To reliably boot from the PXE-chosen bootstrap interface PXELINUX supports
appending BOOTIF=<MAC> to the kernel commandline which in-turn has some
support in live-boot. Using live-boot-3.0.1-1 (wheezy) I've observed
that the corresponding BOOTIF environment variable in early-userspace
does not contain a value that looks like a MAC, let alone the MAC of the
bootstrap adaptor.

Investigating, it appears the assignment of BOOTIF in
/lib/live/boot/9990-cmdline-old is inconsistent with other variables.
Attached is a patch that makes the assignment consistent and
successfully extracts the MAC provided on the kernel commandline.

The system information provided below is not relevant to the bug,
however this is the first bug I've reported against a Debian package so
I'm going to leave it.

-- System Information:
Debian Release: 7.0
  APT prefers testing
  APT policy: (650, 'testing'), (600, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 3.7.2 (SMP w/8 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
>From 49f26fa1811f05be42e52e847f86177c43d15c67 Mon Sep 17 00:00:00 2001
From: Andrew Jeffery <andrewj@avalon.com.au>
Date: Thu, 21 Mar 2013 09:14:53 +1030
Subject: [PATCH 1/3] 9990-cmdline-old: Properly initialise BOOTIF

Observed it being set to some value that was nothing like a MAC,
discovered that its assignment was not consistent with other variables
in body of the loop.
 scripts/boot/9990-cmdline-old |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/boot/9990-cmdline-old b/scripts/boot/9990-cmdline-old
index b8fc4a6..18bb6c3 100755
--- a/scripts/boot/9990-cmdline-old
+++ b/scripts/boot/9990-cmdline-old
@@ -15,7 +15,7 @@ Cmdline_old ()
-				BOOTIF="${x#BOOTIF=}"

Reply to: