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

DHCP network failed after initrd.img loading




Hi

I have built a netboot livecd for PXE loading with:

    lb config noauto \
    --mode debian \
    --distribution testing \
    --architectures amd64 \
    --archive-areas 'main contrib non-free' \
    --security false \
    --apt-indices false \
    --cache-indices true \
    --apt-recommends false \
    --chroot-filesystem squashfs \
    --bootloaders syslinux \
    --bootappend-live 'boot=live components keyboard-layouts=en username=root' \
    --debootstrap-options "--variant=minbase" \
    --firmware-chroot false \
    --binary-images netboot \
    --net-tarball false \
    --memtest none

I have tried with both 'stable' and 'testing' release, all these 'initrd.img' could NOT active DHCP network.

I tried boot with official 'stable' LiveCD's kernel and 'initrd.img' files, DHCP network failed in the same way:

https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/debian-live-11.4.0-amd64-standard.iso

After PXE boot loading 'initrd.img' with DHCP failed, I can configure static network with 'ip' command:

    # ip a
    1: lo: <LOOPBACK> mtu 65536 qdisc noop qlen 1000
        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq qlen 1000
        link/ether 08:c0:eb:... brd ff:ff:ff:ff:ff:ff
        inet 10.3.2.1/26 scope global eth0
           valid_lft forever preferred_lft forever
        inet6 fe80::ac0:ebff:febf:ac48/64 scope link
           valid_lft forever preferred_lft forever
    3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq qlen 1000
        link/ether 08:c0:eb:... brd ff:ff:ff:ff:ff:ff
        inet6 fe80::ac0:ebff:febf:ac4b/64 scope link
           valid_lft forever preferred_lft forever

PXE boot with 'debug' option get below 'boot.log' after 'initrd.img' DHCP failed:

    # cat /boot.log
    + tailpid=1272
    + tail -f boot.log
    + cat /proc/cmdline
    + LIVE_BOOT_CMDLINE='BOOT_IMAGE=http://10.1.1.8/live/vmlinuz initrd=http://10.1.1.8/live/initrd.img boot=live components fetch=http://10.1.1.8/live/filesystem.squashfs keyboard-layouts=en username=root net.ifnames=0 debug _onlive_=http://10.1.1.8/live/liveos.sh'
    + Cmdline_old
    + FETCH=http://10.1.1.8/live/filesystem.squashfs
    + export FETCH
    + '[' -z  ]
    + '['  '=' /dev/nfs ]
    + '['  '=' /dev/cifs ]
    + '[' -z  ]
    + MODULE=filesystem
    + export MODULE
    + '[' -z  ]
    + UNIONTYPE=overlay
    + export UNIONTYPE
    + '[' -z  ]
    + PERSISTENCE_ENCRYPTION=none
    + export PERSISTENCE_ENCRYPTION
    + '[' -z  ]
    + PERSISTENCE_METHOD=overlay
    + export PERSISTENCE_METHOD
    + '[' -z  ]
    + PERSISTENCE_STORAGE=filesystem,file
    + export PERSISTENCE_STORAGE
    + Debug
    + LIVE_BOOT_DEBUG=true
    + set -x
    + Read_only
    + return 0
    + Select_eth_device
    + egrep '^BOOT=' /conf/initramfs.conf
    + tail -1
    + bootconf='BOOT=nfs'
    + '[' 'BOOT=nfs' '!=' 'BOOT=nfs' ]
    + modprobe -q af_packet
    + udevadm trigger
    + udevadm settle
    + l_interfaces=
    + Device_from_bootif
    + '[' -n  ]
    + '[' -z  ]
    + uname -r
    + echo 'Waiting for ethernet card(s) up... If this fails, maybe the ethernet card is not supported by the kernel 5.18.0-4-amd64?'
    Waiting for ethernet card(s) up... If this fails, maybe the ethernet card is not supported by the kernel 5.18.0-4-amd64?
    + '[' -z  ]
    + cd /sys/class/net/
    + ls -d eth0 eth1 lo
    + grep -v lo
    + l_interfaces='eth0
    eth1'
    + '[' -z 'eth0
    eth1' ]
    + echo eth0 eth1
    + wc -w
    + '[' 2 -lt 2 ]
    + found_eth_dev=
    + true
    + echo -n 'Looking for a connected Ethernet interface ...'
    Looking for a connected Ethernet interface ...+ echo -n ' eth0 ?'
     eth0 ?+ ipconfig -c none -d eth0 -t 1
    + sleep 1
    + echo -n ' eth1 ?'
     eth1 ?+ ipconfig -c none -d eth1 -t 1
    + sleep 1
    + echo

    + ip link set eth0 up
    + cat /sys/class/net/eth0/carrier
    + carrier=1
    + echo 'Connected eth0 found'
    Connected eth0 found
    + found_eth_dev=' eth0'
    + echo eth0
    + sed -e 's/^[[:space:]]*//g'
    + found_eth_dev=eth0
    + ip link set eth1 up
    + cat /sys/class/net/eth1/carrier
    + carrier=1
    + echo 'Connected eth1 found'
    Connected eth1 found
    + found_eth_dev='eth0 eth1'
    + echo eth0 eth1
    + sed -e 's/^[[:space:]]*//g'
    + found_eth_dev='eth0 eth1'
    + '[' -n 'eth0 eth1' ]
    + echo 'DEVICE='"'"'eth0 eth1'"'"
    + return
    + '[' -e /conf/param.conf ]
    + . /conf/param.conf
    + DEVICE='eth0 eth1'
    + '[' -n  ]
    + '[' -n http://10.1.1.8/live/filesystem.squashfs ]
    + do_netmount
    + do_netsetup
    + modprobe -q af_packet
    + udevadm trigger
    + udevadm settle
    + '[' -n  ]
    + ETHDEV_TIMEOUT=15
    + echo 'Using timeout of 15 seconds for network configuration.'
    Using timeout of 15 seconds for network configuration.
    + '[' -z  ]
    + '[' -z http://10.1.1.8/live/filesystem.squashfs ]
    + ipconfig -t 15 eth0
    + tee /netboot-eth0.config
    IP-Config: eth0 hardware address 08:c0:eb:... mtu 1500 DHCP RARP
    IP-Config: no response after 15 secs - giving up
    + '[' -e /run/net-eth0.conf ]
    + . /run/net-eth0.conf
    + DEVICE=eth0
    + PROTO=none
    + IPV4ADDR=0.0.0.0
    + IPV4BROADCAST=0.255.255.255
    + IPV4NETMASK=255.0.0.0
    + IPV4GATEWAY=0.0.0.0
    + IPV4DNS0=0.0.0.0
    + IPV4DNS1=0.0.0.0
    + HOSTNAME=
    + DNSDOMAIN=
    + NISDOMAIN=
    + ROOTSERVER=0.0.0.0
    + ROOTPATH=
    + filename=
    + UPTIME=8
    + DHCPLEASETIME=0
    + DOMAINSEARCH=
    + '[' 0.0.0.0 '!=' 0.0.0.0 ]
    + ipconfig -t 15 eth1
    + tee /netboot-eth1.config
    IP-Config: eth1 hardware address 08:c0:eb:bf:ac:4b mtu 1500 DHCP RARP
    IP-Config: no response after 15 secs - giving up
    + '[' -e /run/net-eth1.conf ]
    + . /run/net-eth1.conf
    + DEVICE=eth1
    + PROTO=none
    + IPV4ADDR=0.0.0.0
    + IPV4BROADCAST=0.255.255.255
    + IPV4NETMASK=255.0.0.0
    + IPV4GATEWAY=0.0.0.0
    + IPV4DNS0=0.0.0.0
    + IPV4DNS1=0.0.0.0
    + HOSTNAME=
    + DNSDOMAIN=
    + NISDOMAIN=
    + ROOTSERVER=0.0.0.0
    + ROOTPATH=
    + filename=
    + UPTIME=10
    + DHCPLEASETIME=0
    + DOMAINSEARCH=
    + '[' 0.0.0.0 '!=' 0.0.0.0 ]
    + OLDHOSTNAME=
    + '[' -e /run/net-eth1.conf ]
    + . /run/net-eth1.conf
    + DEVICE=eth1
    + PROTO=none
    + IPV4ADDR=0.0.0.0
    + IPV4BROADCAST=0.255.255.255
    + IPV4NETMASK=255.0.0.0
    + IPV4GATEWAY=0.0.0.0
    + IPV4DNS0=0.0.0.0
    + IPV4DNS1=0.0.0.0
    + HOSTNAME=
    + DNSDOMAIN=
    + NISDOMAIN=
    + ROOTSERVER=0.0.0.0
    + ROOTPATH=
    + filename=
    + UPTIME=10
    + DHCPLEASETIME=0
    + DOMAINSEARCH=
    + '[' -z  ]
    + HOSTNAME=
    + export HOSTNAME
    + '[' -n eth1 ]
    + cat /sys/class/net/eth1/address
    + HWADDR=08:c0:eb:bf:ac:4b
    + '[' '!' -e /etc/hostname ]
    + '[' -n  ]
    + '[' '!' -e /etc/hosts ]
    + '[' -n  ]
    + '[' '!' -e /etc/resolv.conf ]
    + echo 'Creating /etc/resolv.conf'
    Creating /etc/resolv.conf
    + '[' -n  ]
    + '[' -n 0.0.0.0 ]
    + '[' 0.0.0.0 '!=' 0.0.0.0 ]
    + '[' -n 0.0.0.0 ]
    + '[' 0.0.0.0 '!=' 0.0.0.0 ]
    + '[' -n 0.0.0.0 ]
    + '[' 0.0.0.0 '!=' 0.0.0.0 ]
    + '[' -n  ]
    + '[' -n  ]
    + ls /sys/class/net/eth1
    + '[' auto '=' auto ]
    + NFSROOT=0.0.0.0:
    + rc=1
    + '[' -n http://10.1.1.8/live/filesystem.squashfs ]
    + do_httpmount
    + rc=1
    + local url extension dest
    + eval echo '"${HTTPFS}"'
    + echo
    + url="">    + echo
    + sed 's/\(.*\)\.\(.*\)/\2/'
    + extension=
    + '[' -n  ]
    + local url extension dest
    + eval echo '"${FTPFS}"'
    + echo
    + url="">    + echo
    + url="">    + echo
    + sed 's/\(.*\)\.\(.*\)/\2/'
    + extension=
    + '[' -n  ]
    + local url extension dest
    + eval echo '"${FETCH}"'
    + echo http://10.1.1.8/live/filesystem.squashfs
    + url="" href="http://10.1.1.8/live/filesystem.squashfs">http://10.1.1.8/live/filesystem.squashfs
    + echo http://10.1.1.8/live/filesystem.squashfs
    + sed 's/\(.*\)\.\(.*\)/\2/'
    + extension=squashfs
    + '[' -n http://10.1.1.8/live/filesystem.squashfs ]
    + '[' squashfs '=' iso ]
    + dest=/run/live/medium/live
    + mount -t ramfs ram /run/live/medium
    + mkdir -p /run/live/medium/live
    + '[' FETCH '=' FETCH ]
    + basename http://10.1.1.8/live/filesystem.squashfs
    + log_begin_msg 'Trying wget http://10.1.1.8/live/filesystem.squashfs -O /run/live/medium/live/filesystem.squashfs'
    + _log_msg 'Begin: %s ... ' 'Trying wget http://10.1.1.8/live/filesystem.squashfs -O /run/live/medium/live/filesystem.squashfs'
    + '[' n '=' y ]
    + printf 'Begin: %s ... ' 'Trying wget http://10.1.1.8/live/filesystem.squashfs -O /run/live/medium/live/filesystem.squashfs'
    Begin: Trying wget http://10.1.1.8/live/filesystem.squashfs -O /run/live/medium/live/filesystem.squashfs ... + return 0
    + basename http://10.1.1.8/live/filesystem.squashfs
    + wget http://10.1.1.8/live/filesystem.squashfs -O /run/live/medium/live/filesystem.squashfs
    Connecting to 10.1.1.8 (10.1.1.8)
    wget: can't connect to remote host (10.129.65.104): Network is unreachable
    + '[' 1 -eq 0 ]
    + '[' squashfs '=' tgz ]
    + '[' squashfs '=' iso ]
    + break
    + '[' 1 '!=' 0 ]
    + '[' -d /media ]
    + umount /run/live/medium
    + return 1
    + return 1
    + panic 'Unable to find a live file system on the network'
    + DEB_1='\033[1;31m .'"''"'`.  \033[0m'
    + DEB_2='\033[1;31m: :'"'"'  : \033[0m'
    + DEB_3='\033[1;31m`. `'"'"'`  \033[0m'
    + DEB_4='\033[1;31m  `-    \033[0m'
    + LIVELOG='\033[1;37m/boot.log\033[0m'
    + DEBUG='\033[1;37mdebug\033[0m'
    + exec
    + exec

There was network device and kernel module loading info after 'initrd.img' DHCP failed:

    # dmesg | grep -i eth
    [    7.976275] mlx5_core 0000:17:00.0 eth0: Link up
    [    7.997356] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    [    9.734476] mlx5_core 0000:b1:00.0 eth1: Link up
    [    9.754720] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready

    # modinfo mlx5_core
    filename:       /lib/modules/5.18.0-4-amd64/kernel/drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.ko
    author:         Eli Cohen <eli@mellanox.com>
    description:    Mellanox 5th generation network adapters (ConnectX series) core driver
    license:        Dual BSD/GPL
    parm:           prof_sel:profile selector. Valid range 0 - 2
    parm:           debug_mask:debug mask: 1 = dump cmd data, 2 = dump cmd exec time, 3 = both. Default=0
    alias:          auxiliary:mlx5_core.eth
    alias:          pci:v000015B3d0000A2DFsv*sd*bc*sc*i*
    alias:          pci:v000015B3d0000A2DCsv*sd*bc*sc*i*
    alias:          pci:v000015B3d0000A2D6sv*sd*bc*sc*i*
    alias:          pci:v000015B3d0000A2D3sv*sd*bc*sc*i*
    alias:          pci:v000015B3d0000A2D2sv*sd*bc*sc*i*
    alias:          pci:v000015B3d00001023sv*sd*bc*sc*i*
    alias:          pci:v000015B3d00001021sv*sd*bc*sc*i*
    alias:          pci:v000015B3d0000101Fsv*sd*bc*sc*i*
    alias:          pci:v000015B3d0000101Esv*sd*bc*sc*i*
    alias:          pci:v000015B3d0000101Dsv*sd*bc*sc*i*
    alias:          pci:v000015B3d0000101Csv*sd*bc*sc*i*
    alias:          pci:v000015B3d0000101Bsv*sd*bc*sc*i*
    alias:          pci:v000015B3d0000101Asv*sd*bc*sc*i*
    alias:          pci:v000015B3d00001019sv*sd*bc*sc*i*
    alias:          pci:v000015B3d00001018sv*sd*bc*sc*i*
    alias:          pci:v000015B3d00001017sv*sd*bc*sc*i*
    alias:          pci:v000015B3d00001016sv*sd*bc*sc*i*
    alias:          pci:v000015B3d00001015sv*sd*bc*sc*i*
    alias:          pci:v000015B3d00001014sv*sd*bc*sc*i*
    alias:          pci:v000015B3d00001013sv*sd*bc*sc*i*
    alias:          pci:v000015B3d00001012sv*sd*bc*sc*i*
    alias:          pci:v000015B3d00001011sv*sd*bc*sc*i*
    alias:          auxiliary:mlx5_core.eth-rep
    depends:        pci-hyperv-intf,ptp,mlxfw,psample
    intree:         Y
    vermagic:       5.18.0-4-amd64 SMP preempt mod_unload modversions

    # udevadm info /sys/class/net/eth0
    P: /devices/pci0000:16/0000:16:02.0/0000:17:00.0/net/eth0
    M: eth0
    R: 0
    U: net
    I: 2
    E: DEVPATH=/devices/pci0000:16/0000:16:02.0/0000:17:00.0/net/eth0
    E: SUBSYSTEM=net
    E: INTERFACE=eth0
    E: IFINDEX=2
    E: USEC_INITIALIZED=5889734
    E: ID_NET_NAMING_SCHEME=v251
    E: ID_NET_NAME_MAC=enx08c0ebbfac48
    E: ID_NET_NAME_PATH=enp23s0np0
    E: ID_NET_NAME_SLOT=ens35np0
    E: ID_BUS=pci
    E: ID_VENDOR_ID=0x15b3
    E: ID_MODEL_ID=0x101d
    E: ID_PATH=pci-0000:17:00.0
    E: ID_PATH_TAG=pci-0000_17_00_0
    E: ID_NET_DRIVER=mlx5_core
    E: ID_NET_LINK_FILE=/usr/lib/systemd/network/99-default.link
    E: ID_NET_NAME=eth0

NIC PCI info under disk OS:

    # lspci -nnv|grep -A3 eth
    17:00.0 Ethernet controller [0200]: Mellanox Technologies MT28841 [15b3:101d]
            Subsystem: Mellanox Technologies MT2892 Family [ConnectX-6 Dx] [15b3:0189]
            Physical Slot: 35
    --
    b1:00.0 Ethernet controller [0200]: Mellanox Technologies MT28841 [15b3:101d]
            Subsystem: Mellanox Technologies MT2892 Family [ConnectX-6 Dx] [15b3:0189]
            Physical Slot: 45

Reply to: