Tuesday Mar 24, 2009

Multiboot Solaris on a MacBook Pro Redux

In my last entry, I used an early development build (build 63) of Solaris Express Community Edition (SXCE). SXCE is Sun's binary release for OpenSolaris developers (code named "Nevada"). The OpenSolaris 2008.11 release is based upon Nevada build 101b and is greatly improved. All of the issues that I previously identified have been resolved. Brian Leonard documented a simple, straightforward procedure to multiboot OpenSolaris and Mac OS X. I tested his procedure with the latest releases of OpenSolaris, Mac OS X, and rEFIt. It proved to be the simplest approach to date.

Tested Configuration

Monday May 28, 2007

Multiboot Solaris on a MacBook Pro

This entry describes how to setup a 15" MacBook Pro to multiboot Solaris Express and Mac OS X without the use of Apple's Boot Camp technology. This is a refinement and expansion of work done by Christian Kelly, Paul Mitchell and Alan Perry. Their collective experiences contributed greatly to my success.

I have not been able to instantiate the AirPort under Solaris, nor have I attempted to configure the built-in iSight camera, Bluetooth, FireWire, audio or ExpressCard/34 slot. Upon cursory examination, the Time-of-Day clock does not appear to function correctly.

I am sharing this information in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. Caveat emptor!

Contents

Tested Configuration

  • 15" MacBook Pro (Intel Core 2 Duo 2.16GHz, 120GB HDD)
  • Boot ROM Version MBP22.00A5.B01
  • Mac OS X v10.4.9 (all available updates applied)
  • Solaris Express build 63
  • rEFIt 0.9

Known Caveats

  • Should you elect to reinstall OS X at a later date, the Installer will consider the Macintosh HD volume to be unusable. Launch Disk Utility from the Installer and erase the entire disk.
  • The maximum resolution attainable using the Xorg VESA driver is 1152x864.
  • rEFIt may interfere with the use of standard boot key sequences, however, in most cases it provides equivalent functionality.
  • Parallels Desktop for Mac does not support use of the Solaris partition within a virtual machine.

Resize the Existing Macintosh HD Volume

Resize the existing Macintosh HD volume to 80GB and create a 31GB FAT32 partition. The FAT32 partition is a placeholder.

$ diskutil resizeVolume disk0s2 80G MS-DOS PC 31G
Started resizing on disk0s2 Macintosh HD
Verifying
Resizing Volume
Adjusting Partitions

Finished resizing on disk disk0s2 Macintosh HD
You will need to manually reformat your new partitions.
WARNING: You must now reboot!
$ 

Shut down the computer.

Change the OS X Partition Scheme

Boot OS X into single-user mode. Power on the system and hold down Command-S.

Display the current GUID Partition Table (aka the GPT).

# fdisk /dev/rdisk0
Disk: /dev/rdisk0       geometry: 14593/255/63 [234441648 sectors]
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
#

Partition 1 is a fake partition which is designed to protect GPT-partitioned disks from tools that only understand the legacy MBR partitioning scheme. The partition ID of 0xEE denotes that partition 1 is a Protective MBR (PMBR) partition entry.

Change the partition ID of partition 1 to 0x63.

# printf "setpid 1\\n63\\nwrite\\ny\\nquit\\n" | fdisk -e /dev/rdisk0
fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
Enter 'help' for information
fdisk: 1>          Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: EE 1023 254  63 - 1023 254  63 [         1 -     409639] <Unknown ID>
Partition id ('0' to disable)  [0 - FF]: [EE] (? for help) fdisk:\*1> Device could not be accessed exclusively.
A reboot will be needed for changes to take effect. OK? [n] Writing MBR at offset 0.
fdisk: 1> #

Delete the FAT32 partition.

# printf "edit 3\\n0\\nwrite\\ny\\nquit\\n" | fdisk -e /dev/rdisk0
fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
Enter 'help' for information
fdisk: 1>          Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 3: 0B 1023 254  63 - 1023 254  63 [ 168443944 -   65997664] Win95 FAT-32
Partition id ('0' to disable)  [0 - FF]: [B] (? for help) Partition 3 is disabled.
fdisk:\*1> Device could not be accessed exclusively.
A reboot will be needed for changes to take effect. OK? [n] Writing MBR at offset 0.
fdisk: 1> #

Create a Solaris partition.

# printf "edit 3\\nBF\\nn\\n168443944\\n65992601\\nflag 3\\nwrite\\ny\\nquit\\n" | fdisk -e /dev/rdisk0
fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
Enter 'help' for information
fdisk: 1>          Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 3: 00    0   0   0 -    0   0   0 [         0 -          0] unused
Partition id ('0' to disable)  [0 - FF]: [0] (? for help) Do you wish to edit in CHS mode? [n] Partition offset [0 - 234441648]: [168181800] Partition size [1 - 65997704]: [6599770
4] fdisk:\*1> Partition 3 marked active.
fdisk:\*1> Device could not be accessed exclusively.
A reboot will be needed for changes to take effect. OK? [n] Writing MBR at offset 0.
fdisk: 1> #

Display the new legacy MBR partition table.

# fdisk /dev/rdisk0
Disk: /dev/rdisk0       geometry: 14593/255/63 [234441648 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
 1: 63 1023 254  63 - 1023 254  63 [         1 -     409639] ISC, HURD, \*
 2: AF 1023 254  63 - 1023 254  63 [    409640 -  167772160] HFS+
\*3: BF 1023 254  63 - 1023 254  63 [ 168443944 -   65992601] <Unknown ID>
 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused

Shut down the computer.

# shutdown -h now

Install Solaris

More often than not, GRUB will not recognize the built-in MacBook Pro USB keyboard. That being said, it is best if you attach an external USB keyboard in order to control the stage 2 boot selection. Once the Solaris kernel boots, the built-in keyboard will function correctly.

Power on the system, insert the DVD and hold down C.

From the GRUB menu, select "Solaris Express" and press enter.

Enter single-user mode and write a new label to the disk.

# format -e /dev/rdsk/c1d1p0
selecting /dev/rdsk/c1d1p0
NO Alt slice
No defect list found
[disk formatted, no defect list found]



FORMAT MENU:
        disk       - select a disk
        type       - select (define) a disk type
        partition  - select (define) a partition table
        current    - describe the current disk
        format     - format and analyze the disk
        fdisk      - run the fdisk program
        repair     - repair a defective sector
        show       - translate a disk address
        label      - write label to the disk
        analyze    - surface analysis
        defect     - defect list management
        backup     - search for backup labels
        verify     - read and display labels
        volname    - set 8-character volume name
        !<cmd>     - execute <cmd>, then return
        quit

format> label
[0] SMI Label
[1] EFI Label
Specify Label type[1]: 0
Warning: This disk has an EFI label. Changing to SMI label will erase all
current partitions.
Continue? y
Warning: no backup labels
format> quit
# reboot

Hold down C to boot the Solaris DVD.

From the GRUB menu, select "Solaris Express" and press enter.

Perform a "Solaris Interactive Text (Console session)" installation as Solaris will not automatically recognize the ATI graphics adapter.

Once the Solaris installation is complete, the system will reboot into OS X.

Install the rEFIt Boot Manager

Download the rEFIt Mac disk image from the rEFIt Project home page and follow their installation instructions.

Other Resources

  • [1] Christian Kelly's Web site - MacBook and post Solaris install information.
  • [2] Paul Mitchell's Blog - MacBook Pro multiboot w/rEFIt.
  • [3] Alan Perry's Blog - Mac Mini multiboot.
  • [4] Secrets of the GPT - Apple Technical Note TN2166
  • [5] Intel - Extensible Firmware Interface (EFI) Specification
  • [6] Unified EFI Forum - Unified Extensible Firmware Interface (UEFI) Specification
  • [7] Partition table information.
  • [8] How It Works - CHS Translation
About

ptelles

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
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
28
29
30
   
       
Today