(original article by Jean-Pierre Andre)
This configuration may be useful for a laptop with no easy access to an external disk. It is based on using the OpenIndiana bootloader, which is the only one able to boot the three systems.
Make images of the partitions you cannot easily rebuild, such as tool partitions preinstalled by the vendor.
This is easily done by Gparted which is present on most live-CD/DVD/USB installers for Linux and OpenIndiana.
This is also done by Gparted. Best to separate the system partitions and you user data partitions. You need :
This is clearly more than four partitions, so you have to use an extended partition. However some vendors ship the computer with all four primary partitions used, so you may have to delete one of them and replace it by an extended partition, then reinstall the deleted one as a logical partition.
Define your partitions types as :
Make a copy of your partition layout. This must be exact to the sector if you need to rebuild your partitions. In particular the OpenIndiana installer will destroy the partitions beyond the ninth, and if you need more than nine partitions, you will have to recreate them. A convenient tool for saving/restoring the partition layout is sfdisk.
Make a copy of the MBR. You can do that from a live-CD/DVD/USB :
The /dev/sda notation is what you'd encounter if using a Linux Live CD/DVD/USB. The /dev/dsk/c0t0d0p0 notation is typical of Solaris systems.
To find out what letters your disks are assigned to, you can use "
dmesg | grep sd" in Linux and "
pfexec format -e" in Solaris.
Select ext3 (or ext2) as the file system type for Linux root. This will have to be readable by the OpenIndiana installer.
This will probably install grub2 as its bootloader and overwrite the current MBR. At this stage, you should be able to dual boot Windows and Linux.
FIXME : the bootloader may have to be stored in the Linux boot partition (problem encountered by Axelle ?)
Make a second copy of the MBR (can be done from the installed Linux), and make a copy of the grub2 menu, which is found in /boot/grub2/grub.cfg
This will install grub as its bootloader and overwrite the current MBR
Make a third copy of the MBR and make a copy of the grub menu, which is found on /rpool/boot/grub/menu.lst
Use an OpenIndiana text editor to insert a few lines in menu.lst to be able to boot Windows and Linux. These lines must be inserted either just before this one :
#---------- ADDED BY BOOTADM - DO NOT EDIT ----------
or inserted just after this one :
The entry to be inserted for Windows is simple and may have been inserted automatically by the OpenIndiana installer :
The entry to be inserted for Linux can be derived from the grub.cfg saved at step 5. Find a couple of consecutive lines from grub.cfg beginning with "linux" and "initrd". Replace the linux header by "kernel" and insert both lines in the menu.lst of OpenIndiana, so :
The "4" in "root (hd0,4)" means that Linux was installed on the 5th partition (the first logical partition). You have to adjust to your own partition number for Linux root (subtract one from the partition number).
If you cannot install the systems in the above order (typically when wanting to reinstall Linux), you have to get the OpenIndiana MBR from the backup and reinstall it, and you have to update the menu.lst as shown above.