Skip to content

Misc GRUB + boot related changes#27

Draft
mika wants to merge 4 commits into
masterfrom
mika/grubonly
Draft

Misc GRUB + boot related changes#27
mika wants to merge 4 commits into
masterfrom
mika/grubonly

Conversation

@mika
Copy link
Copy Markdown
Member

@mika mika commented Apr 30, 2026

Addressing #26 (not yet ready though, messed up something about /var/lib/tftpboot/boot/grub/grml* files which are missing and having wrong paths for kernel/initrd files then)

mika added 3 commits April 30, 2026 13:40
To match the behavior of our default ISO boot.

Closes: #25
We switched to GRUB 2 for BIOS boot instead of isolinux
in grml-live recently, see grml/grml-live#459
Now we no longer provide the expected files on our ISO any longer.

Booting BIOS systems via PXE using grml-terminalserver on recent Grml
ISOs now fails with:

  PXELINUX 6.04 PXE 20250811 Copyright (c) 1994-2015 H. Peter Anvin et al

  Failed to load ldlinux.c32
  Boot failed: press a key to retry, or wait for reset...

So point both isc-dhcp-server and dnsmasq at grub/i386-pc/core.0 for
BIOS/legacy clients instead of pxelinux.0. The GRUB i386-pc netboot
image is generated via grub-mknetdir (from grub2-common, requires
grub-pc-bin for the i386-pc modules), and shares the same grub/grub.cfg
already served to EFI clients. Generation is decided whether pxelinux.0
is present in the TFTP directory, which indicates that BIOS boot support
is expected, regardless of how the terminalserver system itself booted.

pxelinux.0 and pxelinux.cfg/default remain in the TFTP tree for
backwards compatibility with clients that request pxelinux explicitly.

While at it, also drop the legacy /lib/live/mount/medium and grml-live
template fallback code paths from grub-pxelinux_config, keeping only the
/run/live/medium path in use since December 2018.

Closes: #26
Remove all pxelinux/syslinux installation and configuration code, now
pxelinux.0, pxelinux.cfg/, boot.msg, logo.16, ISOLIN_PATH_,
PXE_BOOT_MSG_, and PXE_BOOT_LOGO_ are all gone. The grub-pxelinux_config
template gets renamed to grub-bios_config to reflect that GRUB now
handles both BIOS and EFI network boot.

The GRUB BIOS setup is handled depending on grub-pc-bin being present or
not, which as expected skips the i386-pc setup on arm64.

We drop the dependency on pxelinux, and add grub-pc-bin  (as required by
grub-mknetdir to generate grub/i386-pc/core.0) to Recommends, as we have
an architecture all package.
@zeha
Copy link
Copy Markdown
Member

zeha commented Apr 30, 2026

i think the problem here is a mismatch between what grml2usb expects and does and what the ISO provides and grml-terminalserver then copies.

grml2usb always writes "multiboot" config, thus the grub config expects (/var/lib/tftpboot/)/boot/grmlfullarm64/vmlinuz. But a normal ISO provides only /boot/vmlinuz, and grml-terminalserver copies that to /var/lib/tftpboot/boot/vmlinuz. Same for initrd.

I think thats best fixed in grml2usb, either by adding vmlinuz, initrd copying to --bootloader-only or some other option...

@mika
Copy link
Copy Markdown
Member Author

mika commented Apr 30, 2026

Indeed. But what's strange is that even with the cp -r "${filename}" "${TFTPD_DATA_DIR_}/boot/" then in the end the files are missing then on my system, something looks fishy but I didn't yet manage to track this down. I'd strongly prefer if we don't have a hard dependency between grml-terminalserver and specific grml2usb versions and if that could stay as-is with backwards compatibility.

This needs further polishing and more thorough review yet, but it's
initial working version for BIOS and EFI boot, AFAICT
@mika
Copy link
Copy Markdown
Member Author

mika commented Apr 30, 2026

Alright, managed to get this initially working, at least for BIOS + EFI boot when booting grml-full-2026.04-amd64.iso and invoking grml-terminalserver. It clearly needs further testing with older releases yet, including arm64 and further review whether all changes really make sense as such or something is just a workaround for something I broke elsewhere. :)

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

Successfully merging this pull request may close these issues.

2 participants