Menu

How to change the number of times that clonezilla tries to get an NIC up.

Francois
2025-05-14
2025-06-10
  • Francois

    Francois - 2025-05-14

    Hi all,

    We are using clonezilla for the production of our laptops.

    We have laptops with and without an onboard nic. Because we are using Clonezilla in a production environment, all laptops are connected the same way, by using a USB-NIC. This usb-nic is the second nic (eth1).
    The problem is with the dual nic configurations.

    When pxe booting the laptop it first does a dhcp broadcast, this is done directly on eth1.
    Then the system loads it's initrd and filesquashfs.
    During the processing of these files, it reinitialise the network.
    First it tries counts 5 times from 1-15, waiting for eth0 (not connected) to get an active connection.
    Then it initialises eth1 and continues booting.

    The wait for the system to count 5 times to 15 cost us a lot of waiting time.

    During the summertime we produce around 100.000 systems, of which a 20-30% or so are dual nic booted.
    So +-25.000 times waiting for 4 times 1-15 for a not connected nic is a lot of wasted time.

    I have already unpacked initrd and unsquashed filesystem.squashfs.
    In initrd I couldn't find any parameters, so i continued searching in the squashfs.
    There I found in /usr/sbin/mknic-nbi the variable: iretry_max_default="5"
    I changed this to 1 , re-squashed the file and booted, but nothing has changed.

    It would be very, very nice and appreciated if someone could tell were i can change this.

     
  • Steven Shiau

    Steven Shiau - 2025-05-14

    Actually it's an undocumented parameter for live-boot.
    In initrd you should be able to find ethdevice-timeout from the files 9990-cmdline-old and 9990-networking.sh located under the path usr/lib/live/boot/.
    So for your PXE clients, you can assign "ethdevice-timeout=5" in the pxe config, i.e., /tftpboot/nbi_img/grub/grub.cfg or /tftpboot/nbi_img/pxelinux.cfg/default after you start Clonezilla lite server.
    However, if you are sure your usb-nic will always be eth1, then it would be easier to assign another undocumented parameter "ethdevice=eth1" in the PXE config file.
    Please let us know your results.
    Ref: https://clonezilla.org//fine-print-live-doc.php?path=./clonezilla-live/doc/99_Misc/00_live-boot-parameters.doc#00_live-boot-parameters.doc

     

    Last edit: Steven Shiau 2025-05-15
  • Steven Shiau

    Steven Shiau - 2025-05-15

    BTW, we will update the doc to mention these two parameters: ethdevice and ethdevice-timeout

     
  • Francois

    Francois - 2025-06-10

    Hi Steven,

    I have tried all your provided solutions and I am sorry to say that they didn't do what i needed.

    Maybe I did something wrong, or I didn't explain the problem right.

    Using ehtdevice-timeout=5
    When there is no directly dhcp request, it is retrying for 5 instead of 30 seconds.
    But the problem is before the dhcp request, it is waiting for the line to go up on eth0, but
    that's not happing because the line active nic is eth1.

    ethdevice=eth1 or livenetdev=eth1
    This works when the active nic is eth1, then the problem of waiting for eth0 to get an active
    line isn't there. When booting a system with only one nic (eth0) the system does
    boot, eth1 is not available in this case.
    But when booting from eth0 while there is a eth1 available on the system, it waits for eth1
    to get an active line. So this is a workaround is not really what we want. We loose a lot of flexibility in the boot environment.
    Some of our servers, which we also provide with an image using Clonezilla have multiple nics
    and not always will eth1 be the booted nic.

    i have made a video, (which can be downloaded for a week) here

    and also a picture of the problem (ripped out of the video).

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.