Re: Switching debian-installer CD images to GRUB
Hi,
John Paul Adrian Glaubitz wrote:
> On the other hand, having HFS support in libisofs is still desirable
> for OldWorld Macs and m68k Macs,
(We should better not tell the Fridays-For-Future kids. The MIPS/Watt
ratio must be subterran.)
> Looking at grub-mkrescue [1], I assume the options we need are:
>
> if (system_area == SYS_AREA_COMMON)
> {
> xorriso_push ("-hfsplus-file-creator-type");
> xorriso_push ("chrp");
> xorriso_push ("tbxi");
> xorriso_push ("/System/Library/CoreServices/BootX");
> xorriso_push ("-hfs-bless-by");
> xorriso_push ("p");
> xorriso_push ("/System/Library/CoreServices");
> }
> xorriso_push ("-sysid");
> xorriso_push ("PPC");
>
> Thomas, can you comment on the options for xorrisofs?
You need to enable HFS+ production (or maybe future HFS production)
xorriso_push ("-hfsplus");
xorriso_push ("-apm-block-size");
xorriso_push ("2048");
The block size might be adjustable to 512, if a reason arises.
File data start address granularity will be 2048, because of ISO 9660.
Type "tbxi" has not been used by grub-mkrescue yet. Googling ...
It seems to be appropriate for BootX.
Did we have a link to this text already ?
https://opensource.apple.com/source/bless/bless-11/README.BOOTING
It has a section "== Old World booting from HFS+ ==".
Blessing "p" was not tested yet. You should use some Mac tool to
verify that it gets correcty applied by libisofs.
Is option
-sysid PPC
really needed ?
ECMA-119 (aka ISO 9660) says:
"This field shall specify an identification of a system which can
recognize and act upon the content of the Logical Sectors with
logical Sector Numbers 0 to 15 of the volume."
That would be the firmware, i guess.
Whatver, it should not do harm.
> The question is whether we can create an image that boots both on IBM CHRP
> machines and PowerMacs.
There is an option -chrp-boot-part of which man xorrisofs says:
Mark the block range of the whole emerging ISO image as MBR
partition of type 0x96. This is not compatible with any other
feature that produces MBR partition entries. It makes GPT
unrecognizable.
CHRP is often used in conjunction with HFS. It is not yet tested
whether HFS+ filesystems produced with option -hfsplus would
boot on any CHRP capable machine which does not boot pure ISO
9660 as well.
-----------------------------------------------------------------------
Let's try with not more dummy ingredients than necessary:
The old powerpc 6.0.5 and 8.0.0 netinst ISOs do not contain a BootX
file or a /System/Library/CoreServices directory. 9.4.0-ppc64el does not
either.
So i have to make it somewhat artificial on a x86 grub-mkrescue ISO,
which has HFS+ for x86 Macs. I simulate the missing file BootX by a copy
of the ISO's EFI image:
mount /dvdbuffer/grub-mkrescue-original.iso /mnt/iso
xorriso -as mkisofs \
-o test.iso \
-hfsplus \
-apm-block-size 2048 \
-hfsplus-file-creator-type chrp tbxi \
/System/Library/CoreServices/BootX \
-hfs-bless-by p /System/Library/CoreServices \
-sysid PPC \
-chrp-boot-part \
-graft-points \
/mnt/iso \
/System/Library/CoreServices/BootX=/mnt/iso/efi.img
An ISO emerges.
As far as xorriso can tell, it looks ok:
$ xorriso -hfsplus on \
-indev test.iso \
-report_system_area plain \
-pvd_info \
-find / -has_hfs_bless any -exec get_hfs_bless -- \
-find / -has_hfs_crtp - - -exec get_hfs_crtp --
...
System area summary: MBR CHRP cyl-align-off APM
ISO image size/512 : 30796
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 0x96 0 30796
APM : N Info
APM block size : 2048
APM gap fillers : 2
APM partition name : 1 Gap0
APM partition type : 1 ISO9660_data
APM start and size : 1 16 67
APM partition name : 2 HFSPLUS_Hybrid
APM partition type : 2 Apple_HFS
APM start and size : 2 83 7466
APM partition name : 3 Gap1
APM partition type : 3 ISO9660_data
APM start and size : 3 7549 150
...
System Id : PPC
...
ppc_bootdir '/System/Library/CoreServices'
chrp tbxi '/System/Library/CoreServices/BootX'
The report about blessing and creator/type stems from ISO extended
attributes which preserve the info independently of the HFS+ filesystem.
So it has to be checked by other tools whether these HFS+ attributes
are recognizable.
-----------------------------------------------------------------------
Have a nice day :)
Thomas
Reply to: