Re: arm64 and isohybrid
Hi,
i wonder why my mail of Thu, 29 Jan 2015 08:14:08 +0100
does not show up in debian-cd mailing list. It reported about
a preliminary experiment with amd64 mini.iso.
Meanwhile it is quite outdated by my new experiments with
an arm64 ISO.
-------------------------------------------------------------
I downloaded
http://cloudfront.debian.net/cdimage/jessie_di_beta_2/arm64/iso-cd/debian-jessie-DI-b2-arm64-netinst.iso
of 2014-10-03.
Inspection yields:
Volume id : 'Debian jessie-DI-b2 arm64 1'
El Torito catalog : 832 1
El Torito cat path : /boot.catalog
El Torito images : N Pltf B Emul Ld_seg Hdpt Ldsiz LBA
El Torito boot img : 1 UEFI y none 0x0000 0x00 768 833
El Torito img path : 1 /boot/grub/efi.img
xorriso : NOTE : No System Area was loaded
This looks like amd64 mini.iso without the BIOS stuff.
After reading its /.disk/mkisofs, i re-pack it by
# A dummy MBR template as substitute for isohdpfx.bin
dd if=/dev/zero bs=432 count=1 of=null.mbr
mount -o loop debian-jessie-DI-b2-arm64-netinst.iso /mnt/iso
xorriso -as mkisofs \
-V 'Debian jessie-DI-b2 arm64 1' \
-r -o test.iso -J -joliet-long -cache-inodes \
-isohybrid-mbr null.mbr \
-e boot/grub/efi.img -no-emul-boot -isohybrid-gpt-basdat \
/mnt/iso
Omitted options:
all Jigdo options
-eltorito-alt-boot is a separator which is needed only if
already a boot image was defined by -b, -e,
or alike
Added options:
-isohybrid-gpt-basdat works only if -isohybrid-mbr is present
-isohybrid-mbr gets as input the dummy MBR template. So SYSLINUX
is not needed.
The result shows nested partitions in MBR and GPT.
This is the mjg layout, which partition editors dislike heavily
but seems to work well in the amd64 netinst ISOs.
It offers three entry points for booting: El Torito, MBR, GPT.
------------------------------------------------------------------------
El Torito catalog : 832 1
El Torito cat path : /boot.catalog
El Torito images : N Pltf B Emul Ld_seg Hdpt Ldsiz LBA
El Torito boot img : 1 UEFI y none 0x0000 0x00 768 833
El Torito img path : 1 /boot/grub/efi.img
System area options: 0x00000900
System area summary: MBR cyl-align-on GPT
ISO image size/512 : 262144
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 0x00 0 262144
MBR partition : 2 0x00 0xef 3332 768
MBR partition path : 2 /boot/grub/efi.img
GPT : N Info
GPT disk GUID : 8822d6a0aadcde40a8afcd569dc28802
GPT entry array : 2 248 overlapping
GPT lba range : 64 262080 262143
GPT partition name : 1 490053004f00480079006200720069006400
GPT partname local : 1 ISOHybrid
GPT partition GUID : 1 8822d6a0aadcde40a8adcd569dc28802
GPT type GUID : 1 a2a0d0ebe5b9334487c068b6b72699c7
GPT partition flags: 1 0x1000000000000001
GPT start and size : 1 0 262080
GPT partition name : 2 490053004f004800790062007200690064003100
GPT partname local : 2 ISOHybrid1
GPT partition GUID : 2 8822d6a0aadcde40a8accd569dc28802
GPT type GUID : 2 a2a0d0ebe5b9334487c068b6b72699c7
GPT partition flags: 2 0x1000000000000001
GPT start and size : 2 3332 768
GPT partition path : 2 /boot/grub/efi.img
------------------------------------------------------------------------
Of course it is odd to use ISOLINUX related xorriso commands
with pure GRUB2 boot equipment. Especially since Vladimir
Serbinenko puts much emphasis on a neat partition table.
Let's try an option which was introduced for grub-mkrescue
xorriso -as mkisofs \
-V 'Debian jessie-DI-b2 arm64 1' \
-r -o test.iso -J -joliet-long -cache-inodes \
-efi-boot-part --efi-boot-image \
-e boot/grub/efi.img -no-emul-boot \
/mnt/iso
Added options:
-efi-boot-part with special argument "--efi-boot-image"
marks the first EFI El Torito boot image as
partition in GPT.
Only a "protective MBR" emerges, which complies
to GPT specs. (Other than a multi-partition MBR.)
This yields a more conventional partition layout.
The range of the ISO filesystem is protected by the MBR partition and
by three GPT partitions, of which the middle one points to the EFI
boot filesystem in /boot/grub/efi.img.
Only two boot entry points are provided: El Torito and GPT.
------------------------------------------------------------------------
El Torito catalog : 1024 1
El Torito cat path : /boot.catalog
El Torito images : N Pltf B Emul Ld_seg Hdpt Ldsiz LBA
El Torito boot img : 1 UEFI y none 0x0000 0x00 768 831
El Torito img path : 1 /boot/grub/efi.img
System area options: 0x00000201
System area summary: MBR protective-msdos-label cyl-align-off GPT
ISO image size/512 : 260484
Partition offset : 0
MBR heads per cyl : 64
MBR secs per head : 32
MBR partition table: N Status Type Start Blocks
MBR partition : 1 0x00 0xee 1 260483
GPT : N Info
GPT disk GUID : 307e73f26c8c7b4a9dd739bd9e5991fe
GPT entry array : 2 248 separated
GPT lba range : 64 260420 260483
GPT partition name : 1 4700610070003000
GPT partname local : 1 Gap0
GPT partition GUID : 1 307e73f26c8c7b4a9dd439bd9e5991fe
GPT type GUID : 1 a2a0d0ebe5b9334487c068b6b72699c7
GPT partition flags: 1 0x1000000000000001
GPT start and size : 1 64 3260
GPT partition name : 2 450046004900200062006f006f007400200070006100720074006900740069006f006e00
GPT partname local : 2 EFI boot partition
GPT partition GUID : 2 307e73f26c8c7b4a9dd539bd9e5991fe
GPT type GUID : 2 28732ac11ff8d211ba4b00a0c93ec93b
GPT partition flags: 2 0x1000000000000001
GPT start and size : 2 3324 768
GPT partition path : 2 /boot/grub/efi.img
GPT partition name : 3 4700610070003100
GPT partname local : 3 Gap1
GPT partition GUID : 3 307e73f26c8c7b4a9dd639bd9e5991fe
GPT type GUID : 3 a2a0d0ebe5b9334487c068b6b72699c7
GPT partition flags: 3 0x1000000000000001
GPT start and size : 3 4092 256328
------------------------------------------------------------------------
One should consider to use grub-mkrescue for pure GRUB2
boot equipment. It is well coordinated with GRUB2 but rarely
seen as producer of distro ISOs.
Regrettably there is a small unintended CLI compatibility problem
between the old bash script and the new C program:
- The script needs argument "--" only to throw xorriso out of
its mkisofs emulation. (There is few reason to do this.)
- The C program needs argument "--" to end its own option list
and to start the list of additional xorriso -as mkisofs options.
(A second "--" would end mkisofs emulation of xorriso.)
The list of additional options would contain all xorriso options
which do not directly deal with boot aspects or the output ISO
path.
I.e. the many Jigdo options, -r -V -J -joliet-long -cache-inodes CD1.
But not -o ... -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot
Depending on its content, "boot1" may be needed or not. All boot
files up to the start of the Linux kernel are produced by
grub-mkrescue.
Vladimir stated that the CLI change was unintentional.
But he did not yet decide whether to fix it by a proposal of
Andrei Borzenkov, or by a proposal of mine, or by some other
idea. See:
http://lists.gnu.org/archive/html/grub-devel/2014-11/msg00076.html
http://lists.gnu.org/archive/html/grub-devel/2014-11/msg00082.html
http://lists.gnu.org/archive/html/grub-devel/2014-11/msg00083.html
which are late follow-ups of
http://lists.gnu.org/archive/html/grub-devel/2014-09/msg00067.html
(Maybe if users show up and encourage a swift decision ...)
Well, the user just has to know which grub-mkrescue variant is
at hand and thus insert the "--" argument or not.
Either grub-mkrescue or xorriso will protest loudly if the
wrong variant was assumed.
Have a nice day :)
Thomas
Reply to: