Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

joevt

Contributor
Jun 21, 2012
6,700
4,089
Of the Open Firmware dumps that I've created while working on https://forums.macrumors.com/thread...l-work-in-a-beige-power-macintosh-g3.2303689/ and https://68kmla.org/bb/index.php?thr...-hack-thread-part-2.38360/page-12#post-467825 , only the G5 Quad and PowerBook G4 DLSD seem to have gpt support. These are dated September 2005 or later.

Code:
cd "/Volumes/Work/Open Firmware and Name Registry/ROM PowerPC Mac"
grep -R "EFI PART" --include Part2.of .
./ROM G5 Quad/Dump/Part2.of:        " EFI PART"                                                                \                    [012]
./ROM PowerBook G4 DLSD/Dump/Part2.of:        " EFI PART"                                                                \                    [012]


Code that checks the gpt header:
Code:
: gpt-header-valid?                                                                \ (1e85)            [0b6 0b7]
    block0                                                                        \                    [1e69]
    1                                                                            \                    [0a6]
    1                                                                            \                    [0a6]
    "read-blocks"                                                                \                    [1355]
    $call-parent                                                                \                    [209]
    0=                                                                            \                    [034]
    if                                                                            \ (0x2c)            [014]
        ." DISK-LABEL: read of block1 failed"                                    \                    [012 090]
        cr                                                                        \                    [092]
        false                                                                    \                    [1208]
    else                                                                        \ (0x3c)            [013 0b2]
        block0                                                                    \                    [1e69]
        " EFI PART"                                                                \                    [012]
        comp                                                                    \                    [07a]
        0=                                                                        \                    [034]
        block0                                                                    \                    [1e69]
        >gpt.hdr_size                                                            \                    [1e7c]
        4c@-le                                                                    \                    [1086]
        gpt-header-resv-sz                                                        \                    [1e81]
        >=                                                                        \                    [042]
        and                                                                        \                    [023]
        block0                                                                    \                    [1e69]
        dup                                                                        \                    [047]
        >gpt.hdr_size                                                            \                    [1e7c]
        4c@-le                                                                    \                    [1086]
        crc32                                                                    \                    [1e84]
        and                                                                        \                    [023]
        block0                                                                    \                    [1e69]
        >gpt.hdr_entsz                                                            \                    [1e7e]
        4c@-le                                                                    \                    [1086]
        gpt-entry-resv-sz                                                        \                    [1e82]
        >=                                                                        \                    [042]
        and                                                                        \                    [023]
    then                                                                        \                    [0b2]
    dup                                                                            \                    [047]
    false                                                                        \                    [1208]
    =                                                                            \                    [03c]
    if                                                                            \ (0x38)            [014]
        block0                                                                    \                    [1e69]
        0                                                                        \                    [0a5]
        1                                                                        \                    [0a6]
        "read-blocks"                                                            \                    [1355]
        $call-parent                                                            \                    [209]
        0=                                                                        \                    [034]
        if                                                                        \ (0x2a)            [014]
            ." DISK-LABEL: re-read of block0 failed"                            \                    [012 090]
            cr                                                                    \                    [092]
        then                                                                    \                    [0b2]
    then                                                                        \                    [0b2]
    ;                                                                            \                    [0c2]

List of ROMs:
See attachment of #60 for latest.
 
Last edited:

pc297

macrumors 6502
Sep 26, 2015
333
206
Of the Open Firmware dumps that I've created while working on https://forums.macrumors.com/thread...l-work-in-a-beige-power-macintosh-g3.2303689/ and https://68kmla.org/bb/index.php?thr...-hack-thread-part-2.38360/page-12#post-467825 , only the G5 Quad and PowerBook G4 DLSD seem to have gpt support. These are dated September 2005 or later.

Code:
cd "/Volumes/Work/Open Firmware and Name Registry/ROM PowerPC Mac"
grep -R "EFI PART" --include Part2.of .
./ROM G5 Quad/Dump/Part2.of:        " EFI PART"                                                                \                    [012]
./ROM PowerBook G4 DLSD/Dump/Part2.of:        " EFI PART"                                                                \                    [012]


Code that checks the gpt header:
Code:
: gpt-header-valid?                                                                \ (1e85)            [0b6 0b7]
    block0                                                                        \                    [1e69]
    1                                                                            \                    [0a6]
    1                                                                            \                    [0a6]
    "read-blocks"                                                                \                    [1355]
    $call-parent                                                                \                    [209]
    0=                                                                            \                    [034]
    if                                                                            \ (0x2c)            [014]
        ." DISK-LABEL: read of block1 failed"                                    \                    [012 090]
        cr                                                                        \                    [092]
        false                                                                    \                    [1208]
    else                                                                        \ (0x3c)            [013 0b2]
        block0                                                                    \                    [1e69]
        " EFI PART"                                                                \                    [012]
        comp                                                                    \                    [07a]
        0=                                                                        \                    [034]
        block0                                                                    \                    [1e69]
        >gpt.hdr_size                                                            \                    [1e7c]
        4c@-le                                                                    \                    [1086]
        gpt-header-resv-sz                                                        \                    [1e81]
        >=                                                                        \                    [042]
        and                                                                        \                    [023]
        block0                                                                    \                    [1e69]
        dup                                                                        \                    [047]
        >gpt.hdr_size                                                            \                    [1e7c]
        4c@-le                                                                    \                    [1086]
        crc32                                                                    \                    [1e84]
        and                                                                        \                    [023]
        block0                                                                    \                    [1e69]
        >gpt.hdr_entsz                                                            \                    [1e7e]
        4c@-le                                                                    \                    [1086]
        gpt-entry-resv-sz                                                        \                    [1e82]
        >=                                                                        \                    [042]
        and                                                                        \                    [023]
    then                                                                        \                    [0b2]
    dup                                                                            \                    [047]
    false                                                                        \                    [1208]
    =                                                                            \                    [03c]
    if                                                                            \ (0x38)            [014]
        block0                                                                    \                    [1e69]
        0                                                                        \                    [0a5]
        1                                                                        \                    [0a6]
        "read-blocks"                                                            \                    [1355]
        $call-parent                                                            \                    [209]
        0=                                                                        \                    [034]
        if                                                                        \ (0x2a)            [014]
            ." DISK-LABEL: re-read of block0 failed"                            \                    [012 090]
            cr                                                                    \                    [092]
        then                                                                    \                    [0b2]
    then                                                                        \                    [0b2]
    ;                                                                            \                    [0c2]

List of ROMs:
Code:
TNT Development A5c1                        Open Firmware, 0.992j                       # 256MB BAR support
7500,9500,8600,9600,Power Tower Pro, etc.   Open Firmware, 1.0.5                        # 256MB BAR support requires Mac OS 9 or Mac OS X nvramrc patches (see PowerSurge.of of joevt/XPostFacto for documentation of patches)
Power Mac 5400,6400                         Open Firmware, 2.0                          # 256MB BAR support
Beige G3 Desktop                            Open Firmware, 2.0f1    ATY,FCode 1.49      # 256MB BAR support
Beige G3 Minitower                          Open Firmware, 2.0f1    ATY,FCode 1.53      # 256MB BAR support
PowerBook G3 Wallstreet                     Open Firmware, 2.0.1    ATY,FCode 1.54      # 256MB BAR support
PowerBook G3 Wallstreet PDQ                 Open Firmware, 2.0.1    ATY,FCode 1.59      # 256MB BAR support
Power Mac 6500,TAM                          Open Firmware, 2.0.3                        # 256MB BAR support
Beige G3 (v3)                               Open Firmware, 2.4      ATY,FCode 1.53      # 256MB BAR support
Power Express                               Open Firmware 2.0a9                         # 256MB BAR support
Power Express                               Open Firmware 2.3                           # 256MB BAR support
Power Mac G3 (Blue & White)                 OpenFirmware 3.1.1                          Apple PowerMac1,1  1.1f4   BootROM built on 04/09/99 at 13:57:32 # 256MB BAR support
Power Mac G4 (PCI Graphics) Yikes           OpenFirmware 3                              Apple PowerMac1,2                                                # 256MB BAR support
iMac                                        OpenFirmware 3          ATY,FCode 1.77      Apple PowerMac2,1  4.1.9f1 BootROM built on 09/14/01 at 13:18:04 # 256MB BAR support
Power Mac G4 (AGP Graphics) Sawtooth        OpenFirmware 3          ATY,FCode 1.77      Apple PowerMac3,1  4.2.8f1 BootROM built on 10/11/01 at 14:12:47 # 256MB BAR support
Power Mac G4 (Gigabit Ethernet)             OpenFirmware 3                              Apple PowerMac3,3  4.2.8f1 BootROM built on 10/11/01 at 14:12:47 # 256MB BAR support
Power Mac G4 (Digital Audio)                OpenFirmware 3                              Apple PowerMac3,4  4.2.8f1 BootROM built on 10/11/01 at 14:12:47 # 256MB BAR support
Power Mac G4 (Quicksilver)                  OpenFirmware 3                              Apple PowerMac3,5  4.2.3f1 BootROM built on 08/01/01 at 11:14:42 # 256MB BAR support
                                            OpenFirmware 3                              Apple PowerMac3,5  4.2.5f1 BootROM built on 08/16/01 at 22:19:35 # 256MB BAR support
Power Mac G4 (Mirrored Drive Doors)         OpenFirmware 3          ATY,FCode 1.86      Apple PowerMac3,6  4.4.8f2 BootROM built on 09/30/02 at 10:24:31 # 256MB BAR support
Power Mac G4 (FW 800)                       OpenFirmware 3                              Apple PowerMac3,6  4.6.0f1 BootROM built on 02/20/03 at 13:52:27 # 256MB BAR support
Power Mac G5 1.6 (PCI)                      OpenFirmware 4                              Apple PowerMac7,2  5.1.5f2 BootROM built on 09/21/04 at 11:58:53 # 256MB BAR support
Power Mac G5 1.8 (PCI-X)                    OpenFirmware 4                              Apple PowerMac7,2
Power Mac G5 2.0 DP (PCI-X)                 OpenFirmware 4                              Apple PowerMac7,2
Power Mac G5 1.8 DP (PCI-X)                 OpenFirmware 4                              Apple PowerMac7,2
iBook G4                                    OpenFirmware 3          ATY,FCode 1.94      Apple PowerBook6,5 4.8.7f1 BootROM built on 09/23/04 at 16:13:38 # 512MB BAR support
Power Mac G5 ? (one of the following 3)     OpenFirmware 4                              Apple PowerMac7,3  5.1.8f7 BootROM built on 10/26/04 at 16:30:32
Power Mac G5 1.8 DP (PCI)                   OpenFirmware 4                              Apple PowerMac7,3
Power Mac G5 2.0 DP (PCI-X 2)               OpenFirmware 4                              Apple PowerMac7,3
Power Mac G5 2.5 DP (PCI-X)                 OpenFirmware 4                              Apple PowerMac7,3
Mac mini G4                                 OpenFirmware 3          ATY,FCode 1.95      Apple PowerMac10,1 4.8.9f4 BootROM built on 03/23/05 at 14:22:23 # 512MB BAR support
PowerBook G4 DLSD                           OpenFirmware 3          ATY,FCode 1.95      Apple PowerBook5,8 4.9.5f3 BootROM built on 09/22/05 at 16:17:32 # 512MB BAR support ; allocates BARs by descending size when 512MB BAR exists
Power Mac G5 Quad                           OpenFirmware 4                              Apple PowerMac11,2 5.2.7f1 BootROM built on 09/30/05 at 15:31:03 # 512MB BAR support ; allocates BARs by descending size when 512MB BAR exists
PowerBook ?                                 OpenFirmware 3                              Apple PowerBook5,9 4.9.6f0 BootROM built on 10/05/05 at 16:45:50
               
BARs are allocated by ascending size except where noted.
Great work, maybe one could search for gpt as well:

Code:
grep -R "gpt" --include Part2.of .
as when booting SL from USB on OpenFirmware I had a few error messages before finding the right command
Code:
boot ud:2,\\:tbxi
I tried a few other ones that resulted in a "gpt partition error" type of error. So there must be something in the mac mini G4 firmware (silent upgrade at least) containing the word "gpt", I will post a screenshot tonight.

Note: maybe booting from GUID as I did is specific to the mini G4 silent upgrade; I will post my boot rom version to see how it compares with the regular one. Note that version number doesn't seem to be indicative of GUID-booting capability, as e.g. the DSLD has a firmware revision < G5 DP yet the latter is incapable of booting GUID drives as opposed to the DSLD.

Cheers,
 
Last edited:

joevt

Contributor
Jun 21, 2012
6,700
4,089
Great work, maybe one could search for gpt as well:

Code:
grep -R "gpt" --include Part2.of .
Same result:
Code:
grep -l -i -R -e "gpt[^a-z]" --include Part2.of .
./ROM G5 Quad/Dump/Part2.of
./ROM PowerBook G4 DLSD/Dump/Part2.of

as when booting SL from USB on OpenFirmware I had a few error messages before finding the right command
Code:
boot ud:2,\\:tbxi
I tried a few other ones that resulted in a "gpt partition error" type of error. So there must be something in the mac mini G4 firmware (silent upgrade at least) containing the word "gpt", I will post a screenshot tonight.
These are the only GPT related errors I could find in the Open Firmware listings:
"GPT block size is impossible."
"MAC-PARTS: specified GPT partition can't be found."
"MAC-PARTS: can't find a default GPT partition"
"MAC-PARTS: specified GPT partition is too large."
"MAC-PARTS: specified GPT partition is not valid"

Note: maybe booting from GUID as I did is specific to the mini G4 silent upgrade; I will post my boot rom version to see how it compares with the regular one. Note that version number doesn't seem to be indicative of GUID-booting capability, as e.g. the DSLD has a firmware revision < G5 DP yet the latter is incapable of booting GUID drives as opposed to the DSLD.
Open Firmware 3 and Open Firmware 4 were developed simultaneously as you can see in my list of Open Firmware versions. I think the important thing is the date. Open Firmware 4 is for G5s (64 bit CPUs?) while Open Firmware 3 is for G4 and G3.
 

pc297

macrumors 6502
Sep 26, 2015
333
206
"MAC-PARTS: specified GPT partition can't be found."
That's precisely the message I got on OF on the mini G4 silent upgrade, before succeeding booting from a GUID drive. So I guess the word "GPT" might be the one to look for?

Code:
grep -l -i -R -e "*GPT*" --include Part2.of .

PS nice usage of grep, I didn't know you could recursively use multipe files, I always used
Code:
find -type f <path> -exec sh -c "echo {}; grep <pattern> {}" \;
I will use your code
Code:
grep -l -i -R -e <pattern> <path>
from now on, thanks!
 

LightBulbFun

macrumors 68030
Original poster
Nov 17, 2013
2,810
3,125
London UK
could it be that the mini G4 (silent upgrade) supports 2Gb PC-3200 sticks? It would have to be out-of-the box support though like for the iMac G5 iSight, since without a stick directly recognised by OF (and there's only one DIMM slot) it won't even make it to OF to manually insert the bank-sizes into.

its funny you mention that I have been searching for some 2GB DDR1 UDIMMs for a good many years now to try exactly that out! (and some experiments involving my G5's etc, since PM7,3's use the same U3 Heavy memory controller as found in the Xserve G5)

but I have never been able to find any, not for a good price anyhow! if anyone has any leads on any do let me know!

KTA-G5400E/4G is such a kit of 2, 2GB ECC UDIMMs for example (the ECC part should not pose a problem, since they are still UDIMMs)
 

pc297

macrumors 6502
Sep 26, 2015
333
206
So the DLSD also definitely boots from GUID :)
 

Attachments

  • IMG_20230111_214114.jpg
    IMG_20230111_214114.jpg
    290.7 KB · Views: 70

pc297

macrumors 6502
Sep 26, 2015
333
206
Same result:
Code:
grep -l -i -R -e "gpt[^a-z]" --include Part2.of .
./ROM G5 Quad/Dump/Part2.of
./ROM PowerBook G4 DLSD/Dump/Part2.of


These are the only GPT related errors I could find in the Open Firmware listings:
"GPT block size is impossible."
"MAC-PARTS: specified GPT partition can't be found."
"MAC-PARTS: can't find a default GPT partition"
"MAC-PARTS: specified GPT partition is too large."
"MAC-PARTS: specified GPT partition is not valid"


Open Firmware 3 and Open Firmware 4 were developed simultaneously as you can see in my list of Open Firmware versions. I think the important thing is the date. Open Firmware 4 is for G5s (64 bit CPUs?) while Open Firmware 3 is for G4 and G3.
I think I might have an idea about what's going on and why the mini G4 silent upgrade is able to boot from GUID. I noticed that booting from the first - EFI - partition works on the Quad and DLSD (and also from the second partition which is HFS+), but on the mini silent upgrade it doesn't - even though it offers the drive in the boot picker (via firewire) - which it boots from if selected. It does boot fine when going to OF and booting from the second partition.

Could it be that booting from GUID is done from the EFI partition (primarily) on the Quad and DLSD, but directly from the second HFS+ partition on the mini G4 silent upgrade?

What makes me say that is that I've tried with the iMac G5 (non-iSight) and PB G4 12" (867 MHz version) and unlike the G5 DP, they ARE able to see the GUID drive in OF but trying to boot from the second partition results in the prohibited sign, and trying from the first partition results in a "warning: boot sector mismatch" which then fails and stays in OF. So basically, they almost boot, at least compared to the G5 DP, but in the end they don't.

So maybe rudimentary GUID support was first implemented in OF on models such as the iMac G5 (non-iSight) and PB 12" 1st gen to just see GUID drives, then actual support for booting from the second partition on a GUID drive was implemented on some models e.g. the mini G4 (silent upgrade) and iMac G5 iSight (which has been reported to boot from GUID if I'm not wrong), and finally support for booting from GUID via EFI on the Quad and DLSD?
 

joevt

Contributor
Jun 21, 2012
6,700
4,089
That's precisely the message I got on OF on the mini G4 silent upgrade, before succeeding booting from a GUID drive.
What's the version / date of the Open Firmware in the Mac mini G4? Is it in my list of ROMs? If not, then maybe you can get a ROM dump.

I think I might have an idea about what's going on and why the mini G4 silent upgrade is able to boot from GUID. I noticed that booting from the first - EFI - partition works on the Quad and DLSD (and also from the second partition which is HFS+), but on the mini silent upgrade it doesn't - even though it offers the drive in the boot picker (via firewire) - which it boots from if selected. It does boot fine when going to OF and booting from the second partition.

Could it be that booting from GUID is done from the EFI partition (primarily) on the Quad and DLSD, but directly from the second HFS+ partition on the mini G4 silent upgrade?
I don't think there is anything in the EFI partition for a PowerPC Mac to boot. The EFI partition is usually formatted as FAT so there's no blessed system folder or system file.

What makes me say that is that I've tried with the iMac G5 (non-iSight) and PB G4 12" (867 MHz version) and unlike the G5 DP, they ARE able to see the GUID drive in OF but trying to boot from the second partition results in the prohibited sign, and trying from the first partition results in a "warning: boot sector mismatch" which then fails and stays in OF. So basically, they almost boot, at least compared to the G5 DP, but in the end they don't.

So maybe rudimentary GUID support was first implemented in OF on models such as the iMac G5 (non-iSight) and PB 12" 1st gen to just see GUID drives, then actual support for booting from the second partition on a GUID drive was implemented on some models e.g. the mini G4 (silent upgrade) and iMac G5 iSight (which has been reported to boot from GUID if I'm not wrong), and finally support for booting from GUID via EFI on the Quad and DLSD?
A ROM dump is the only way to be sure.

Note that a GPT formatted disk has an MBR so a Mac that doesn't support GPT might believe that the disk is MBR.
The MBR of a GPT formatted disk usually appears to have a single partition of type EE which extends from block 1 to the end of the disk.
Code:
sudo fdisk /dev/disk0
Password:
Disk: /dev/disk0	geometry: 116737/255/63 [1875385008 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE 1023 255  63 - 1023 255  63 [         1 - 1875385007] <Unknown ID>
 2: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
 3: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused


Block 1 and 2 is the GPT header and GPT table. It will not be mistaken as an HFS or HFS+ partition.
The EFI partition (formatted as FAT) usually starts at block 40 and is usually named "EFI".
The first non-EFI partition is usually at block 409640 on GPT disks formatted by Mac Disk Utility. Windows may use a 100 MB EFI partition instead of 200 MB.

Code:
sudo gpt -r show -l /dev/disk0
       start        size  index  contents
           0           1         PMBR
           1           1         Pri GPT header
           2          32         Pri GPT table
          34           6         
          40      409600      1  GPT part - "EFIO2"
      409640    33554432      2  GPT part - "Install Big Sur"
    33964072      262144         
    34226216    33554432      3  GPT part - "Install Monterey"
    67780648      262144         
    68042792   104857600      4  GPT part - "SpaceCase"
   172900392      262144         
   173162536    33554432      5  GPT part - "Install Ventura"
   206716968   381697970         
   588414938  1286707888      6  GPT part - "MercuryExtremePro6G2"
  1875122826      262149         
  1875384975          32         Sec GPT table
  1875385007           1         Sec GPT header

Code:
sudo gpt -r show /dev/disk0 
Password:
       start        size  index  contents
           0           1         PMBR
           1           1         Pri GPT header
           2          32         Pri GPT table
          34           6         
          40      409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
      409640    33554432      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
    33964072      262144         
    34226216    33554432      3  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
    67780648      262144         
    68042792   104857600      4  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
   172900392      262144         
   173162536    33554432      5  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
   206716968   381697970         
   588414938  1286707888      6  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
  1875122826      262149         
  1875384975          32         Sec GPT table
  1875385007           1         Sec GPT header

It appears that the GPT code in Open Firmware does not use the UUID (48465300-0000-11AA-AA11-00306543ECAC in the above example) to find HFS+ partitions.
However, for MBR disks, it will look for certain partition types:
Code:
1	FAT12
4	FAT16
6	FAT16B
0b	FAT32
0c	FAT32 with LBA
0e	FAT16B with LBA
0ab	Apple Boot
0af	HFS or HFS+

For APM formatted disks, the Open Firmware code looks for these strings in the Apple partition map:
Code:
Apple_HFS
DOS_FAT_
Apple_Boot

In any case, it doesn't use the partition type code or string to determine partition type. It reads the first blocks of the partition to determine if it's FAT or HFS or HFS+ or HFS+ with HFS wrapper.

All of the above is handled by the mac-parts package.

The disk-label package is responsible for checking if a partition is specified. If a disk doesn't have a partition map, then it will check the disk for FAT or ISO-9660 or HFS or HFS+ or HFS+ with HFS wrapper. ISO-9660 cannot be a partition which is why it's not mentioned in mac-parts.

It seems to me that the mac-parts package could be back-ported to old Open Firmware versions with some effort. You would have to put the code in a partition that the old Open Firmware can read, then that code could be used to boot from another disk. You would have to do the same for some other packages such as hfs-plus-files which doesn't exist in old Open Firmware versions.

BootX from XPostFacto has a mac-parts override but that version doesn't have GPT code. I suppose the version in BootX could be replaced with a version that supports GPT. For APM, the BootX version of mac-parts doesn't allow DOS_FAT_ and it doesn't handle FAT partitions.

mac-parts in Open Firmware 1.0.5 doesn't deal with files. It loads boot code from a APM partition and executes it. I suppose this is how BootX gets loaded?
Open Firmware 1.0.5 does have mac-files for HFS and fat-files for FAT and iso-9660-files for iso-9660 but those are for whole disk volumes as handled by the disk-label package.
 

pc297

macrumors 6502
Sep 26, 2015
333
206
What's the version / date of the Open Firmware in the Mac mini G4? Is it in my list of ROMs? If not, then maybe you can get a ROM dump.


I don't think there is anything in the EFI partition for a PowerPC Mac to boot. The EFI partition is usually formatted as FAT so there's no blessed system folder or system file.


A ROM dump is the only way to be sure.

Note that a GPT formatted disk has an MBR so a Mac that doesn't support GPT might believe that the disk is MBR.
The MBR of a GPT formatted disk usually appears to have a single partition of type EE which extends from block 1 to the end of the disk.
Code:
sudo fdisk /dev/disk0
Password:
Disk: /dev/disk0    geometry: 116737/255/63 [1875385008 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE 1023 255  63 - 1023 255  63 [         1 - 1875385007] <Unknown ID>
 2: 00    0   0   0 -    0   0   0 [         0 -          0] unused     
 3: 00    0   0   0 -    0   0   0 [         0 -          0] unused     
 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused


Block 1 and 2 is the GPT header and GPT table. It will not be mistaken as an HFS or HFS+ partition.
The EFI partition (formatted as FAT) usually starts at block 40 and is usually named "EFI".
The first non-EFI partition is usually at block 409640 on GPT disks formatted by Mac Disk Utility. Windows may use a 100 MB EFI partition instead of 200 MB.

Code:
sudo gpt -r show -l /dev/disk0
       start        size  index  contents
           0           1         PMBR
           1           1         Pri GPT header
           2          32         Pri GPT table
          34           6        
          40      409600      1  GPT part - "EFIO2"
      409640    33554432      2  GPT part - "Install Big Sur"
    33964072      262144        
    34226216    33554432      3  GPT part - "Install Monterey"
    67780648      262144        
    68042792   104857600      4  GPT part - "SpaceCase"
   172900392      262144        
   173162536    33554432      5  GPT part - "Install Ventura"
   206716968   381697970        
   588414938  1286707888      6  GPT part - "MercuryExtremePro6G2"
  1875122826      262149        
  1875384975          32         Sec GPT table
  1875385007           1         Sec GPT header

Code:
sudo gpt -r show /dev/disk0
Password:
       start        size  index  contents
           0           1         PMBR
           1           1         Pri GPT header
           2          32         Pri GPT table
          34           6        
          40      409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
      409640    33554432      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
    33964072      262144        
    34226216    33554432      3  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
    67780648      262144        
    68042792   104857600      4  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
   172900392      262144        
   173162536    33554432      5  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
   206716968   381697970        
   588414938  1286707888      6  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
  1875122826      262149        
  1875384975          32         Sec GPT table
  1875385007           1         Sec GPT header

It appears that the GPT code in Open Firmware does not use the UUID (48465300-0000-11AA-AA11-00306543ECAC in the above example) to find HFS+ partitions.
However, for MBR disks, it will look for certain partition types:
Code:
1    FAT12
4    FAT16
6    FAT16B
0b    FAT32
0c    FAT32 with LBA
0e    FAT16B with LBA
0ab    Apple Boot
0af    HFS or HFS+

For APM formatted disks, the Open Firmware code looks for these strings in the Apple partition map:
Code:
Apple_HFS
DOS_FAT_
Apple_Boot

In any case, it doesn't use the partition type code or string to determine partition type. It reads the first blocks of the partition to determine if it's FAT or HFS or HFS+ or HFS+ with HFS wrapper.

All of the above is handled by the mac-parts package.

The disk-label package is responsible for checking if a partition is specified. If a disk doesn't have a partition map, then it will check the disk for FAT or ISO-9660 or HFS or HFS+ or HFS+ with HFS wrapper. ISO-9660 cannot be a partition which is why it's not mentioned in mac-parts.

It seems to me that the mac-parts package could be back-ported to old Open Firmware versions with some effort. You would have to put the code in a partition that the old Open Firmware can read, then that code could be used to boot from another disk. You would have to do the same for some other packages such as hfs-plus-files which doesn't exist in old Open Firmware versions.

BootX from XPostFacto has a mac-parts override but that version doesn't have GPT code. I suppose the version in BootX could be replaced with a version that supports GPT. For APM, the BootX version of mac-parts doesn't allow DOS_FAT_ and it doesn't handle FAT partitions.

mac-parts in Open Firmware 1.0.5 doesn't deal with files. It loads boot code from a APM partition and executes it. I suppose this is how BootX gets loaded?
Open Firmware 1.0.5 does have mac-files for HFS and fat-files for FAT and iso-9660-files for iso-9660 but those are for whole disk volumes as handled by the disk-label package.
Hi @joevt

I finally got round to dumping my mac mini G4's rom (1.5 GHz, Radeon 9200, silent upgrade) using your get-new-world-rom.command from https://68kmla.org/bb/index.php?thr...peaker-functionality-dilema.46289/post-522026 (thanks a lot, great work!)

I did open the resulting rom file in Hexedit and there -is- a match for "EFI PART" :)

So this explains why it can boot from EFI and thus we can add this machine to the list of macs that can do it :cool:
 

Attachments

  • Mac_Mini_G4_1.5_rom.bin.zip
    777.6 KB · Views: 17
  • Like
Reactions: Project Alice

joevt

Contributor
Jun 21, 2012
6,700
4,089
I finally got round to dumping my mac mini G4's rom (1.5 GHz, Radeon 9200, silent upgrade) using your get-new-world-rom.command from https://68kmla.org/bb/index.php?thr...peaker-functionality-dilema.46289/post-522026 (thanks a lot, great work!)

I did open the resulting rom file in Hexedit and there -is- a match for "EFI PART" :)

So this explains why it can boot from EFI and thus we can add this machine to the list of macs that can do it :cool:
That has Open Firmware 3 4.9.4f1 from July 12, 2005 which is the earliest I have seen that supports booting from GPT.

A Mac mini G4 with Open Firmware 3 4.8.9f4 from March 23, 2005 is the last I have that does not support booting from GPT.
 

Attachments

  • Mac Mini G4 4.9.4f1.zip
    821.6 KB · Views: 25
  • Like
Reactions: pc297 and Amethyst1

pc297

macrumors 6502
Sep 26, 2015
333
206
That has Open Firmware 3 4.9.4f1 from July 12, 2005 which is the earliest I have seen that supports booting from GPT.

A Mac mini G4 with Open Firmware 3 4.8.9f4 from March 23, 2005 is the last I have that does not support booting from GPT.
Thanks a lot! And was that mini G4 a silent upgrade or an original series model?

Great work with the table! I guess the only missing macs that would likely boot from GPT are the iMac G5 iSight, the G5 DC (if its BootROM is actually different from the Quad's - I vaguely remember reading it is), the DLSD 17" (PowerBook 5,9, which I confirmed does, will send you the BootROM), which were all released after the silent upgrade mini G4 (which was out in September 2005).

The very last G4 iBooks (PowerBook 6,7 12" and 15") could also be candidates as they were released in July 2005 so not too long before the silent upgrade mini G4.
 
Last edited:

joevt

Contributor
Jun 21, 2012
6,700
4,089
Thanks a lot! And was that mini G4 a silent upgrade or an original series model?
I don't know. I had two Mac mini G4 roms before this, both apparently from the same Mac mini G4 (same serial number), both with version 4.8.9f4, but the second was modified by @dosdude1 to allow support for a different CPU, and the original came from @LightBulbFun #580
 

pc297

macrumors 6502
Sep 26, 2015
333
206
I don't know. I had two Mac mini G4 roms before this, both apparently from the same Mac mini G4 (same serial number), both with version 4.8.9f4, but the second was modified by @dosdude1 to allow support for a different CPU, and the original came from @LightBulbFun #580
PowerMac 10,1, looks like an original series model. Then the silent upgrade is likely the first model to support booting from GPT (if the iBook G4 "PowerBook 6,7" from July 2005 doesn't).
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.