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

Re: arm64 and isohybrid

On Sat, Jan 31, 2015 at 10:24:17AM +0000, Steve McIntyre wrote:
>On Thu, Jan 29, 2015 at 11:41:57AM +0100, Thomas Schmitt wrote:
>>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.

This may look valid, but gdisk and other code I've used don't cope
well with the PMBR being broken. I can mount partition 1 fine for the
normal ISO contents, but partition 2 seems broken and I can't mount
it. Maybe an offset bug(?), or things are being too confused by the
GPT-MBR disconnect here.

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

Bugger. After more testing, this is not working well for me. It's
generating 3 partitions:

Number  Start (sector)    End (sector)  Size       Code  Name
   1              64            3867   1.9 MiB     0700  Gap0
   2            3868            4635   384.0 KiB   EF00  EFI boot partition
   3            4636          365891   176.4 MiB   0700  Gap1

where neither Gap0 nor Gap1 are usable for mounting. I guess I see
what you've done, just slicing up the image to make the EFI boot
partition work. However, this isn't helpful for the Debian installer
which now can't find the rest of the installer on any partition. It's
used to looking for things in a "normal" isohybrid manner where it can
mount the main ISO contents as a partition too. I tried to force the
efi.img file to tne end of the media to make Gap0 functional, but that
doesn't seem to help at all.

Steve McIntyre, Cambridge, UK.                                steve@einval.com
Into the distance, a ribbon of black
Stretched to the point of no turning back

Reply to: