Triple Boot, Part 1: Planning
Brian wrote up his experience getting OpenSolaris 2008.05 to work in a dual-boot environment with OS X. There are also some excellent resources available in the Getting Started With OpenSolaris 2008.05 documentation. But none of those described exactly what I wanted : a triple-boot system with Windows Vista, OpenSolaris 2008.05, and Ubuntu 8.04. This series of blog entries will describe the process I used to get all three installed and working on my system.
Disclaimers:
- This system has a single hard-drive.
- Messing around with the partitions and the Master Boot Record (MBR) on a disk can be dangerous. Always back up your data first.
- This worked for me - YMMV :-)
My system is a Sony VAIO VGN-SZ680N04, that I took delivery of back in February of 2008. It has a 186 gigabyte (GB) hard drive (or 200GB, depending upon your definition of "gigabyte"). It came from the factory with Windows Vista already installed.
There were two primary partitions: a 7GB "recovery" partition and then Vista itself in an NTFS partition that used the rest of the drive. Since I was planning to use OpenSolaris more than Vista or Ubuntu I decided to
give the largest amount of space to OpenSolaris: just over
70GB. I figured 46GB for Ubuntu would be more than enough for it, so that left me with about 60GB for Vista (again, more than I'll probably ever need).
Before I could create the new partitions for OpenSolaris and Ubuntu, I had to resize Vista's NTFS partition down to 60GB. Before attempting the resize, I defragmented the NTFS partition (in the Vista Control Panel, choose System and Maintenance and then choose Defragment your hard drive, which is listed under Administrative Tools).
Windows Vista also includes a utility that will resize an NTFS partition (in the Vista Control Panel, choose System and Maintenance and then choose Create and format hard disk partitions, which is listed under Administrative Tools). I tried it but could not get it to actually resize the partition. I am not the only person who has seen this problem.
I had to find another way. GParted would be one option, but I had used Partition Manager before on an older system and it had been worth the price so I installed Partition Manager version 9.0. I used it to resize the existing NTFS partition and to add the new partitions.
During the partitioning, I had to keep in mind two important things:
- OpenSolaris can only be installed on a primary partition
- The partition that contains OpenSolaris must precede any Linux swap partition
After resizing the NTFS partition, I created a third primary partition for OpenSolaris. It is important to note that I specified a partition type of "Linux swap" for that primary partition. Why use "Linux swap" for a partition that will eventually contain OpenSolaris? The MBR contains a partition type identifier for each partition on the drive. The type identifier 0x82 is, unfortunately, overloaded: it is used by some software to indicate a Linux swap partition and by older Solaris software to indicate a Solaris partition.
I then created an extended partition that used the remainder of the disk. In that extended partition, I created three logical drives for use by Ubuntu, one each for: swap, boot, and root. The end result (click for full size):
With that done, I was ready to start installing software. Vista was already installed and running, so all I needed to do was install Ubuntu and then OpenSolaris. I installed them in that order: first Ubuntu and then OpenSolaris.
This is because by default, both installers write their own code to the MBR. I wanted the OpenSolaris code in the MBR because it will start the GRUB that OpenSolaris installs. Here is the key point: the GRUB that OpenSolaris installs can boot Ubuntu, but the GRUB installed by Ubuntu cannot boot OpenSolaris. So I will install Ubuntu first, then overwrite its GRUB with the one from OpenSolaris. More on this in Part 2: Installing Ubuntu.

Hi, and how is it with dual boot of Nevada (SXCE) and indiana (2008.05)
Posted by stradi on July 16, 2008 at 10:14 PM GMT #
I have not tried to dual-boot SXCE and OpenSolaris 2008.05, but one rule to keep in mind is that only *one* primary partition at a time can have the 0xBF partition type set. Bob Netherton describes an approach for working around that here: http://blogs.sun.com/bobn/entry/a_grub_configuration_for_multiple.
Another approach would be to use slices instead of multiple primary partitions; William Xue describes that approach here: http://www.sun.com/bigadmin/features/articles/install_multi_solaris.jsp
Posted by Gregg Sporar on July 17, 2008 at 02:07 AM GMT #
Also a good alternative is to use System Rescue CD - http://www.sysresccd.org , which has gparted in there and you can safely use it to resize/move/whatsoever your disk/partitions.
Besides gparted there are many great tools, that can help you with your system recovery.
Naturally System Rescue is free and so far I didn't have any problems with it. I always found my data in proper state after the fiddling around.
Posted by Lubos Kosco on August 05, 2008 at 07:31 AM GMT #