Re: F37 Change: Deprecate Legacy BIOS (System-Wide Change proposal)

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

 



Hi,

i'm the developer of xorriso. Please CC me with replies just in case
that i unsubscribe because of too much traffic.

Further: Sorry for my reply-id pointing to the predecessor of the message
which i quote. I found it at
  https://www.spinics.net/lists/fedora-devel/msg299915.html

Chris Murphy wrote:
> For what it's worth, the current xorriso command used [...] is
>
> xorrisofs -o /var/tmp/lmc-work-hrb6zq5j/images/boot.iso
> -isohybrid-mbr /usr/share/syslinux/isohdpfx.bin
> -b isolinux/isolinux.bin
> -c isolinux/boot.cat
> -boot-load-size 4 -boot-info-table -no-emul-boot
> -eltorito-alt-boot
> -e images/efiboot.img -no-emul-boot -isohybrid-gpt-basdat
> -eltorito-alt-boot
> -e images/macboot.img -no-emul-boot -isohybrid-gpt-hfsplus
> -R -J -V Fedora-WS-Live-36-20220407-n-0
> -graft-points
> [... various files and directories grafted in ...]
>
> There's a bit to unpack there...

The lines, which will need changes for using GRUB, are at least:

  -isohybrid-mbr /usr/share/syslinux/isohdpfx.bin
  [...]
  -boot-load-size 4 -boot-info-table -no-emul-boot
  -b isolinux/isolinux.bin

grub-mkrescue (on Debian) uses instead:

  --grub2-mbr /usr/lib/grub/i386-pc/boot_hybrid.img
  -b boot/grub/i386-pc/eltorito.img
     -no-emul-boot -boot-load-size 4 -boot-info-table --grub2-boot-info

/usr/lib/grub/i386-pc/boot_hybrid.img is part of Debian's grub-pc-bin
package. It gets built by upstream file grub-core/Makefile.core
  https://sources.debian.org/src/grub2/2.06-2/grub-core/Makefile.core.am/?hl=23370#L23370

/boot/grub/i386-pc/eltorito.img has to be inserted as data file into
the emerging ISO 9660 filesystem. grub-mkrescue puts it into the
file tree on hard disk which it then gives to xorrisofs as input file.
It gets produced by GRUB from a file named "cdboot.img". In Debian it
is part of package grub-pc-bin as
  /usr/lib/grub/i386-pc/cdboot.img
It does not appear as if the read-in cdboot.img would get modified before
it gets written back as "eltorito.img":
  https://sources.debian.org/src/grub2/2.06-2/util/mkimage.c/?hl=1271#L1266
Its production/copying gets ordered in:
  https://sources.debian.org/src/grub2/2.06-2/util/grub-mkrescue.c/?hl=598#L584

The emerging GRUB MBR is supposed to boot from USB sticks quite like the
ISOLINUX MBR. Both hop with their execution onto the El Torito boot
images for BIOS.

grub-mkrescue uses no option -c, which does not matter for boot success.
Fedora can well keep its

  -c isolinux/boot.cat

The EFI-related options -isohybrid-gpt-basdat and -isohybrid-gpt-hfsplus
will continue to work, if additionally option

  -part_like_isohybrid

is given (once is enough).

------------------------------------------------------------------------
More unsolicited info:

An opportunity to watch grub-mkrescue's xorriso options is given by
the script
  frontend/grub-mkrescue-sed.sh
from the source tarball of xorriso (which in Fedora is libisoburn-*.tar.gz):

  https://dev.lovelyhq.com/libburnia/libisoburn/raw/branch/master/frontend/grub-mkrescue-sed.sh

I derived above BIOS proposal by

  mkdir minimal
  touch minimal/empty-file.txt
  export MKRESCUE_SED_DEBUG=yes
  grub-mkrescue -o output.iso minimal \
                --xorriso=/...localpath.../frontend/grub-mkrescue-sed.sh

If i install (on Debian)
  grub-common grub-pc-bin grub-efi-amd64-bin grub-efi-ia32-bin
i get from grub-mkrescue an ISO with both, BIOS and EFI equipment.

The original purpose of the script grub-mkrescue-sed.sh is to enable
variations of the xorriso options to create different layouts of partition
tables for the EFI stuff. See "Variation settings" in the script.
The main drawback of grub-mkrescue's original partition layout is that
there is no mountable partition for the ISO 9660 filesystem.
For Fedora's ISOs it might be interesting to inspect the messages and
the resulting ISO of

  export MKRESCUE_SED_MODE=mjg
  export MKRESCUE_SED_DEBUG=yes
  grub-mkrescue -o output.iso minimal \
                --xorriso=/...localpath.../frontend/grub-mkrescue-sed.sh

It produces a layout that is inspired by mjg59's from 2012, but avoids
to have the EFI partition inside the ISO 9660 filesystem and its partition
by appending the EFI partition.
(The HFS+ filesystem for Macs gets produced by libisofs. It would be
interesting to learn whether such Macs still exist and work with the
grub-mkrescue ISO.)

Discussions with other distro's ISO maintainers and their users yielded
that some old BIOS machines demand an MBR partition with "boot/active"
flag. Some new EFIs demand the presence of a GPT. So ye olde nested
pseudo-GPT partition layout of Fedora (and also of Debian) still has
its merits.
Just the nesting is ugly, unneeded, and causes protests from partition
editors.

With original grub-mkrescue layout and its pure GPT, the remedy is to use
xorrisofs option --mbr-force-bootable which makes the GPT a bit less pure
by adding a little dummy MBR partition of type 0x00.


Have a nice day :)

Thomas
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux