Skip to content
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

pixiecore quick xyz is legacy BIOS only by default? #131

Open
dnwe opened this issue Mar 22, 2021 · 4 comments
Open

pixiecore quick xyz is legacy BIOS only by default? #131

dnwe opened this issue Mar 22, 2021 · 4 comments

Comments

@dnwe
Copy link

dnwe commented Mar 22, 2021

Not a big issue, but I happened to notice that the quick cmd for serving up netboot.xyz is hardcoded to serve the legacy bios kernel image even to uefi clients which fails to boot iPXE with an exec format error (as you'd expect)

Switching the hardcoded location to a uefi image does work fine, so it's an easy workaround, but I thought I'd report it incase there was something neater we could do here:

diff --git a/pixiecore/cli/quickcmd.go b/pixiecore/cli/quickcmd.go
index 883195e..3360d0a 100644
--- a/pixiecore/cli/quickcmd.go
+++ b/pixiecore/cli/quickcmd.go
@@ -302,7 +302,7 @@ func netbootRecipe(parent *cobra.Command) {
                Long: `https://network.xyz allows to boot multiple operating
        systems and useful system utilities.`,
                Run: func(cmd *cobra.Command, args []string) {
-                       kernel := "https://boot.netboot.xyz/ipxe/netboot.xyz.lkrn"
+                       kernel := "https://boot.netboot.xyz/ipxe/netboot.xyz.efi"
                        fmt.Println(staticFromFlags(cmd, kernel, []string{}, "").Serve())
                },
        }
@prologic
Copy link

I think having a command-line option/flag here would be okay. AFAIK thee original author doesn't maintain this project anymore, but I've used it in the past to great success. Perhaps one of us can fork it if we have active use for it (I don't at the moment :/)

@dnwe
Copy link
Author

dnwe commented Mar 22, 2021

So the quick cmd already has cmdline options to let you specify a custom iPXE binary for BIOS, 32-bit UEFI and 64-bit UEFI

And the remote clients specify in their request what they would like:

netboot/pixiecore/pxe.go

Lines 100 to 105 in 66e5fba

case 6:
fwtype = FirmwareEFI32
case 7:
fwtype = FirmwareEFI64
case 9:
fwtype = FirmwareEFIBC

So I was assuming that we can detect and send the correct one automatically without manual config

@danderson
Copy link
Owner

I don't promise to maintain pixiecore, but as it happens I hit the same boot failure with xyz and would love to fix it :P

Sounds like the recipe needs to be updated to send different images based on the client's requested architecture.

@Matthieu-LAURENT39
Copy link

Would a PR to fix this get accepted?
Seems like the issue is still present

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants