• please supply some documentation for bootnetx64.efi. Also choosing diff

    From Alex King@21:1/5 to All on Sat Sep 23 23:50:01 2023
    I need to do a EFI network (boot and) install, and I'm wondering if this
    file (bootnetx64.efi) can help me. But there is no documentation on it
    (except the suggestion in the install manual https://www.debian.org/releases/stable/amd64/ch04s05.en.html#dhcpd
    "specify a boot loader appropriate for UEFI machines, for example...")

    My problem is this: I can UEFI netboot using grubx64.efi. However, it
    loads a standard grub.cfg which runs an interactive installer. I need
    to preseed the install, and I need to load a different preseed file for
    each server booted.

    For non-uefi this is achieved using pxelinux's behaviour of tftp-ing a configuration based on MAC addresses etc. and fallback to a standard
    location.

    I'm wondering if grubx64.efi or bootnetx64.efi support similar
    behaviour? Or else how to get specific information into the installer
    (such as IP address and hostname), if not via specific pre-seed files
    per machine?

    (We can overwrite the grub.cfg each time with the needs of a specific
    server, but this is not ideal, as it will cause a failure if more than
    one machine is being net-installed at the same time.)

    In general though I'm also looking for pointers to documentation. If
    someone could point to anything that explains what bootnetx64.efi is and
    what it does, I'd be happy to contribute that back to the wiki or
    install manual.

    --
    Thanks,
    Alex King

    P.S.
    I didn't find much relevant in the install manual except as mentioned above.

    I didn't find bootnetx64.efi not mentioned in any of the following
    locations:
    * https://wiki.debian.org/DebianInstaller/FAQ
    * /usr/share/doc/debian-installer-12-netboot-amd64, or any man pages in
    the package
    * https://wiki.debian.org/DebianInstaller
    * https://wiki.debian.org/SecureBoot
    * https://wiki.debian.org/UEFI
    * https://duckduckgo.com/?q=bootnetx64.efi+debian+network+boot+uefi&t=ftsa&ia=web

    https://wiki.debian.org/PXEBootInstall mentions using grubx64.efi for
    the standard installer, but doesn't mention how to select a grub.cfg per machine.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Raymond Burkholder@21:1/5 to Alex King on Sun Sep 24 02:40:01 2023
    On 9/23/23 15:17, Alex King wrote:
    I need to do a EFI network (boot and) install, and I'm wondering if
    this file (bootnetx64.efi) can help me.  But there is no documentation
    on it (except the suggestion in the install manual https://www.debian.org/releases/stable/amd64/ch04s05.en.html#dhcpd
    "specify a boot loader appropriate for UEFI machines, for example...")

    There are quite a few moving parts required to make this work.


    My problem is this: I can UEFI netboot using grubx64.efi. However, it
    loads a standard grub.cfg which runs an interactive installer.  I need
    to preseed the install, and I need to load a different preseed file
    for each server booted.

    Yep, a custom grub.cfg file is needed.


    For non-uefi this is achieved using pxelinux's behaviour of tftp-ing a configuration based on MAC addresses etc. and fallback to a standard location.

    I'm wondering if grubx64.efi or bootnetx64.efi support similar
    behaviour?  Or else how to get specific information into the installer
    (such as IP address and hostname), if not via specific pre-seed files
    per machine?

    there are some settings in the dnsmasq config file to make some of this selection happen

    (We can overwrite the grub.cfg each time with the needs of a specific
    server, but this is not ideal, as it will cause a failure if more than
    one machine is being net-installed at the same time.)

    In general though I'm also looking for pointers to documentation. If
    someone could point to anything that explains what bootnetx64.efi is
    and what it does, I'd be happy to contribute that back to the wiki or
    install manual.


    For me, building a preseeded machine with efi boot became a complicated
    affair involving grub config options, pxelinux options, dnsmasq, tftp,
    partman, and various preseed files and options.  I ended up coding all
    this into a large series of saltstack based state files to handle
    building the related service files and automatically updating everything
    as machines were added to the operation.

    If you can read salt state files, I could see about showing my
    repository, and you could derive whatever you can from it.

    Raymond Burkholder
    https://blog.raymond.burkholder.net/

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Philip Hands@21:1/5 to Alex King on Mon Sep 25 12:20:01 2023
    Alex King <[email protected]> writes:

    I need to do a EFI network (boot and) install, and I'm wondering if this file (bootnetx64.efi) can help me. But there is no documentation on it (except the suggestion in the install manual https://www.debian.org/releases/stable/amd64/ch04s05.en.html#dhcpd
    "specify a boot loader appropriate for UEFI machines, for example...")

    Not answering the question you actually asked, but hopefully this will
    include hints that will allow you to get to where you want to be:

    There is a package `di-netboot-assistant` that makes getting the server
    side easy to setup for net booting -- When attempting to get EFI network booting setup, I was mostly failing to get the details right until I
    tried using that, at which point it all just worked :-)

    As for getting a machine to be configured depending upon which machine
    it is, you can do something MAC based with PXE or EFI network boots, so
    for EFI one can have a host specific config in a file called something
    like this in your tftpserver:

    /var/lib/tftpboot/d-i/n-a/grub/grub.cfg-01-3c-97-01-23-45-67

    although I generally only do that to make the automatic boot option
    happen without requiring one to hit return, rather than customising the machine's setup in there. Instead, I use the machine name that gets
    assigned via DHCP/DNS to make the decisions about what to install.

    That's how things generally get done with my preseeding framework:

    https://hands.com/d-i/

    For example, if I set up DHCP to hand out the name 'oem.hk.hands.com' to
    a machine, and set the grub config to do an automatic install while
    setting `url=https://hands.com/d-i/` on the kernel command line, then
    the framework automatically pulls in extra config from these two places:

    https://hands.com/d-i/preseed/local/_hostname/hk.hands.com/oem/
    https://hands.com/d-i/preseed/local/_users/_hostname/hk.hands.com/oem

    which causes it to install Gnome, with a de-DE default locale + several
    other locales installed, into a LVM partition scheme, where the first
    user info will be prompted for after the first boot, and with a network
    console via ssh being available during the install.

    Cheers, Phil.
    --
    Philip Hands -- https://hands.com/~phil

    --=-=-Content-Type: application/pgp-signature; name="signature.asc"

    -----BEGIN PGP SIGNATURE-----

    iQIzBAEBCgAdFiEE3/FBWs4yJ/zyBwfW0EujoAEl1cAFAmURXZYACgkQ0EujoAEl 1cA0Hw//S3a/JrPSARbtv4grNKkWsyTyiP8A7gII+ta7uo+bVHek+oj1tXI7+olD AwNtXvD9e4Qr4WLYORVmOgpBOByyz63UgSE0PRQrAo6s2n5taWn+jxSB8P9PDpEK uv3wO5w6xGGQ8ZBc+oXiIV4AR2uy4VXY9FdZ3fu9PARZ+p9fmbEK0SpB6xE+TfOt F8HGVfBZlFn3CrckVHW4aQDB3cJsYz6fFVn5d1POdMQZfV1CHmIXjfy8aUmHjGOc nPPmfKwNjfXCt843umHFjEkqdSrL+RRMBD6rDJnc6yJ1LgFcE5+0+oF+EGUaLhTv lDey/kYFgjgdyhN+5WA/02FiglkUYk7XDqii4K7HDg2rBsZNpbSZpmRX0/v6uX5Y 2G4gJAw9So6RNT5g38XHd4s9LVWJxF6CLQ3/C2dXHLD6r51XeNqRSjpseiJKysOn 5XUsheRIzCmtyw+OWkZj7T0+zAK0r0FIxwzl/cq4h8Y0DeGS1Akei7Mx4MyL2oKH /tOier79lkDWdWgaMBo74FKyEgws/EOeQb6GXfojaTdxeaazpH16peXh9msspMZ7 y8jGD5Iy2P9Wojvcqa7dDTSlUCsrdoGTEb/9SHWsnRnP0SqkEHGFUTsfUwxaOWrm 5gWTf81K6Z8AwK25fTWOwxfajEg7yIcKE03jNS21Bmm2+0QmlpA�Hx
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway