On 2023-11-23, Nick Owens <misch...@offblast.org> wrote:
> On Tue, Nov 21, 2023 at 7:03 PM Chris Narkiewicz <he...@ezaquarii.com> wrote:
>>
>> I'm experimentin with auto-install over network using linux libvirt
>> (qemu).
>>
>> I managed to load pxeboot in BIOS mode and I'm wondering if UEFI
>> is supported.
>>
>> According to this blog, I should load BOOTX64.EFI instead of pxeboot.
>>
>> https://eradman.com/posts/autoinstall-openbsd.html
>>
>> I was skeptical but tried it neverthekess and system immediately reboots 
>> after
>> probing disk:
>>
>> probing: p0 com0 mem[640K 2029M 9M 3M]
>> disk:BS->LocateHandle() returns 14
>> <reboot>
>>
>> Is it possible to net-boot installer in UEFI using QEMU?
>>
>> Cheers,
>> Chris
>>
>
> i had some trouble getting PXE set up with dhcpd - see my mail from
> april, "dhcpd user-class and vendor-class".
>
> i think there is also a bug in the EFI loader when run under OVMF as
> you experienced, but i never figured it out.

With vendor-class the usual way is to react to the class sent by the
_client_ and, based on that, send other options as appropriate.
You can't do that with dhcpd from base though - it does not support
sending different options to different clients via matches - only
by setting per-client. It is however possible with ISC dhcpd.

Trying to _send_ it from the server like you showed, note that you can
only send one vendor-class (so you can't send different boot filenames
for different archs) and you can't override another "filename" option
(say for a non-UEFI pxeboot loader).

As such I think adding it to the manual is likely to create more
confusion as people try to use it in the way they've seen in how-to
docs for ISC dhcpd, and fail.

You don't need this in order to do network installs though.

In the simple case where you have only amd64 systems with 64-bit UEFI,
you can just copy BOOTX64.EFI to auto_install on your tftp server and
use 'filename "auto_install"' in dhcpd.conf.

AFAIK that isn't any worse than using "vendor-class" in the way
which you showed because you can't cope with multiple archs that
way anyway.


If you have a mixture of systems, you have several options, in all
cases you'll need to make a DHCP assignment for the client's MAC.
Note that the boot loader must be named auto_install for the
ramdisk's autoinstall functionality to work, *but* it can be in a
subdirectory. So either of these are possible:

- use tftpd -i and prepare per-IP directories where you copy the
relevant boot loader (whichever of pxeboot, BOOTIA32.EFI, BOOTX64.EFI,
BOOTAA64.EFI is appropriate) to /tftpboot/11.22.33.44/auto_install

- use standard tftpd options, create directories and copy the various
loaders across, e.g.
BOOTIA32.EFI -> /tftpboot/ia32/auto_install
BOOTX64.EFI -> /tftpboot/x64/auto_install
BOOTAA64.EFI -> /tftpboot/aa64/auto_install
pxeboot -> /tftpboot/pxe/auto_install
and in the "host" block in DHCP for each machine, set whichever
is appropriate under filename, e.g. 'filename "x64/auto_install"'.

We could definitely do with more docs for UEFI network installs
but think we need to get a better handle on it before adding them ..


-- 
Please keep replies on the mailing list.

Reply via email to