bug-xorriso
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is --protective-msdos-label incompatible with -isohybrid-mbr?


From: Thomas Schmitt
Subject: Re: Is --protective-msdos-label incompatible with -isohybrid-mbr?
Date: Sun, 08 Nov 2020 11:48:52 +0100

Hi,

Martin Whitaker wrote:
> As background, I'm investigating this in order to add UEFI support to the
> Mageia 32-bit netinstall ISOs.
> I've already switched the other Mageia ISOs to use GRUB, so maybe that is
> the only solution. But I'll do some trials with -partition_offset 16 to see
> if that is a workable alternative.

I have a Mageia ISO with

  Volume Id    : Mageia-8-beta1-i586
  Publisher Id : MAGEIA.ORG
  Preparer Id  : DRAKISO
  App Id       : GNU XORRISO 1.5.0
  Creation Time: 2020071910590100

which is equipped with GRUB for BIOS and EFI.
It can indeed be improved by using
  -partition_offset 16
instead of
  --protective-msdos-label
This would give a mountable ISO partition with non-zero start which would
still be mountable if you switch from MBR partition table to GPT by:

  -appended_part_as_gpt \

and maybe additionally for old BIOS HP laptops
   -mbr-force-bootable \
(See below.)

It is a neater solution than what Fedora, Debian, and others use since
years, and which Ubuntu gave up only recently:

  -isohybrid-mbr ...disk.path...
  -iso_mbr_part_type 0x00
  -c '/isolinux/boot.cat'
  -b '/isolinux/isolinux.bin'
  -no-emul-boot
  -boot-load-size 4
  -boot-info-table
  -eltorito-alt-boot
  -e '/boot/grub/efi.img'
  -no-emul-boot
  -isohybrid-gpt-basdat

It produces a mix of ISOLINUX for BIOS and GRUB for EFI (because SYSLINUX
for EFI does not work from CD/DVD/BD media).
The partition table is quite against the UEFI specs:

  $ xorriso -indev debian-8.1.0-amd64-netinst.iso -report_system_area plain
  ...
  System area summary: MBR isohybrid cyl-align-on GPT APM
  ...
  MBR partition table:   N Status  Type        Start       Blocks
  MBR partition      :   1   0x80  0x00            0       505856
  MBR partition      :   2   0x00  0xef         3980          832
  MBR partition path :   2  /boot/grub/efi.img
  ...
  ... partitions of invalid GPT ...

The specs prohibit nested partitions, which are inavoidable if the EFI
system partition image is a file in the ISO.
So the outer partition must have type 0x00 in order to hide it from EFI.
There is also a GPT in the ISO. But it is invalid by the fact that the
MBR partition table contains a partition of type other than 0x00 and 0xee.

Ugly as it is, it works since it was invented by Matthew J. Garrett for
Fedora and implemented as option --uefi in program "isohybrid". See
  http://mjg59.dreamwidth.org/11285.html

But as lurker at SYSLINUX and GRUB mailing lists i understand the
motivation to give up ISOLINUX and to switch to GRUB for BIOS instead.
There is no development going on in SYSLINUX while GRUB is boiling of
activity.

Nevertheless, when Ubuntu switched to GRUB for BIOS it had to use
  -appended_part_as_gpt
because some new Lenovo EFI laptops did not boot from MBR partition table.
(The riddle is that they do if they get presented the old ugly layout with
 isohybrid and GRUB.)

Because some old HP BIOS laptops boot only if the "boot" flag is present
in some MBR partition slot, it was necessary to use option
  --mbr-force-bootable
in order to add again a MBR partition of type 0x00 which carries the flag.
(That flag is supposed to have no meaning to BIOS but rather to some MBR
code which uses it to find the next stage of its chainloading. But the
firmware programmers of the affected laptops seem to have gotten this
wrong.)


Have a nice day :)

Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]