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

Re: arm64 and isohybrid



On Thu, Jan 29, 2015 at 11:41:57AM +0100, Thomas Schmitt wrote:
>Hi,

Hi Thomas!

>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.

Easy; you just sent it to me directly, not to the list(s)... :-)

>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.

That's as we'd expect, yes. We support arm64 booting off CD/USB via
UEFI; there's nothing like the BIOS boot.

>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.

OK.

>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
>------------------------------------------------------------------------

Right.

>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.)

Woo. :-)

>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.

I understand why - it then makes the scripting very different for some
architectures compared to others, instead of just changing the
particular options needed for boot. That's much harder to track and
keep consistent for us.

For now, I'll add -efi-boot-part and continue testing. Thanks!

I'm also *way* overdue on switching all of debian-cd over to using
xorriso and using native xorriso options totally rather than the
-as-mkisofs stuff equivalents. But that's a topic for another day...

-- 
Steve McIntyre, Cambridge, UK.                                steve@einval.com
"The problem with defending the purity of the English language is that
 English is about as pure as a cribhouse whore. We don't just borrow words; on
 occasion, English has pursued other languages down alleyways to beat them
 unconscious and rifle their pockets for new vocabulary."  -- James D. Nicoll


Reply to: