-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iPXE UEFI support #482
Comments
hi @olivierlambert, Right now there is not way to do unattended installation of xcp-ng over network with UEFI. I see two strategies how this could be implemented:
|
It's a bit more convoluted, but you can already put Then this |
But I have to manually type |
Can you describe your use case with more details? |
I would like to provision multiple xcp-ng instances in unattended manner over network. I guess last resort I can do that with custom ISO, but I would like to avoid that since in long run it would be less maintainable. Our hardware use open-source firmware distribution called Dasharo, which consist of coreboot with UEFI payload. As network stack in UEFI we have iPXE. We control whole firmware stack so we can modify it as needed e.g. enabled/disable options in iPXE. What I'm trying to do is boot my hardware, it gets through boot order, kicks iPXE with known location of xcp-ng.ipxe script, which then preform automatic installation according to provided answerfile. Is that clear enough? |
I guess this would be useful if merged. It would also enabled TrenchBoot use cases. |
Thanks for the details. It's clear to me. Yes, multiboot2 support was rejected by iPXE developers and would be apparently hard to maintain properly. I doubt this patch will ever be merged. So the only options I know for EFI boot from iPXE are, as you said, grub or xen.efi. I haven't found yet how (if possible at all) to pass a custom configuration from iPXE to grub. If there are build options to enable it, we'll gladly try them on the upcoming XCP-ng 8.3 beta. Providing Meanwhile, modifying grub.cfg on the ISO or on the TFTP server is the best solution. If you need the answerfile to be dependent on the machine you are installing on, then my solution above (redirect to a PHP script or such that generates the grub configuration on the fly) might work. It works for us at least. |
Thanks @stormi In following months we plan to invest more 3mdeb and Dasharo Teams time in XCP-ng. This should benefit Protectli and other partners. |
Great news @pietrushnic eager to move forward on this together! |
I made some minor progress using mentioned ipxe code build in following way: I'm booting Xen but it crash complaining about image: https://paste.dasharo.com/?4024a8861e962a9f#CNGo1D53J9sr1kwonV71nQ7sn815hvdEhXyjbZhccRBT |
One misc note
Use For the main issue:
There's a longstanding iPXE bug with multiboot. When iPXE decompresses a binary, it fails to exclude it from the multiboot list, so we end up with The giant bodge is to decompress Xen before letting iPXE work it. but if you could fix iPXE's handling of its multiboot images when decompressing intermediate ones, that would be massively preferable. |
@andyhhp thanks for comments.
Ok, I guess xcp-ng documentation could be improved in that regard: https://xcp-ng.org/docs/install.html#netinstall
I don't feel very competent here, but I can try or ask someone for help. Please note I'm trying @krystian-hebel multiboot2 patches from here. |
@andyhhp I made some progress, please check: https://paste.dasharo.com/?1f7b7ddcb1eb4b53#FPSBGN1GKaRC288f6AF8fz5MJhR7HP5iXsYk7NSL4WK8 I'm booting xen and kernel, and finally xcp-ng installer starting, but Xen shutdown the platform. Any reason? |
Or maybe @stormi can say something from xcp-ng side/ ? |
|
The error is |
After fixing asnwerfile I can reach EULA screen, which is related to: #493 |
Wasn't the EULA display fixed in XCP-ng 8.2.1 installation ISOs? |
It still popup, I guess I need something like:
In my |
I'm surprised. The EULA was reformatted with short lines to fix this issue and I verified the fix did make it into XCP-ng 8.2.1 installation ISOs. What does it look like on screen? |
XCP-ng unattended installationRequirements
HTTP server setup
Run HTTP server
iPXE boot target hardware
|
Screen for accepting EULA appears after installer reboot. |
This screen, as well as the next one that asks for a root password to be set, is displayed if no password is defined in the answerfile. See https://github.com/xcp-ng/host-installer/blob/10.10.x-8.3/doc/answerfile.txt#L217 |
Ok, let me try with |
Looks like installer doesn't like my self-hosted repo:
I'm wget'ting this https://updates.xcp-ng.org/netinstall/8.2.1/ So I assume everything should be ok. |
You probably missed the .treeinfo file. |
Seems like you've got beyond this this, but just to answer the question:
Dom0 requested a clean reboot. Xen did as instructed. |
@andyhhp thanks. Yes, I get through that and multiboot2 patches rebased by @krystian-hebel work well. So Dasharo will most likely include those in iPXE version we ship.
@stormi thanks. Yes I was copied stuff from web server not from ISO that's why I didn't get <?xml version="1.0"?>
<installation mode="fresh">
<primary-disk>sda</primary-disk>
<keymap>pl</keymap>
<root-password type="plaintext">xcp-ng</root-password>
<source type="url">https://updates.xcp-ng.org/netinstall/latest/</source>
<admin-interface name="eth0" proto="dhcp"/>
<timezone>Europe/Warsaw</timezone>
</installation> Until If I will get to enable non-Dasharo machines I would probably produce and publish iPXE ISO which can be flashed to USB, so unattended installation would be available to community. |
So, we investigated The only solution I can see remaining for anyone who wants to boot an unmodified installation media with iPXE and a custom installation configuration is by using a modified iPXE with the multiboot2 patches. For those who wouldn't have a strict "don't modify the installation media" requirement, the best remains to modify grub's configuration directly on the installation media. |
We should be able to boot XCP-ng installer with iPXE with UEFI enabled. We might have to chainload to grub then installer itself.
The text was updated successfully, but these errors were encountered: