Menu

drbl-ocs command does not "Create specific config for PXE and GRUB EFI NB client."

Anshu Arya
2016-10-14
2016-10-20
  • Anshu Arya

    Anshu Arya - 2016-10-14

    I am using DRBL to programatically re-image a set of machines, but using the "drbl-ocs" command output by running "dcs" does not configure the PXE menu for EFI machines.

    When I run DCS manually from the DRBL server, my PXE menu options on my EFI machine are set correctly. DCS then claims:

    PS. Next time you can run this command directly:        
    drbl-ocs -b -g auto -e1 auto -e2 -x -r -iefi -j2 -sc0 -p reboot -h " 192.168.222.12" -l en_US.UTF-8 startdisk restore WIN10IMAGE sda
    

    However, the next time I run my command, the PXE menu option is not correctly set.

    I have DIFFed the output of running DCS and of running the DRBL-OCS command above. When running manually through the DCS command, these lines are output:

    Create specific config for PXE and GRUB EFI NB client.      
    Generate the PXE config file for host a0:48:1c:9e:b2:db ... done!       
    Generate the grub uEFI netboot config file for host a0:48:1c:9e:b2:db ... done!
    

    When I just run the DRBL-OCS command, the above lines are NOT output, so it doesn't appear to be configuring my EFI client.

    What (non-interactive) command can I use to correctly "Create specific config for PXE and GRUB EFI NB client."?

     
  • Steven Shiau

    Steven Shiau - 2016-10-15

    Actually the grub config should be created, just it's not based on MAC address. However, because MAC addresses are linked in dhcpd.conf, this still should work.
    You can check the files /tftpboot/nbi_img/grub-efi.cfg/grub.cfg*, it's like /tftpboot/nbi_img/grub-efi.cfg/grub.cfg-C0A8B101

    Steven

     
  • Anshu Arya

    Anshu Arya - 2016-10-15

    When I run the "drbl-ocs" command, I can confirm a new file of the form /tftpboot/nbi_img/grub-efi.cfg/grub.cfg-C0A8BXX is created with the correct Clonezilla menu entry. I also do see that the MAC and the IP are linked in my dhcpd.conf:

        host clonezilla-192-168-222-12 {
            hardware ethernet  A0:48:1C:9E:B2:DB;
            fixed-address 192.168.222.12;
            # option host-name "clonezilla-192-168-222-12";
        }
    

    However, I am still witnessing this behavior: using "dcs" and interactively starting clonezilla mode correctly sets the menu item in the EFI PXE menu on the target client, but using the generated "drbl-ocs" command does NOT set the menu entry in the client, so it fails to show the clonezilla menu entry in the EFI PXE menu.

    Running "dcs" and selecting hosts via MAC instead creates a /tftpboot/nbi_image/grub-efi.cfg/grub.cfg-01-a0-48-1c-9e-b2-db which works. Also if I simply COPY the "grub.cfg-C0A8BXX" file to "grub.cfg-01-a0-48-1c-9e-b2-db", it works. What is causing my system to not accept the non-MAC address version of the grub config file?

    Note: I am defining my list of hosts in a file "macadr-ens192.txt" which drblpush takes as input, could that be affecting which grub file PXE boot looks for, i.e. it is only looking for the grub file with the MAC address appended?

    I also want to confirm I am running latest unstable DRBL. I have also updated the system using drblsrv and then a drblpush and the behavior did not change

     

    Last edit: Anshu Arya 2016-10-15
  • Steven Shiau

    Steven Shiau - 2016-10-16

    Nice catch! I think that's the problem. we will try to fix that recently.

    Steven

     
  • Steven Shiau

    Steven Shiau - 2016-10-17

    BTW,
    "What is causing my system to not accept the non-MAC address version of the grub config file?" -> So you meant when there is only /tftpboot/nbi_image/grub.cfg-C0A8BXX exists, your uEFI network boot client won't be able to do the network booting? If so, that's really weird. I can not reproduce the issue here.
    Did you check your system log on the server, like /var/log/syslog, to see if you can find any clues?

    Steven

     
  • Anshu Arya

    Anshu Arya - 2016-10-17

    When I use "drbl-ocs" only the /tftpboot/nbi_image/grub.cfg-C0A8BXX file is created.

    When I use "dcs" interactively, both grub.cfg-C0A8BXX and grub.cfg-01-MACADDRESS are created.

    There is nothing of note in the /var/log/syslog on the DRBL server when I request DRBL to do a Clonezilla-start on my client machine via a drbl-ocs command. The machine still enters the PXE menu, but the Clonezilla option is not available.

    A simple workaround for me at this time is to copy the grub.cfg-C0A8BXX to grub.cfg-01-MACADDRESS before the client machine reboots.

     
  • Steven Shiau

    Steven Shiau - 2016-10-18

    This is why I felt weird. Even there is only grub.cfg-C0A8BXX exists, because MAC address and IP address are linked in dhcpd.conf, your uEFI network client should be able to netboot.
    To enable the log for network booting,
    1. Edit /etc/dhcp/dhcpd.conf
    Remove the comments in this block:
    log(info, concat("Client ",
    binary-to-ascii(16, 8, ":", substring(hardware, 1, 6)),
    " 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"))
    );

    1. Restart dhcp service, for example, on Debian/Ubuntu, you can run:
      sudo service isc-dhcp-server restart

    2. Run drbl-ocs to start the clonezilla service, e.g.:
      drbl-ocs -b -g auto -e1 auto -e2 -r -x -j2 -sc0 -p reboot -h " 192.168.177.1 192.168.177.2" -l en_US.UTF-8 startdisk restore opensuse13.1-efi sda

    3. Make sure there are some grub-cfg-* files:
      dir /tftpboot/nbi_img/grub-efi.cfg/grub.cfg-*
      /tftpboot/nbi_img/grub-efi.cfg/grub.cfg-C0A8B101
      /tftpboot/nbi_img/grub-efi.cfg/grub.cfg-C0A8B102

    4. Boot your uEFI client via network. Normally you should be able to see something like:
      Oct 18 09:11:43 xenial64 dhcpd[2952]: Server starting service.
      Oct 18 09:12:13 xenial64 dhcpd[2952]: Client 0:c:29:1d:9a:d1 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:00009:UNDI:003016 - no dhcp-client-id
      Oct 18 09:12:13 xenial64 dhcpd[2952]: WARNING: site-local option codes less than
      224 have been deprecated by RFC3942. You have options listed in site local spa
      ce pxelinux that number as low as 208. Please investigate if these should be de
      clared as regular options rather than site-local options, or migrated up past 22
      4.
      Oct 18 09:12:13 xenial64 dhcpd[2952]: DHCPDISCOVER from 00:0c:29:1d:9a:d1 via en
      s38
      Oct 18 09:12:13 xenial64 dhcpd[2952]: DHCPOFFER on 192.168.177.2 to 00:0c:29:1d:
      9a:d1 via ens38
      Oct 18 09:12:17 xenial64 dhcpd[2952]: Client 0:c:29:1d:9a:d1 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:00009:UNDI:003016 - no dhcp-client-id
      Oct 18 09:12:17 xenial64 dhcpd[2952]: DHCPREQUEST for 192.168.177.2 (192.168.177
      .254) from 00:0c:29:1d:9a:d1 via ens38
      Oct 18 09:12:17 xenial64 dhcpd[2952]: DHCPACK on 192.168.177.2 to 00:0c:29:1d:9a:d1 via ens38

    Steven

     
  • Steven Shiau

    Steven Shiau - 2016-10-18

    BTW, please show me the files in /tftpboot/nbi_img/grub-efi.cfg/ by running:
    ls -l /tftpboot/nbi_img/grub-efi.cfg/
    Maybe there is some other config files which cause your client to use another boot menu.

    Steven

     
  • Steven Shiau

    Steven Shiau - 2016-10-18

    OK, finally I was able to reproduce the issue you have mentioned.
    It's a bug, because grub.cfg-$IP was not honored. Now it's fixed in the unstable branch.
    Could you please give the unstable drbl a try?
    i.e., drbl 2.21.10 and clonezilla 3.23.25.
    Remember you have to follow this to upgrade DRBL:
    http://drbl.org/installation/#upgrade

    Please let me know the results.
    Thanks.

    Steven

     

    Last edit: Steven Shiau 2016-10-19
  • Anshu Arya

    Anshu Arya - 2016-10-19

    Yep, appears to be working now, thanks so much for the help! Now I see a "/tftpboot/nbi_img/grub-efi.cfg/grub.cfg-192.168.222.12" file only when I run the drbl-ocs command.

     
  • Steven Shiau

    Steven Shiau - 2016-10-20

    OK, great! Thanks for the bug report. This bug has been there so long but maybe this feature is seldom used so no one reported before. Recently we will move the unstable release to testing, then stable.

    Steven

     

Log in to post a comment.