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

Bug#467078: initramfs-tools: Network configuration can't work with multiple interfaces



Package: initramfs-tools
Version: 0.85h
Severity: normal
Tags: patch

If I want several computers to boot from the same ramdisk (with NFS
root) and some computers have multiple network interfaces, the DEVICE
variable can't be set to a specific value (e.g. eth0). Ipconfig from
klibc supports a mode, where DHCP request is sent to all interfaces
and the one receiving the first DHCP offer is used. This perfectly
suits my needs, but it can't be used with initramfs scripts because
the interface name in not known in advance and the DEVICE variable is
set to something like ::::::.

I have used the following patch to solve it:

--- initramfs-tools-0.85h.orig/scripts/nfs      2008-02-22 21:47:43.000000000 +0100
+++ initramfs-tools-0.85h/scripts/nfs   2008-02-22 21:48:48.000000000 +0100
@@ -36,8 +36,9 @@
                        ;;
        esac

-       # source relevant ipconfig output
-       . /tmp/net-${DEVICE}.conf
+       # source ipconfig output (if DEVICE refers to multiple
+       # interfaces we don't know the exact name)
+       . /tmp/net-*.conf

        # get nfs root from dhcp
        if [ "x${NFSROOT}" = "xauto" ]; then

The bug is also present in unstable, but I didn't test this patch:

--- initramfs-tools-0.91e.orig/scripts/functions        2008-02-22 20:15:06.000000000 +0100
+++ initramfs-tools-0.91e/scripts/functions     2008-02-22 20:20:10.000000000 +0100
@@ -302,6 +302,7 @@
                ;;
        esac

-       # source relevant ipconfig output
-       . /tmp/net-${DEVICE}.conf
+       # source ipconfig output (if DEVICE refers to multiple
+       # interfaces we don't know the exact name)
+       . /tmp/net-*.conf
 }


Please note, that Debian version of klibc-utils contains a bug (see
http://www.zytor.com/pipermail/klibc/2008-February/002209.html) so I
use a patched version.

Regards
Michal Sojka

-- Package-specific info:
-- /proc/cmdline
boot=NFS root=/dev/nfs nfsroot=147.32.86.9:/srv/diskless/debian,ro,tcp ro

-- /proc/filesystems
	cramfs

-- lsmod
Module                  Size  Used by
i915                   17728  2 
drm                    61332  3 i915
ipv6                  226272  22 
dm_snapshot            15552  0 
dm_mirror              19152  0 
dm_mod                 50232  2 dm_snapshot,dm_mirror
ide_disk               14848  2 
ide_cd                 36064  0 
cdrom                  32544  1 ide_cd
com20020_pci            6460  0 
com20020                4992  1 com20020_pci
arcnet                 12428  2 com20020_pci,com20020
generic                 4868  0 [permanent]
tsdev                   7520  0 
snd_intel8x0           30332  0 
snd_ac97_codec         83104  1 snd_intel8x0
snd_ac97_bus            2400  1 snd_ac97_codec
snd_pcm_oss            38368  0 
snd_mixer_oss          15200  1 snd_pcm_oss
snd_pcm                68676  3 snd_intel8x0,snd_ac97_codec,snd_pcm_oss
snd_timer              20996  1 snd_pcm
snd                    47012  6 snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,snd_timer
shpchp                 33024  0 
soundcore               9248  1 snd
pci_hotplug            28704  1 shpchp
ata_piix               13896  0 
psmouse                35016  0 
parport_pc             32132  0 
i2c_i801                7468  0 
rtc                    12372  0 
serio_raw               6660  0 
parport                33256  1 parport_pc
piix                    9444  0 [permanent]
ide_core              110504  4 ide_disk,ide_cd,generic,piix
snd_page_alloc         10184  2 snd_intel8x0,snd_pcm
intel_rng               5088  0 
i2c_core               19680  1 i2c_i801
libata                 89396  1 ata_piix
pcspkr                  3072  0 
scsi_mod              124168  1 libata
floppy                 53156  0 
intel_agp              22204  1 
agpgart                29896  3 drm,intel_agp
evdev                   9088  1 
nfs                   202828  3 
lockd                  54344  2 nfs
nfs_acl                 3584  1 nfs
sunrpc                138812  4 nfs,lockd,nfs_acl
e100                   32232  0 
3c59x                  40360  0 
mii                     5344  2 e100,3c59x
ehci_hcd               28136  0 
uhci_hcd               21164  0 
usbcore               112644  3 ehci_hcd,uhci_hcd
thermal                13608  0 
processor              28840  1 thermal
fan                     4804  0 
unionfs                68740  1 
sky2                   36164  0 

-- kernel-img.conf
# Kernel Image management overrides
# See kernel-img.conf(5) for details
do_symlinks = Yes


-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-6-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages initramfs-tools depends on:
ii  busybox                       1:1.1.3-4  Tiny utilities for small and embed
ii  cpio                          2.6-17     GNU cpio -- a program to manage ar
ii  klibc-utils                   1.4.34-3   small statically-linked utilities 
ii  module-init-tools             3.3-pre4-2 tools for managing Linux kernel mo
ii  udev                          0.105-4    /dev/ and hotplug management daemo

initramfs-tools recommends no packages.

-- no debconf information



Reply to: