I did some research with Apple's Open Firmware implementation and found out something that might make fixing the auto partition selection system work. What Apple's Open Firmware does when a command like "dir hd:," is entered is it selects the partition that has the lowest partition number, and displays its files.
What I did was partitioned a hard drive into three different partitions, then ran the "dir hd:," command. I have verified that the lowest numbered partition is selected by default. The other two partitions can be selected by doing this "dir hd:10," and "dir hd:11,". Is there any more information that is needed to fix the auto selection system?
On 12/10/12 18:25, Programmingkid wrote:
I did some research with Apple's Open Firmware implementation and found out something that might make fixing the auto partition selection system work. What Apple's Open Firmware does when a command like "dir hd:," is entered is it selects the partition that has the lowest partition number, and displays its files.
What I did was partitioned a hard drive into three different partitions, then ran the "dir hd:," command. I have verified that the lowest numbered partition is selected by default. The other two partitions can be selected by doing this "dir hd:10," and "dir hd:11,". Is there any more information that is needed to fix the auto selection system?
Do any of them have a system partition on? The reason I ask is that because on some of the debug traces you've sent me, a filesystem has been identified on the Apple_Driver43_CD partition. Therefore there must be some other logic involved with Apple's Open Firmware in order for it to locate the partition containing the installer.
I could perhaps see this behaviour as a fallback if there is no system partition on the disk which could explain this.
ATB,
Mark.
Do any of them have a system partition on? The reason I ask is that because on some of the debug traces you've sent me, a filesystem has been identified on the Apple_Driver43_CD partition. Therefore there must be some other logic involved with Apple's Open Firmware in order for it to locate the partition containing the installer.
On a Mac-partitioned disk, there is no such thing as a "system partition" (that is a DOS thing).
Apple OF looks at the partition types (which are strings), and uses the first one that is "Apple_Boot", "Apple_HFS", or "DOS_FAT_", if you do not give a partition number (or partition # 0).
FWIW, it normally boots "hd:,\:tbxi" which means the disk with alias "hd", potentially some partition on that, in the blessed folder ("\"), the file with any creator and file type "tbxi" (which is a bootinfo file) (":tbxi").
I don't think you want to recreate all the logic (and lack of it!) behind how Macs boot.
Segher
On 13/10/12 06:37, Segher Boessenkool wrote:
On a Mac-partitioned disk, there is no such thing as a "system partition" (that is a DOS thing).
Apple OF looks at the partition types (which are strings), and uses the first one that is "Apple_Boot", "Apple_HFS", or "DOS_FAT_", if you do not give a partition number (or partition # 0).
Oh that's interesting. Perhaps the reason I'm getting distracted is by looking at the partition flags #defines in the code:
enum { kPartitionAUXIsValid = 0x00000001, kPartitionAUXIsAllocated = 0x00000002, kPartitionAUXIsInUse = 0x00000004, kPartitionAUXIsBootValid = 0x00000008, kPartitionAUXIsReadable = 0x00000010, kPartitionAUXIsWriteable = 0x00000020, kPartitionAUXIsBootCodePositionIndependent = 0x00000040, kPartitionISMountedAtStartup = 0x40000000, kPartitionIsStartup = 0x80000000, kPartitionIsChainCompatible = 0x00000100, kPartitionIsRealDeviceDriver = 0x00000200, kPartitionCanChainToNext = 0x00000400, };
This would in itself suggest that kPartitionAUXIsBootValid or kPartitionIsStartup would be good indicators of which partition to choose. Unfortunately I don't have any PPC OS X images or much Apple experience, so guesswork is all I have at the moment.
Do you have a source for your algorithm above?
FWIW, it normally boots "hd:,\:tbxi" which means the disk with alias "hd", potentially some partition on that, in the blessed folder ("\"), the file with any creator and file type "tbxi" (which is a bootinfo file) (":tbxi").
Yes, I believe this is currently what happens when attempting a boot.
I don't think you want to recreate all the logic (and lack of it!) behind how Macs boot.
;) Agreed.
ATB,
Mark.
On Oct 15, 2012, at 8:00 AM, Mark Cave-Ayland wrote:
kPartitionCanChainToNext = 0x00000400, };
This would in itself suggest that kPartitionAUXIsBootValid or kPartitionIsStartup would be good indicators of which partition to choose. Unfortunately I don't have any PPC OS X images or much Apple experience, so guesswork is all I have at the moment.
I figured out a way for you to work with a bootable PowerPC CD image for free. You can download a PowerPC Linux install image. That would have the same partitions an Apple CD would have.
CD image: http://cdimage.debian.org/debian-cd/6.0.6/powerpc/iso-cd/ The first image should be good enough.
Use this command to see the partition information: pdisk <path to image file> -dump.
Good luck
On 15/10/12 14:37, Programmingkid wrote:
This would in itself suggest that kPartitionAUXIsBootValid or kPartitionIsStartup would be good indicators of which partition to choose. Unfortunately I don't have any PPC OS X images or much Apple experience, so guesswork is all I have at the moment.
I figured out a way for you to work with a bootable PowerPC CD image for free. You can download a PowerPC Linux install image. That would have the same partitions an Apple CD would have.
CD image: http://cdimage.debian.org/debian-cd/6.0.6/powerpc/iso-cd/ The first image should be good enough.
Use this command to see the partition information: pdisk <path to image file> -dump.
Good luck
Does that mean you're unable to provide a patch against your MacOS CD? I have a feeling that most install CDs were ISO9660 rather than HFS which is why I was unable to test this before, but I can try and look again if you're stuck.
ATB,
Mark.
Apple OF looks at the partition types (which are strings), and uses the first one that is "Apple_Boot", "Apple_HFS", or "DOS_FAT_", if you do not give a partition number (or partition # 0).
Do you have a source for your algorithm above?
You can use "see" (in the "mac-files" package) :-)
Segher
On 15/10/12 14:50, Segher Boessenkool wrote:
Apple OF looks at the partition types (which are strings), and uses the first one that is "Apple_Boot", "Apple_HFS", or "DOS_FAT_", if you do not give a partition number (or partition # 0).
Do you have a source for your algorithm above?
You can use "see" (in the "mac-files" package) :-)
Unfortunately not all of us own a Mac :-)
ATB,
Mark.