Re: grub2 BIOS booting iso and code

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

 



Hi,

i wrote:
> > Does it boot with ubuntu-21.10-desktop-amd64.iso ?

Dominik 'Rathann' Mierzejewski wrote:
> It doesn't. Same error.
> [...]
> $ grub2-mkrescue -o output-mbr.iso --mbr-force-bootable minimal
> gives me the "Operation System not found" BIOS error again.

> > Building something nearer to the old ISO layout:
> >   new_iso=test_mjgappended.iso

> Unfortunately, that one doesn't boot.

So it is really a new BIOS quirk.
It is astounding how much the old jackalope ISO snuggles itself into such
firmwares.


> I'll try modifying the ISO from the beginning of this thread according
> to your instructions from another subthread.

If it is about the variant with options -part_like_isohybrid and
-isohybrid-gpt-basdat then i have to warn of a bug in xorriso which
i found while preparing the next experiment.
The bug prevents the production of the MBR partition table in this case
and thus makes the resulting ISO unbootable on EFI from USB stick.

BIOS booting should be ok. But the wrong result is not a candidate for
a generally bootable ISO. Maybe it is not even significant for a test.

I am currently testing a remedy, but this will last a few days because
i have to be quite paranoid with changing the boot equipment code in
libisofs.
When it's ready, i will ask you to download and compile a GNU xorriso 1.5.5
development snapshot. (The compilation has no special dependencies.)

------------------------------------------------------------------------

Whatever, if you want to try already now with the buggy result, begin
like with the last experiment. You can re-use the files from the
last time:

  # Extract the EFI partition
  dd if=boot-grub2-f36.iso bs=512 skip=1313268 count=20288 of=test_efi.img

  # Extract the MBR code
  dd if=boot-grub2-f36.iso bs=1 count=446 of=test_mbr.img

  # Pad MBR up to 32768 bytes, so that it overwrites the loaded system area
  dd if=/dev/zero bs=1 count=32322 >>test_mbr.img

The xorriso run shall bring the ISO as near to the old layout as possible:

  new_iso=test_oldlayout.iso

  # xorriso in its native mode does not truncate -outdev
  test -e "$new_iso" && rm "$new_iso"

  xorriso \
    -indev boot-grub2-f36.iso \
    -outdev "$new_iso" \
    -map test_efi.img /images/efiboot.img \
    -as mkisofs \
      -part_like_isohybrid \
      --grub2-mbr test_mbr.img \
      --boot-catalog-hide \
      -b /images/eltorito.img \
         -no-emul-boot -boot-load-size 4 -boot-info-table \
         --grub2-boot-info \
      -eltorito-alt-boot \
      -e images/efiboot.img \
        -no-emul-boot -isohybrid-gpt-basdat \
      -R -J \
    -- \
    -padding included \
    -compliance no_emul_toc \
    -stdio_sync off

After bug correction the result will look like this:

  $ xorriso -indev "$new_iso" -report_system_area plain -report_el_torito plain
  [...]
  System area options: 0x00004a00
  System area summary: MBR grub2-mbr cyl-align-off GPT
  ISO image size/512 : 1334000
  Partition offset   : 0
  MBR heads per cyl  : 64
  MBR secs per head  : 32
  MBR partition table:   N Status  Type        Start       Blocks
  MBR partition      :   1   0x80  0x17            0      1334000
  MBR partition      :   2   0x00  0xef      1313032        20288
  MBR partition path :   2  /images/efiboot.img
  GPT                :   N  Info
  GPT disk GUID      :      63f762129e2da8499aee97f68461f45f
  GPT entry array    :      2  248  separated
  GPT lba range      :      64  1333936  1333999
  GPT partition name :   1  490053004f004800790062007200690064003100
  GPT partname local :   1  ISOHybrid1
  GPT partition GUID :   1  63f762129e2da8499aef97f68461f45f
  GPT type GUID      :   1  a2a0d0ebe5b9334487c068b6b72699c7
  GPT partition flags:   1  0x1000000000000001
  GPT start and size :   1  1313032  20288
  GPT partition path :   1  /images/efiboot.img
  El Torito catalog  : 77  1
  El Torito images   :   N  Pltf  B   Emul  Ld_seg  Hdpt  Ldsiz         LBA
  El Torito boot img :   1  BIOS  y   none  0x0000  0x00      4          78
  El Torito boot img :   2  UEFI  y   none  0x0000  0x00  20288      328258
  El Torito img path :   1  /images/eltorito.img
  El Torito img opts :   1  boot-info-table grub2-boot-info
  El Torito img path :   2  /images/efiboot.img

  $ /sbin/fdisk -l "$new_iso"
  [...]
  Disklabel type: dos
  [...]
  Disk identifier: 0x00000000

  Device              Boot   Start     End Sectors   Size Id Type
  test_oldlayout.iso1 *          0 1333959 1333960 651.4M 17 Hidden HPFS/NTFS
  test_oldlayout.iso2      1313008 1333295   20288   9.9M ef EFI (FAT-12/16/32)

With the bug still in xorriso, the lines which begin by "MBR" will be
missing. fdisk will report no partitions. (Normal BIOS would not care
about these defects.)


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