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

Re: Pondering experimenting using grub to replace isolinux


Steve McIntyre wrote:
> I'm told
> that Grub can do all the needed stuff to boot CDs as well, so I'm
> curious to test it.

Debian kfreebsd mini.iso already uses GRUB2 for BIOS.
amd64 and i386 have about the same equipment:

  Volume id    : 'ISOIMAGE'
  El Torito catalog  : 55  1
  El Torito cat path : /boot.catalog
  El Torito images   :   N  Pltf  B   Emul  Ld_seg  Hdpt  Ldsiz         LBA
  El Torito boot img :   1  BIOS  y   none  0x0000  0x00      4        5452
  El Torito img path :   1  /boot/grub/i386-pc/eltorito.img
  El Torito img opts :   1  boot-info-table
  System area options: 0x00000201
  System area summary: MBR protective-msdos-label cyl-align-off
  ISO image size/512 : 23512
  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  0xcd            1        23511

xorriso -as mkisofs options for reproduction:

  -partition_cyl_align off
  -partition_offset 0
  -partition_hd_cyl 64
  -partition_sec_hd 32
  -G --interval:local_fs:0s-15s:zero_mbrpt:'debian_kfreebsd_i386_mini.iso'
  -c '/boot.catalog'
  -b '/boot/grub/i386-pc/eltorito.img'
  -boot-load-size 4

(The argument of -G is a novelty of xorriso-1.4.0.
 It cuts block 0 to 15 out of the original ISO and
 zeros the MBR partition table. Then this is used instead
 of the original GRUB2 payload of the System Area.
 xorriso-1.4.2 will have a command to replay such settings
 automatically. So one can modify a bootable ISO without
 having to deal with above -as mkisofs options.)

The partiton generating options
will not be applicable any more.

grub-mkrescue uses -as mkisofs option
  -efi-boot-part --efi-boot-image
to expose the El Torito Boot Image as EFI System Partition.
That boot image gets marked by
  -efi-boot /path/in/iso/efi.img

Afaik GRUB2's grub-mkrescue produces only the "protective" MBR
partition table. I.e. there is no mountable partition with
the ISO filesystem. One has to mount the base device to get
to the ISO.
I dimly remember to have once proposed -partition_offset 16
to Vladimir Serbinenko for use in grub-mkrescue. He was not
convinced then.

For the sake of UEFI compliance i now repeat my proposal to
let the EFI System Partition be an appended data blob rather
than sharing the El Torito Boot Image file inside the ISO.
This would avoid nested partitions, which UEFI 2.4 clearly
(grub-mkrescue produces no nested partitions because it
 produces no mountable ISO partition around the EFI partition.)

Have a nice day :)


Reply to: