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

Bug#627883: initramfs-tools: uses wrong NIC for DHCP, persistent-net invents "eth1-eth0"?



Package: initramfs-tools
Version: 0.98.8
Severity: normal

Description
===========

On a network booting machine with

oper@watt:~$ zcat /boot/initrd.img-2.6.32-5-amd64 | cpio -i --to-stdout lib/udev/rules.d/70-persistent-net.rules
# lindi: ethernet port #1 (BIOS boots using this)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:25:90:36:c0:d2", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x10ec (ixgbe)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:21:a1:d7:83", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

# PCI device 0x8086:0x10ec (ixgbe)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1b:21:a1:d7:82", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"

# PCI device 0x8086:0x10c9 (igb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:25:90:36:c0:d3", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
53853 blocks

and

$ grep DEVICE= /etc/initramfs-tools/initramfs.conf
DEVICE=eth0

I see that ipconfig gets stuck at bootup trying to send DHCP requests
over a NIC whose MAC is not 00:25:90:36:c0:d2.

Troubleshooting
===============

I placed a call to "/bin/sh" just before configure_networking call in

oper@watt:~$ zcat /boot/initrd.img-2.6.32-5-amd64 | cpio -i --to-stdout scripts/nfs | head -n15
# NFS filesystem mounting                       -*- shell-script -*-

# FIXME This needs error checking

retry_nr=0

# parse nfs bootargs and mount nfs
do_nfsmount()
{

        configure_networking

        # get nfs root from dhcp
        if [ "x${NFSROOT}" = "xauto" ]; then
                # check if server ip is part of dhcp root-path



>From this shell I see that the right NIC (i.e. the one with MAC of
00:25:90:36:c0:d2) has the name "eth1-eth0" and "eth0" is a wrong NIC. I
can see in source code of udev that it sometimes generates such names
but I don't fully understand the logic behind that. I did

rmmod ixgbe
rmmod igb
modprobe igb
modprobe ixgbe

and suddenly 00:25:90:36:c0:d2 was correctly named eth0.

The machine has 36 SATA disks and it takes a while to detect
them. Maybe there's a race condition somewhere?

As a workaround I'm now calling my 00:25:90:36:c0:d2 NIC "net0"
instead of "eth0".


-- Package-specific info:
-- initramfs sizes
-rw-r--r-- 1 root root 9.1M May 23 16:01 /boot/initrd.img-2.6.32-5-amd64
-- /proc/cmdline
root=/dev/nfs initrd=watt/initrd.img nfsroot=10.8.8.8:/tftpboot/watt ip=dhcp sysrq_always_enabled break=top BOOT_IMAGE=watt/vmlinuz 

-- resume
RESUME=UUID=d2e19371-27b1-4826-9d93-dd0f4e1f0ea3
-- /proc/filesystems

-- lsmod
Module                  Size  Used by
loop                   11799  0 
snd_pcm                60503  0 
snd_timer              15582  1 snd_pcm
snd                    46446  2 snd_pcm,snd_timer
soundcore               4598  1 snd
snd_page_alloc          6249  1 snd_pcm
psmouse                49937  0 
joydev                  8459  0 
pcspkr                  1699  0 
serio_raw               3752  0 
i2c_i801                7830  0 
evdev                   7352  4 
ioatdma                34876  32 
i2c_core               15819  1 i2c_i801
button                  4650  0 
processor              29935  16 
nfs                   241114  1 
lockd                  57603  1 nfs
fscache                29834  1 nfs
nfs_acl                 2031  1 nfs
auth_rpcgss            33476  1 nfs
sunrpc                161541  9 nfs,lockd,nfs_acl,auth_rpcgss
sd_mod                 29921  0 
crc_t10dif              1276  1 sd_mod
usbhid                 33292  0 
hid                    63257  1 usbhid
uhci_hcd               18521  0 
ehci_hcd               32081  0 
ixgbe                 106622  0 
usbcore               122386  4 usbhid,uhci_hcd,ehci_hcd
mpt2sas                87773  0 
scsi_transport_sas     19865  1 mpt2sas
mdio                    3096  1 ixgbe
scsi_mod              122149  3 sd_mod,mpt2sas,scsi_transport_sas
nls_base                6377  1 usbcore
igb                    77959  0 
dca                     3761  3 ioatdma,ixgbe,igb
thermal                11674  0 
thermal_sys            11942  2 processor,thermal

-- /etc/initramfs-tools/modules

-- /etc/kernel-img.conf
# Kernel image management overrides
# See kernel-img.conf(5) for details
do_symlinks = yes
do_bootloader = no
do_initrd = yes
link_in_boot = no

-- /etc/initramfs-tools/initramfs.conf
MODULES=most
BUSYBOX=y
KEYMAP=n
COMPRESS=gzip
BOOT=nfs
DEVICE=eth0
NFSROOT=auto

-- /etc/initramfs-tools/update-initramfs.conf
update_initramfs=yes
backup_initramfs=no

-- mkinitramfs hooks
/etc/initramfs-tools/hooks/:

/usr/share/initramfs-tools/hooks:
busybox
dmsetup
keymap
klibc
mdadm
thermal
udev


-- System Information:
Debian Release: 6.0.1
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/16 CPU cores)
Locale: LANG=C, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages initramfs-tools depends on:
ii  cpio                          2.11-4     GNU cpio -- a program to manage ar
ii  findutils                     4.4.2-1+b1 utilities for finding files--find,
ii  klibc-utils                   1.5.20-1   small utilities built with klibc f
ii  module-init-tools             3.12-1     tools for managing Linux kernel mo
ii  udev                          164-3      /dev/ and hotplug management daemo

Versions of packages initramfs-tools recommends:
ii  busybox                       1:1.17.1-8 Tiny utilities for small and embed

Versions of packages initramfs-tools suggests:
ii  bash-completion               1:1.2-3    programmable completion for the ba

-- Configuration Files:
/etc/initramfs-tools/initramfs.conf changed:
MODULES=most
BUSYBOX=y
KEYMAP=n
COMPRESS=gzip
BOOT=nfs
DEVICE=net0
NFSROOT=auto


-- no debconf information



Reply to: