Wednesday Mar 28, 2007

How to Dual Partition a MacBook Pro with MacOS and Solaris

Having used a Dual partitioned laptop for the last few years, I managed to get my hands on the departments Intel MacBook Pro and decided to try and Dual Partition it with MacOS and Solaris.
I must point out that I'd never used MacOS before and decided the best way to try and achieve this goal, would be to read other peoples blogs. After reading and trying the methods described in many different blogs, I'd gained enough experience to work out what needed to be done.

Much of the credit for me getting this working must go to Alan Perry, as it was his Blog that was instrumental in giving me the information on how to setup the disk Partitioning. All I've done is made a few modifications to get it to work for me on a MacBook Pro.

Update: 04-Dec-2007

I recently reinstalled my MacBook Pro with Leopard and reran this procedure to install OpenSolaris build 76. This time I found that I could simply boot from the Leopard Installation DVD instead of using an external drive (installed with MacOS).


Prerequisites

  • This procedure assumes that MacOS has been installed on a single partition and the OS and Firmware have been installed with the latest updates.
  • MacOS Installation DVD
  • Recent build of Solaris Express Installation DVD.

 

Installation Process

  1. Boot MacOS from the Interal HD.
  2. Create the new Solaris partition. Actually create a Windows partition and we will recreate a Solaris2 Partition later. (You will need to enable the root user to perform the following).
    • How to enable the Root User
      • Open 'Netinfo Manager'
      • Select 'Security' and then 'Authenticate' and enter your password
      • Select 'Security' again, and then 'Enable Root User' and enter a new password.
      • Exit Netinfo Manager

    • How to create the new partition for Solaris.
      • Open a 'Terminal', change to the Root User by typing 'su -' and the required password
      • In the terminal type 'diskutil list', it should look something like this.

            /dev/disk0
            #:                              type name                    size            identifier
            0:  GUID_partition_scheme                             \*111.8 GB   disk0
            1:                                EFI                             200.0 MB    disk0s1
            2:                     Apple_HFS Macintosh HD       111.5 GB    disk0s2    


      • Find the identifier for your MacOS partition (in this case disk0s2) and type in the following to repartition the drive. I created a 31gb partition for Solaris, (First create a Windows partition, because MacOS doesn't know how to create a Solaris partition).

             diskutil resizeVolume disk0s2 80G "MS-DOS FAT32" "Windows" 31G

        NOTE: You won't see the new partition in 'diskutil list' until after a reboot.

  3. Boot MacOS Installation DVD. First unmount the internal hard disk.  Then change the ID for the EFI partition to something that Solaris does not understand (HFS+).

    • Unmount the Internal Hard Disk.
      • Open 'Disk Utility'
      • Select your internal MacOS partition and 'Unmount' it.
    • Change the required Partition ID
      • Open a 'Terminal', change to the Root User by typing 'su -' and enter the required password.
      • Confirm the new Windows partition has been created by typing 'diskutil list', it should look something like this.

           /dev/disk0
          #:                             type name                     size            identifier
          0:  GUID_partition_scheme                             \*111.8 GB   disk0
          1:                                EFI                             200.0 MB    disk0s1
          2:                     Apple_HFS Macintosh HD       80.0 GB      disk0s2    
          3:           Microsft Basic Data                          31.5 GB      disk0s3    


      • Change the EFI partition ID's by typing

            fdisk -e /dev/rdisk0

      • In the fdisk program type 'p' to display the MBR partition table. It should look something like this

           Disk: /dev/rdisk0        geometry: 14593/255/63 [234441648 sectors]
           Offset: 0       Signature: 0xAA55
                   Starting       Ending
           #: id    cyl  hd  sec -   cyl  hd  sec [          start -             size]
         -------------------------------------------------------------------------
           1: EE 1023 254  63 - 1023 254  63  [               1 -         409639] <Unknown ID>
           2: AF 1023 254  63 - 1023 254  63 [       409640 -   167772160]  HFS+
           3: 0B 1023 254  63 - 1023 254  63  [ 168443944 -     65997664]  Win95 FAT-32
           4: 00      0     0    0         0    0    0  [               0 -                 0]  unused

      • Change the EFI partition (it will have the id of 'EE') to 'AF' (HFS+).  This can be done by typing the following.
                      setpid 1
                      AF
                      write
                      quit

  4. Boot from your Solaris Express Installation DVD and exit out the installation so we can recreate the Windows partition as a new Solaris2 partition.

    Note:
              I found using the new Solaris Installer does not work with this procedure, so when booting from the Solaris Express Installation DVD and you get presented with the grub options - make sure you select "Solaris Express".


    • In the grub menu select 'Solaris Express'
    • Select 'Interactive Installation (default)'
    • Continue with the installation until you see 'Starting Solaris Installation...' in the 'Solaris Install Console' window. At this point select 'Exit'
    • In the Terminal run 'format' and type Ctrl-D (to exit). Use format to determine the disk name for your internal disk. The output should look something like this.

         Searching for disks...done

        AVAILABLE DISK SELECTIONS:
            0. c1d1 <FUKITSU-         NZOST6B28L9-0001-111.79GB>
              /pci@0,0/pci-ide@1f,2/ide@0/cmdk@1,0
        Specify disk (enter its number):

    • In the Terminal run 'fdisk /dev/rdsk/c1d1', it should look something like this.

      Partition    Status     Type                  Start     End        Length      %
      ======   ====   ========   ====    ===   ======   ===
            1                       Other OS                  0        25               26      0
            2                       Other OS                25   10468          10444     72
            3                       Win95 FAT32    10485   14593            4109     28

    • Delete partition 3 (Win95 FAT32)
    • Create a new partition (option 1)
      • Select the partition type?                              Answer 'SOLARIS2'
      • Specify percentage of disk to use                 Answer '1'
      • Should this become an Active partition?     Answer 'n'
    • Create another partition (option 1)
      • Select the partition type?                              Answer 'SOLARIS2'
      • Specify percentage of disk to use                 Answer '27'
      • Should this become an Active partition?     Answer 'n'
    • Delete partition 3 (The partition thats 1% of disk space)
    • Your partition layout should look something like this.

      Partition    Status     Type                    Start      End        Length      %
      ======   ====   ========     ====     ===   ======   ===
            1                       Other OS                    0         25              26      0
            2                       Other OS                  25    10468         10444     72
            3                       Solaris2               10613   14552           3940     27

    • Exit (update disk configuration and exit)

    NOTE:
        I'm not totally sure what MacOS does with the partitioning. As you can see from the first fdisk information displayed, the Win95 Partition does not start immediately after the previous partition. It's for that reason I create a temporary partition thats 1% in size, then create the Solaris partition that I'm going to use and then remove the 1% partition.  I do this to preserve the cyl's 10468 to 10485 that MacOS doesn't use.   


  5. In the Terminal run 'install-solaris', this will start the interactive installation and enter all the required information for your specific installation. After you select 'Install Now', the installation program will FAIL. This failure is because of CR6413235. Once this Bug is fixed you will be able to skip to step 7). Until then we don't implement the workaround (yet) because the 'fdisk -F' does actually write some information out to the disk before failing. It's this information that allows Solaris to use the Solaris2 partition as the VTOC.
    • If you 'Exit' the installation program, a Terminal will appear and in there type 'format'. After selecting the disk and printing out the VTOC, you should see the layout with slice 2 being 31GB.
    • If format still shows the 3 partitions, then do no proceed and try step 4 again.

  6. Now implement the workaround for CR6413235.
    • In the Terminal run the following commands.

                   mount -o remount,rw /
                   mv /sbin/fdisk /sbin/fdisk.real
                   cat > /sbin/fdisk
                   #!/bin/sh

                   echo "$\*" | grep -- "-F" > /dev/null
                   if [ $? = 1 ] ; then
                         /sbin/fdisk.real $\*
                   fi
                   CTRL-D

                   chmod +x /sbin/fdisk

  7. Now when you run through the Installation program and answer the questions to configure your system, it will install the software without any errors. To restart the Installation program, run the following.

          install-solaris

  8. Once Solaris has finished installing and rebooted, shutdown Solaris and boot MacOS from the internal HD (you will need to boot from the MacOS install DVD and use 'Startup Disk' to select the MacOS Internal Hard disk). Once booted in MacOS, download and Install rEFIt from sourceforge.org onto your Internal HD. (rEFIt is a boot menu and maintenance toolkit for EFI-based machines like the Intel Macs).
    • So that rEFIt is always enabled, open a Terminal and change to the root user
                   su -
                   cd /efi/refit
                   ./enable-always.sh

  9. That's it all finished. Now when you boot rEFIt will present you with two options MacOS and Solaris (Solaris will be shown as a Linux icon).

About

paulmitchell

Search

Categories
Archives
March 2007
MonTueWedThuFriSatSun
   
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
29
30
31
 
       
Today