OpenSolaris on MacBook Air

I succeeded to run native OpenSolaris on MacBook Air. The built-in keyboard, audio and video work fine without any additional setup. You can also use the built-in WiFi and Compiz with some configuration. (日本語)

Requirements

Installation

  1. Resize partition using diskutil command on Mac OS X
    Since MacBook Air has only 80GB HDD (or 60GB SSD), you need to estimate partition size carefully in advance. I have assigned 20GB for Solaris and 20GB for Vista. If you need more free space for Mac OS X, you can deselect printer drivers, additional fonts, unnecessary languages, bundled applications (such as iWeb, GarageBand, iMovie) during Mac OS X 10.5 installation.

    $ diskutil resizeVolume /dev/disk0s2 34.1G "MS-DOS FAT32" Windows 20G "Journaled HFS+" Solaris 20G
    Started resizing on disk disk0s2 Mac OS X
    Verifying
    Resizing Volume
    Adjusting Partitions
    Formatting new partitions
    Formatting disk0s4 as Mac OS Extended (Journaled) with name Solaris
    Formatting disk0s3 as MS-DOS (FAT32) with name Windows
    [ + 0%..10%..20%..30%..40%..50%..60%..70%..80%..90%..100% ] 
    Finished resizing on disk disk0
    /dev/disk0
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        \*74.5 Gi    disk0
       1:                        EFI                         200.0 Mi   disk0s1
       2:                  Apple_HFS Mac OS X                34.0 Gi    disk0s2
       3:       Microsoft Basic Data WINDOWS                 20.0 Gi    disk0s3
       4:                  Apple_HFS Solaris                 20.1 Gi    disk0s4
    

  2. Change GPT (GUID Partition Table) to MBR (Master Boot Record)
    Currently OpenSolaris cannot boot from GPT hard disk. You need chage by hand using fdisk command. Please note that you will not be able to view partition map using "Disk Utility" GUI after changing to MBR.

    $ sudo fdisk -e /dev/disk0
    Password:
    fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory
    Enter 'help' for information
    fdisk: 1> p
    Disk: /dev/disk0	geometry: 9729/255/63 [156301488 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] 
     2: AF 1023 254  63 - 1023 254  63 [    409640 -   71250736] HFS+        
     3: 0B 1023 254  63 - 1023 254  63 [  71922520 -   41943040] Win95 FAT-32
     4: AF 1023 254  63 - 1023 254  63 [ 113865560 -   42173744] HFS+        
    fdisk: 1> setpid 1
             Starting       Ending
     #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
    ------------------------------------------------------------------------
     1: EE 1023 254  63 - 1023 254  63 [         1 -     409639] 
    Partition id ('0' to disable)  [0 - FF]: [EE] (? for help) AF
    fdisk:\*1> q
    Writing current MBR to disk.
    Device could not be accessed exclusively.
    A reboot will be needed for changes to take effect. OK? [n] y
    

  3. Install rEFIt bootloader for multiboot
    rEFIt Version 0.11 supports MacBook Air. Double click rEFIt.mpkg icon to launch rEFIt Installer. Next open the terminal and execute enable-always.sh script.

    $ sudo /efi/refit/enable-always.sh
    Password:
    + sudo bless --folder /efi/refit --file /efi/refit/refit.efi --labelfile /efi/refit/refit.vollabel --setBoot
    
    rEFIt shows Linux icons for OpenSolaris at boot screen. You can replace them with new icons. Copy os_linux.icns and os_linux.icns to /efi/refit/icons/ directory.

  4. Boot OpenSolaris Live CD and install
    Hold down the option (alt) key at startup to boot from the SuperDrive. You will be able to install OpenSolaris without any problem.

Configuration

  • Wireless LAN
    Built-in wireless LAN (Broadcom BCM4328 802.11a/b/g/n) works only in 32-bit kernel with ndis-1.2, but the network connection is not stable. The 64-bit driver cause the system panic.

    1. Extract <Mac OS X Install Disc 1>/Boot Camp/drivers/BroadcomXPInstaller.exe using unrar command. Note that Vista driver (BroadcomInstaller.exe and BroadcomInstaler64.ext) will not work with NDIS.
    2. Build ndis driver. Follow the instruction "How to build a driver?" Make sure that SUNWgcc, SUNWflexlex and SUNWonbld are installed before building the driver.
    3. After copy drivers to /kernel/drv/bcmndis and /kernel/misc/ndisapi, then add them to the system by add_drv command.
      # add_drv -i '"pci14e4,4328"' bcmndis
      

  • Video
    Video works fine by default except Compiz Fusion. Compiz hags due to defect 1334, so you need new mesa 7.0.3 binaries.

    1. Download new mesa 7.0.3 binaries and install script:

    2. Extract the binaries into /tmp/new-binaries because the install script expects the files to be.

      $ mkdir /tmp/new-binaries
      $ cd /tmp/new-binaries
      $ tar xfz ~/new-binaries-32.tar.gz
      $ tar xfz ~/new-binaries-64.tar.gz
      

    3. Run install script after stopping X11 server.

      $ pfexec svcadm disable gdm
      console login: username
      Password: xxxxxxxx
      $ pfexec sh ~/install-bin.csh
      $ pfexec /usr/sbin/svcadm enable gdm; exit
      

    4. Enable Compiz
      Go to System->Preferences->Appearance->Visual Effects and choose "Normal" or "Extra" or "Custom". Click "Keep settings" button at "Keep Settings" dialog.

    5. Cusomize Compiz to remove white boarder
      You will see white boarders top and bottom of desktop window. You can delete the boarders by customizing Compiz. Choose System->Preferences->CompizConfig Settings Manager->Effects->Window Decoration, then change "Shadow Radius" value 8.0000 to 8.5000 (or above).

  • Right Mouse Button emulation
    Go to System->Preferences->Keyboard->Accessibility and click the "Allow to turn accessibility features on and off from the keyboard" check box. Next click the "Mouse Keys" tab and click "Allow to control the pointer using the keyboard" check box. Then create .xmodmaprc and .xprofile files to assign right "command" key to right mouse button.

    $ vi ~/.xmodmaprc
    keycode 116 = Pointer_Button3
    
    $ xmodmap ~/.xmodmaprc
    
    $ vi ~/.xprofile
    xmodmap ~/.xmodmaprc
    

  • Time Zone
    To adjust GMT lag, remove zone_lag entry from /etc/rtc_config.

    # vi /etc/rtc_config
    zone_info=Japan
    zone_lag=-32400 <- remove or comment out this line
    

See also

投稿されたコメント:

コメント
  • HTML文法 不許可
About

sasanuma

Search

Archives
« 4月 2014
  
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
   
       
今日