Menu

Changed NIC and now getting waiting for eth0 to be linked - udhcpc sending discover - no boot

Scott
2022-12-27
2023-01-02
  • Scott

    Scott - 2022-12-27

    I have a DRBL server I set up at home and have transported it into the office now that the basic setup is done and I know it works

    I have a Lenovo M710 Tiny Running Ubuntu
    the built in ethernet NIC is connected to the Main internet
    I have a Lenovo USB ethernet adapter for the Local DHCP to computer that will be imaged with clonezilla thru DRBL
    at home, I had a different adapter,

    at home, I was able to sucessfully load into clonezilla and Image computers
    here at the shop, with the lenovo adapter, I am getting errors after the pxelinux menu.32
    it rolls thru everything shows me
    busybox /init starting
    mounting /sys filesystem
    mounting /proc filesystem
    trying to up eth0............................
    Special udgcpc requests port :1068
    Leasing IP Address via [eth0]. try 1....
    udhcpc: started, v1.30.1
    sleep for 0 sec(s) to wait for this NIC ready..
    udhcpc: sending discover....
    Only IP Addresses offered by this DHCP server name will be accepted:
    Unable to optain IP address via wired link [eth0]!

    and it never finds one.
    then I get the "Fatal Error" failed to mount root filesystem..........

    what do I need to do to fix this to change it for the new NIC adapter

    dhcpd.conf

    # Generated by DRBL.
    # Do NOT modify this file unless you know what you are doing!
    
    default-lease-time          300;
    max-lease-time              300;
    option subnet-mask          255.255.254.0;
    option domain-name-servers          8.8.8.8, 1.1.1.1;
    option domain-name          "drbl.com";
    ddns-update-style                       none;
    server-name                 drbl;
    
    allow booting;
    allow bootp;
    
    # For Raspberry Pi
    # Ref: https://www.raspberrypi.org/forums/viewtopic.php?t=209247
    #      https://tools.ietf.org/html/rfc2132
    option vendor-specific-info    code 43 = string;            # Server - RFC 2132, 8.4
    option param-request-list      code 55 = string;            # Client - RFC 2132, 9.8
    option vendor-class-identifier code 60 = string;            # Client - RFC 2132, 9.13
    option rpi-tftp-server         code 66 = text;              # Server - RFC 2132, 9.4
    
    # Ref: Dynamic Host Configuration Protocol (DHCP) Options for the
    #      Intel Preboot eXecution Environment (PXE)
    #      https://tools.ietf.org/html/rfc4578
    #      https://tools.ietf.org/html/rfc5071
    option arch code 93 = unsigned integer 16;                  # Client - RFC 4578, 2.1
    option space pxelinux;                                     
    #option pxelinux.magic      code 208 = string;              # Server - RFC 5071, 3.2
    #option pxelinux.configfile code 209 = text;                # Server - RFC 5071, 4.2
    #option pxelinux.pathprefix code 210 = text;                # Server - RFC 5071, 5.2
    #option pxelinux.reboottime code 211 = unsigned integer 32; # Server - RFC 5071, 6.2
    
    site-option-space "pxelinux";
    
    if exists dhcp-parameter-request-list {
        # Always send the PXELINUX options (specified in hexadecimal, i.e.: 208=0xd0, 209=0xd1, etc.)
        option dhcp-parameter-request-list = concat(option dhcp-parameter-request-list,d0,d1,d2,d3);
    }
    # Ref:
    # http://www.syslinux.org/wiki/index.php/PXELINUX
    # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=720589
    # //NOTE// From DRBL 2.15, bootia32.efi and bootx64.efi could be the one from
    # (1) syslinux (scripts/sbin/prepare-files-for-PXE-client)
    # or
    # (2) grub (drbl-gen-grub-efi-nb)
    # Ref: http://ipxe.org/cfg/platform. Thanks to Danny Russ for providing this.
    if option arch = 00:00 {
        # Intel x86PC or
        # Raspberry Pi, which should not declare itself as an Intel x86PC.
        # Ref: https://kiljan.org/2019/11/16/arch-linux-arm-network-boot-on-raspberry-pi-4/
        # We will overwrite it later in the class "raspberrypi".
        filename "lpxelinux.0";
    } else if option arch = 00:06 {
        # EFI IA32
        filename "bootia32.efi";
    } else if option arch = 00:07 or
              option arch = 00:09 {
        # EFI BC or EFI x86-64 
        filename "bootx64.efi";
    } else if option arch = 00:0a {
        # armv7 (arm 32 bit)
        filename "bootarm.efi";
    } else if option arch = 00:0b or
              option arch = 00:16 {
        # aarch64 (arm 64 bit)
        # Rockpro64 (https://www.pine64.org/rockpro64) uses 00:16
        filename "bootaa64.efi";
    } else {
        # Default to Intel x86PC
        filename "lpxelinux.0";
    }
    
    class "raspberrypi" {
      # Raspberry Pi, which should not declare itself as an Intel x86PC.
      # However, we still can identify it by some methods.
      # Ref: https://kiljan.org/2019/11/16/arch-linux-arm-network-boot-on-raspberry-pi-4/
      match if (
        (
              # Parameter list from Pi 3B ROM and old bootcode.bin
              binary-to-ascii(10,8,",",option param-request-list) =
                "43,60,67,128,129,130,131,132,133,134,135,66"
              # Parameter list from Pi 3B+ ROM and newer bootcode.bin
           or binary-to-ascii(10,8,",",option param-request-list) =
                "43,60,67,128,129,130,131,132,133,134,135,66,1,3"
              # Parameter list from Pi 4B EEPROM boot code (2019-10-16)
           or binary-to-ascii(10,8,",",option param-request-list) =
                "1,3,43,60,66,67,128,129,130,131,132,133,134,135"
        ) 
        and option vendor-class-identifier = "PXEClient:Arch:00000:UNDI:002001"
        and option arch = 00:00    # Architecture: Intel x86PC
        and (
             substring(hardware,1,3) = b8:27:eb # Pi Foundation OUI listing
          or substring(hardware,1,3) = dc:a6:32 # Raspberry Pi Trading Ltd OUI listing
        )
      );
      # There are extra 3 spaces in the end for vendor-specific-info, due to a bug in bootrom for Raspberry Pi <= 3
      # No need for Raspberry Pi 4, but it is OK to have that.
      # Ref: https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/net.md
      option vendor-specific-info "Raspberry Pi Boot   ";
      # bootcode.bin is not used on the Raspberry Pi 4, because it has been replaced by boot code in the onboard EEPROM.
      # Older model needs that.
      # Ref: https://www.raspberrypi.org/documentation/configuration/boot_folder.md
      filename "bootcode.bin";
    }
    
    ## Uncomment the following "if block" when you have some buggy PXE NIC card (such as annoying sis900 NIC). Remember to modify the MAC vendor prefix and restart dhcpd service!!!
    ## This is a workround for some network card with BAD PXE code in firmware.
    ## It will only affect those clients with MAC vendor prefix you assigned.
    ## Ref: http://syslinux.zytor.com/archives/2005-August/005640.html
    
    #if substring (option vendor-class-identifier, 0, 3) = "PXE" {
    #     # **************************************************************
    #     # ***MODIFY*** the MAC vendor prefix of client network card here.
    #     # **************************************************************
    #     # For annoying sis900 network card, maybe it is 00:07:95, 00:0C:6E...
    #     if substring (hardware, 1, 3) = 00:0C:6E {
    #         # sis900.zpxe is specially for sis900 NIC, you can download it from
    #         # http://rom-o-matic.net/etherboot/etherboot-5.4.4/contrib/rom-o-matic
    #         filename = "sis900.zpxe";
    #     }
    #}
    
    # Uncomment the following to get the debug/verbose messages in system log. The messages like the following will be shown:
    # PXEClient:Arch:00009:UNDI:003016
    # Begin of log command
    #log ( info, vendor-class-identifier ) ;
    # End of log command
    
    # Uncomment the following to get the debug/verbose messages in system log. The messages like the following will be shown:
    # Client 0:c:29:1d:9a:d1 with arch 0:7 requests 1:2:3:4:5:6:c:d:f:11:12:16:17:1c:28:29:2a:2b:32:33:36:3a:3b:3c:42:43:61:80:81:82:83:84:85:86:87 - PXEClient:Arch:00007:UNDI:003016 - no dhcp-client-id
    # Client 0:c:29:e5:a4:2 with arch 0:0 requests 1:2:3:5:6:b:c:d:f:10:11:12:2b:36:3c:43:80:81:82:83:84:85:86:87 - PXEClient:Arch:00000:UNDI:002001 - no dhcp-client-id
    # Client 0:c:29:3b:34:fb with arch 0:0 requests 1:3:6:c:f:1c:28:29:2a - DRBLClient - no dhcp-client-id
    # Begin of log command
    #log(info, concat("Client ",
    #        binary-to-ascii(16, 8, ":", substring(hardware, 1, 6)),
    #        " with arch ",
    #        binary-to-ascii(16, 8, ":", option arch),
    #        " requests ",
    #        binary-to-ascii(16, 8, ":", option dhcp-parameter-request-list),
    #        " - ",
    #        pick-first-value(option vendor-class-identifier, "no vendor-id"),
    #        " - ",
    #        pick-first-value(option dhcp-client-identifier, "no dhcp-client-id"))
    #   );
    # End of log command
    
    # This class 'DRBL-Client' defines 3 kind of clients: PXE, Etherboot (1st stage) or DRBL client (2nd stage, i.e. in network initrd/initramfs (mkpxeinitrd-net)) to lease IP address.  This will only affect 'range' statement only, not the 'host' statement.
    # Note! The following line(s) in the pool statement: 'allow members of "DRBL-Client";' is/are commented to disable this mechanism by default.
    # If you do want to use this mechanism, uncomment all 'allow members of "DRBL-Client";', then only PXE, etherboot and DRBL client can lease IP address from this DHCP service.
    # ///NOTE/// In summary, two cases you can turn on this mechanism:
    # (1) This DRBL server is not used as a clonezilla server.
    # (2) This DRBL server is used as a Clonezilla server, with the following conditions:
    #     (a) 'range' statement is used in this DRBL service.
    #     (b) There is an existing DHCP service which can provide IP address leases to the restored OS (either GNU/inux or MS Windows) in the client. Otherwise if you uncomment 'allow members of "DRBL-Client";', restored OS won't be able to lease IP address.
    
    # The DRBL client class: PXE, Etherboot or DRBL client
    class "DRBL-Client" {
      match if
      (substring(option vendor-class-identifier, 0, 9) = "PXEClient") or
      (substring(option vendor-class-identifier, 0, 9) = "Etherboot") or
      (substring(option vendor-class-identifier, 0, 10) = "DRBLClient") ;
    }
    
    # If you want to use special port for DHCP service, edit here:
    # For more info, ref: http://drbl.sourceforge.net/faq/index.php#path=./2_System&entry=37_coexist_with_existing_dhcp.faq
    # local-port 1067;
    # remote-port 1068;
    
    subnet 192.168.0.0 netmask 255.255.254.0 {
        option subnet-mask  255.255.254.0;
        option routers 192.168.0.2;
        option rpi-tftp-server "192.168.0.2";
        next-server 192.168.0.2;
    
        pool {
          # allow members of "DRBL-Client";
          range 192.168.0.10 192.168.0.29;
        }
    }
    
     

    Last edit: Scott 2022-12-28
  • Scott

    Scott - 2022-12-27

    I would like to add....
    I'm using Ubuntu 22.04.1 LTS
    and DRBL version info
    drbl/drbl,drbl,now 4.5.16-drbl1 all [installed]
    freedos/drbl,drbl,now 1.0-19drbl amd64 [installed]
    mkpxeinitrd-net/drbl,drbl,now 2.5.2-drbl1 amd64 [installed]
    partclone/drbl,drbl,now 0.3.18-drbl1 amd64 [installed]

    I have updated the isc-dhcp-server file with the correct Interface value for the new NIC
    I ran the drblpush -i
    and I still have no change to the problem

    If I connect it to a windows machine, its issuing DHCP properly and I can get to the internet thru the DRBL Server computer just fine

    local office IP to the internet is 10.27.xxx.xxx on 255.255.254.0

     

    Last edit: Scott 2022-12-28
  • Scott

    Scott - 2022-12-29

    disregard
    I discovered its an issue with the kernel not properly supporting a Lenovo / realtek NIC that the client pc needs to use for PXE to work... not sure I have a solution, but I have the question posed in another thread

    so the lenovo laptop gets the drbl filesystem, and then upon loading the kernal, the linux kernal for booting to the menu doesnt work with the lenovo adapter that was just used to pxe boot.......

    so if anybody has a solution to that... well... see my other thread
    https://sourceforge.net/p/drbl/discussion/DRBL_for_Debian/thread/0289b814d9/

     

    Last edit: Scott 2022-12-29
  • Steven Shiau

    Steven Shiau - 2023-01-02

    Thanks for sharing that. It's nice to know you have found the solution.

    Steven

     

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.