Apple partition map bug
Attached is the first 4 sectors of the Ubuntu PowerPC Hoary CD. It has 2 partition map entries, including the partition map itself. GRUB2 lists 8 partitions. Anybody want to take a look? It could be written to a floppy or zip or CD I guess... If nobody gets to it I will try to debug later.
-Hollis
Quoted 5 lines · Hollis Blanchard
Attached is the first 4 sectors of the Ubuntu PowerPC Hoary CD. It has 2 partition map entries, including the partition map itself. GRUB2 lists 8 partitions. Anybody want to take a look? It could be written to a floppy or zip or CD I guess... If nobody gets to it I will try to debug later.
Brain dump from airport:
It'll be a hybrid disk created with something like:
https://wiki.ubuntu.com/LiveCDCustomizationHowTo
mkisofs -r -V "Custom Ubuntu Live CD" \
--netatalk -hfs -probe -map hfs.map \
-part -no-desktop \
-hfs-bless extracted_cd/install \
-hfs-volid Ubuntu/PowerPC_hoary \
-o custom-hoary-live-powerpc.iso extracted_cdfile -k ubuntu-powerepc_hoaryubuntu_powerpc_hoary: x86 boot sector\012- Apple Partition data block
size: 512, first type: Apple_partition_map, name: Apple, number of
blocks: 2, second type: Apple_HFS, name: Ubuntu 5.04 ppc, number of
blocks: 1276984,
IIRC this is the partition table:
00001b0 1900 080f 1960 080f 19c0 080f 1a20 ff0f
00001c0 ffff ff0f ffff 080f bfc0 0831 4e88 ff0d
00001d0 ffff ff0d ffff 080d 5f18 080d 6008 ff0d
00001e0 ffff ff0d ffff 080d 6180 080d 61f8 ff0d
00001f0 ffff ff0d ffff 080d 6360 080d 9098 aa55
I'm guessing we get tripped up by the msdos partition table at the start. Note you can build CD's with -chrp-boot and -prep-boot like:
mkisofs -o boot.iso -chrp-boot -U \
-prep-boot ppc/chrp/yaboot \
-part -hfs -T -r -l -J \
-A "Fedora 4" -sysid PPC -V "PBOOT" -volset 4 -volset-size 1 \
-volset-seqno 1 -hfs-volid 4 -hfs-bless $(pwd)/ppc/ppc \
-map mapping -magic magic -no-desktop -allow-multidot \
$(pwd)/ppc
file -k boot.iso
boot.iso: x86 boot sector\012- ISO 9660 CD-ROM filesystem data 'PBOOT '\012- Apple Partition data block size: 512, first type:Apple_partition_map, name: Apple, number of blocks: 2, second type:Apple_HFS, name: PBOOT, number of blocks: 65268,
00001c0 ffff ff96 ffff 0000 0000 ff04 0000 ff80
00001d0 ffff ff41 ffff 5060 0000 0153 0000 ff00
00001e0 ffff ff00 ffff 0000 0000 0000 0000 ff00
00001f0 ffff ff00 ffff 0000 0000 0000 0000 aa55
Here we have a 0x41 partition (PReP boot)
Which would have 4 msdos partitions and the apple partition map.
I'll try look at the grub2 code later, it is quite possibly "correct" due to hybrid but we probably should display the mac partitioning tabley if OF has mac-parts support else failback to plain iso9660.
Paul
Quoted 2 lines · Paul Nasrat
file -k ubuntu-powerepc_hoary
ubuntu_powerpc_hoary: x86 boot sector\012- Apple Partition data block
Ah, right! It also has a DOS map... this explains why the debug prints I had in partmap/apple.c were not displaying. It seems the problem may be not examining grub_pc_partition_entry.flag when iterating over DOS maps,
Thanks, I was starting to get annoyed. :)
-Hollis
Quoted 3 lines · Paul Nasrat
I'll try look at the grub2 code later, it is quite possibly "correct" due to hybrid but we probably should display the mac partitioning tabley if OF has mac-parts support else failback to plain iso9660.
You can always use the raw disk, in which case it will be detected as iso9660. So in this case:
foo (cd)/
instead of:
foo (cd,0)/
--
Marco
Quoted 7 lines · Marco Gerards
You can always use the raw disk, in which case it will be detected as iso9660. So in this case:
foo (cd)/
instead of:
foo (cd,0)/
I assume you're implying tab-completion here. I just want a command to list all partitions on the CD. It seems there is no such command? Tab-completion feels awkward for this...
-Hollis
Quoted 5 lines · Hollis Blanchard
Quoted 4 lines · Marco Gerards
You can always use the raw disk, in which case it will be detected as iso9660. So in this case:
Quoted 7 lines
Quoted 3 lines
foo (cd)/
instead of:
foo (cd,0)/I assume you're implying tab-completion here. I just want a command to list all partitions on the CD. It seems there is no such command? Tab-completion feels awkward for this...
No, what I mean is that the CDROM can be accessed directly without using partitions.
For listing disks and partitions you can use the ls command, IIRC.
--
Marco
Quoted 11 lines · Marco Gerards
Quoted 9 lines · Hollis Blanchard
Quoted 7 lines · Marco Gerards
You can always use the raw disk, in which case it will be detected as iso9660. So in this case:
foo (cd)/
instead of:
foo (cd,0)/
Quoted 8 lines
Quoted 3 lines
I assume you're implying tab-completion here. I just want a command to list all partitions on the CD. It seems there is no such command? Tab-completion feels awkward for this...
No, what I mean is that the CDROM can be accessed directly without using partitions.
For listing disks and partitions you can use the ls command, IIRC.
ls lists *all* the devices present. This output overflows the screen and there is no scrollback. Hence, this is not useful to me.
-Hollis
Quoted 4 lines · Hollis Blanchard
Quoted 1 line
For listing disks and partitions you can use the ls command, IIRC.
ls lists *all* the devices present. This output overflows the screen and there is no scrollback. Hence, this is not useful to me.
It seems I did not answer this email, or I never received my own reply via the list. Anyway...
There is a variable (IIRC it is called pager), which you can set so GRUB does wait instead of scrolling.
Thanks,
Marco
Quoted 5 lines · Hollis Blanchard
Attached is the first 4 sectors of the Ubuntu PowerPC Hoary CD. It has 2 partition map entries, including the partition map itself. GRUB2 lists 8 partitions. Anybody want to take a look? It could be written to a floppy or zip or CD I guess... If nobody gets to it I will try to debug later.
Sure!
--
Marco