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

Re: Building image with grub-efi-amd64 instead of grub-pc?



Hi,

i wrote:
> > The open question is rather how to talk live-build into creating an
> > ISO with "syslinux" and "grub-efi" combined.

Juergen Fiedler wrote:
> The way that worked for me was to run lb config with the '--bootloaders
> "syslinux,grub-efi"' parameter. With a legacy BIOS, it'll use Syslinux, on a
> UEFI machine, it'll use Grub.

After live-build has produced a new ISO, xorriso might be of help by
telling what boot equipment is effectively in there.

Example with a Debian Live ISO from the official download site:

  $ xorriso -indev debian-live-11.1.0-amd64-xfce.iso -report_el_torito plain -report_system_area plain
  GNU xorriso 1.5.5 : RockRidge filesystem manipulator, libburnia project.

  xorriso : NOTE : Loading ISO image tree from LBA 0
  xorriso : UPDATE :    1071 nodes read in 1 seconds
  xorriso : NOTE : Detected El-Torito boot information which currently is set to be discarded
  Drive current: -indev 'debian-live-11.1.0-amd64-xfce.iso'
  Media current: stdio file, overwriteable
  Media status : is written , is appendable
  Boot record  : El Torito , MBR isohybrid cyl-align-off GPT
  Media summary: 1 session, 1220608 data blocks, 2384m data,  330g free
  Volume id    : 'd-live 11.1.0 xf amd64'
  El Torito catalog  : 367  1
  El Torito cat path : /isolinux/boot.cat
  El Torito images   :   N  Pltf  B   Emul  Ld_seg  Hdpt  Ldsiz         LBA
  El Torito boot img :   1  BIOS  y   none  0x0000  0x00      4        1675
  El Torito boot img :   2  UEFI  y   none  0x0000  0x00   5226         368
  El Torito img path :   1  /isolinux/isolinux.bin
  El Torito img opts :   1  boot-info-table isohybrid-suitable
  El Torito img path :   2  /boot/grub/efi.img
  System area options: 0x00000202
  System area summary: MBR isohybrid cyl-align-off GPT
  ISO image size/512 : 4882432
  Partition offset   : 0
  MBR heads per cyl  : 0
  MBR secs per head  : 0
  MBR partition table:   N Status  Type        Start       Blocks
  MBR partition      :   1   0x80  0x00            0      4882432
  MBR partition      :   2   0x00  0xef         1472         5226
  MBR partition path :   2  /boot/grub/efi.img
  GPT                :   N  Info
  GPT disk GUID      :      91a5080d6056c24999e6e7e26636612c
  GPT entry array    :      2  248  overlapping
  GPT lba range      :      64  4882368  4882431
  GPT partition name :   1  490053004f00480079006200720069006400
  GPT partname local :   1  ISOHybrid
  GPT partition GUID :   1  91a5080d6056c24999e7e7e26636612c
  GPT type GUID      :   1  a2a0d0ebe5b9334487c068b6b72699c7
  GPT partition flags:   1  0x1000000000000001
  GPT start and size :   1  0  4882368
  GPT partition name :   2  490053004f004800790062007200690064003100
  GPT partname local :   2  ISOHybrid1
  GPT partition GUID :   2  91a5080d6056c24999e4e7e26636612c
  GPT type GUID      :   2  a2a0d0ebe5b9334487c068b6b72699c7
  GPT partition flags:   2  0x1000000000000001
  GPT start and size :   2  1472  5224
  GPT partition path :   2  /boot/grub/efi.img


This ISO stems from live-wrapper not from live-build, afaik.
Nevertheless it shows the boot equipment which i expect from live-build
with "syslinux" and "grub-efi":

For optical media (CD, DVD, BD):
- "isolinux.bin" as El Torito boot image for legacy BIOS.
- "efi.img" as El Torito boot image for EFI.

For disk-like storage devices, e.g. USB sticks:
- an isohybrid MBR from ISOLINUX/SYSLINUX for legacy BIOS.
- "efi.img" as EFI System Partition in the MBR partition table.

For poorly programmed firmwares:
- "efi.img" as GPT data partition in an invalid GPT.

Some EFI firmwares do not accept EFI system partitions if there is no GPT
header block. Whether the data partition in GPT is needed with "efi.img"
as content has not been determined yet.
In any case the GPT header block is not properly announced in the MBR,
so that the overall GPT is not valid as partition table.

There are ways to get a valid GPT from xorriso but then there are other
firmwares which don't work if there is no boot flag set in the MBR.
UEFI specs forbid to set that flag in an MBR which announces the presence
of of a valid GPT.

So above old jackalope, invented by Matthew J. Garrett for Fedora, is
still one of the best layouts to catch all existing boot firmwares by
a single ISO.


Have a nice day :)

Thomas


Reply to: