Skip to content

grml2usb: replace mbrldr/mbrmgr with syslinux MBR#99

Open
mika wants to merge 1 commit intomika/483from
mika/mbrldr
Open

grml2usb: replace mbrldr/mbrmgr with syslinux MBR#99
mika wants to merge 1 commit intomika/483from
mika/mbrldr

Conversation

@mika
Copy link
Member

@mika mika commented Mar 10, 2026

The MirBSD-derived mbrldr/mbrmgr binaries offer no functional advantage over the syslinux MBR. Replace them with automatic syslinux MBR discovery (checking the same paths previously used by --syslinux-mbr), removing the need for a bundled MBR binary.

FTR:

  • Remove mbr directory
  • Always use syslinux MBR when bootloader is syslinux
  • Remove ismirbsdmbr logic from install_mbr, always use the standard active partition flag (0x80)
  • Deprecate --syslinux-mbr and --mbr-menu as no-ops with warnings to preserve backwards compatibility
  • Update debian + tarball.sh files accordingly

NOTE: based on #98

@mika
Copy link
Member Author

mika commented Mar 10, 2026

While looking into the MBR situation for #98, maybe it's time for this also?

@mika mika requested a review from zeha March 10, 2026 17:41
@zeha
Copy link
Member

zeha commented Mar 10, 2026

I think more code can go away when doing this. Will look more closely later

Copy link
Member

@zeha zeha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  make[1]: Entering directory '/github/workspace'
  make -C clean
  make[2]: *** clean: No such file or directory.  Stop.
  make[2]: Entering directory '/github/workspace'
  make[1]: *** [Makefile:31: clean] Error 2
  make[2]: Leaving directory '/github/workspace'
  make[1]: Leaving directory '/github/workspace'
  dh_auto_clean: error: make -j4 clean returned exit code 2
  make: *** [debian/rules:9: clean] Error 25
  dpkg-buildpackage: error: debian/rules clean subprocess returned exit status 2

@github-actions
Copy link

📦 Built packages are ready! Download here.

@mika
Copy link
Member Author

mika commented Mar 12, 2026

  make[1]: Entering directory '/github/workspace'
  make -C clean
  make[2]: *** clean: No such file or directory.  Stop.
  make[2]: Entering directory '/github/workspace'
  make[1]: *** [Makefile:31: clean] Error 2
  make[2]: Leaving directory '/github/workspace'
  make[1]: Leaving directory '/github/workspace'
  dh_auto_clean: error: make -j4 clean returned exit code 2
  make: *** [debian/rules:9: clean] Error 25
  dpkg-buildpackage: error: debian/rules clean subprocess returned exit status 2

Uh thanks and sorry, oversight from my side, fixed!

@github-actions
Copy link

📦 Built packages are ready! Download here.

@github-actions
Copy link

📦 Built packages are ready! Download here.

@zeha
Copy link
Member

zeha commented Mar 12, 2026

this should also go away i think:

debian/control
14: nasm,

The MirBSD-derived mbrldr/mbrmgr binaries offer no functional
advantage over the syslinux MBR. Replace them with automatic
syslinux MBR discovery (checking the same paths previously used
by --syslinux-mbr), removing the need for a bundled MBR binary.

Note that syslinux-common ships the mbr.bin file as
/usr/lib/syslinux/mbr/mbr.bin nowadays, so added this path to
our mbr_locations where to look for syslinux mbr files.

FTR:

- Remove mbr directory
- Always use syslinux MBR when bootloader is syslinux
- Remove ismirbsdmbr logic from install_mbr, always use the
  standard active partition flag (0x80)
- Deprecate --syslinux-mbr and --mbr-menu as no-ops with warnings
  to preserve backwards compatibility
- Drop now no longer needed dependency on nasm
- Update Makefile, docs, debian/, tarball.sh + github workflow files
  accordingly
@zeha
Copy link
Member

zeha commented Mar 12, 2026

grml2usb.8.adoc also still says this:

[IMPORTANT]
By default a compatible master boot record (MBR) is installed on the device
(being for example /dev/sdX when executing 'grml2usb grml.iso /dev/sdX1') and
syslinux is being used as default bootloader. Avoid installation of the default
MBR using the '--skip-mbr' option or if you encounter any problems with the
default MBR consider using '--syslinux-mbr' instead.

maybe addtl. doc updates are necessary, please check

@github-actions
Copy link

📦 Built packages are ready! Download here.

@mika
Copy link
Member Author

mika commented Mar 12, 2026

grml2usb.8.adoc also still says this:

[IMPORTANT]
By default a compatible master boot record (MBR) is installed on the device
(being for example /dev/sdX when executing 'grml2usb grml.iso /dev/sdX1') and
syslinux is being used as default bootloader. Avoid installation of the default
MBR using the '--skip-mbr' option or if you encounter any problems with the
default MBR consider using '--syslinux-mbr' instead.

maybe addtl. doc updates are necessary, please check

ACK thanks, I noticed that grml2usb.8.adoc is outdated in several sections, needs even further work :-/

@zeha
Copy link
Member

zeha commented Mar 12, 2026

ACK thanks, I noticed that grml2usb.8.adoc is outdated in several sections, needs even further work :-/

right, lets see about mbr-stuff in this PR though

@zeha
Copy link
Member

zeha commented Mar 12, 2026

Please rebase on top of current master. Note that test_smoke tests only the defaults, thus now grub. Maybe we should extend the tests to cover syslinux, or ignore that?

@zeha
Copy link
Member

zeha commented Mar 12, 2026

Note that test_smoke tests only the defaults, thus now grub. Maybe we should extend the tests to cover syslinux, or ignore that?

I added an efi test in #103. Testing syslinux is for now impossible as the latest daily ISOs no longer contain the required syslinux files.

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