can I get my Apple_partition_map partition back?

Dan Burcaw yellowdog-general@lists.terrasoftsolutions.com
Wed Apr 30 22:53:01 2003


I've updated 'pdisk' to be able to easily fix the Apple_partition_map
issue.  Again, this issue seems to only occur on machines with two hard
disks.  Mac OS 9 or OS X may not boot because of this problem. The gist
is that the first partition of your (likely second hard drive) has the
'boot' flag toggled.  As a result, it is labled with the partition type
"Apple_Bootstrap" instead of "Apple_partition_map".  This is due to a
big in Anaconda, the Yellow Dog installer and the Parted partition
program that it uses.  It will be fixed in future ISO revisions of
Yellow Dog Linux 3.0, and future releases.


Follow the simple instructions below to fix the problem.  You will
need to know what Linux device the drive affected is.  E.g. /dev/hdb

(Note: the following instructions assume you are logged in as
super-user.)

1)  Type: /sbin/pdisk -l <your hard drive>
    (e.g. /dev/hdb)

    If pdisk reports partition #1 having a type of "Apple_Bootstrap",
    please proceed to step two. Otherwise, verify that you have provided
    the correct hard drive device and try step one again.

2)  Download the pdisk update at:
    http://stage.terraplex.com/~dburcaw/pdisk-0.8-3a.ppc.rpm  

    I've also pushed this update to the YDL 3.0 updates directory
    so it should be available there soon (and via apt & yum.. although
    apt may still be giving folks a problem.. fixes pending).

3)  Install the pdisk update by typing::
    rpm -Uvh pdisk-0.8-3a.ppc.rpm

4)  Type: /sbin/pdisk <your hard drive>
 
5)  At the pdisk prompt type 'p'.
    Example output:

    Command (? for help): 

    Partition map (with 512 byte blocks) on '/dev/hdb'
      #:	     type name	      length base		( size )
      1:  Apple_Bootstrap untitled        63 @ 1
      2:  Apple_UNIX_SVR4 unitiled  11076123 @ 64		(  5.3G)

    Device block size=512, Number of Blocks=11076183 (5.3G)
    DeviceType=0x0, DeviceID=0x0

  
    Again, you should see that partition '1' has the incorrect   
    "Apple_bootstrap" type.

6) To fix this issue, type 't' at the pdisk prompt.
   This option does NOT touch your partition data. It merely   
   relabels the partition type.

   Command (? help): t   

7) You will be prompted to enter a partition number, type '1'.

   Partition number: 1

8) You will be prompted to enter the new partition type,
   be sure to type "Apple_partition_map" exactly as shown,
   without quotes.

   New partition type: Apple_partition_map

9) Back at the pdisk prompt, type 'p', to make sure partition '1'
   is now properly labeled "Apple_partition_map" with that exact case 
   and spelling.

10) Save your changes with the 'w' option.

   Command (? help): w
   Writing the map destroys what was there before. Is that okay? [n/y]:y
   pdisk: Re-read of partition table failed  (Device or resource busy)
   Reboot your system to ensure the partition table i updated.

11) Quit pdisk to finish.

   Command (? for help): q
   [root@localhost root]#


At this point you should be all good to go.  The 'parted' utility, which
broke like Mac OS X, due to this bug, should now work if you type:

/sbin/parted <your hard drive> print

Also, Mac OS X should now boot as expected.


Regards,
Dan