Install OpenSolaris on a Windows + Ubuntu system

 

Installing OpenSolaris 2008.05 is very similar to the process I used for installing Ubuntu 8.04: download the .iso image file, burn it to a CD, and then boot the CD.  On startup the CD will display a GRUB menu - I selected the first entry (click for full size on this screen snapshot - or any other in this entry):

After the boot completes, there is a desktop displayed that includes an icon for Install OpenSolaris:

I right-clicked that icon and then selected Open from the context menu to start the installer.  The first thing the installer wants to know is where on the system to install OpenSolaris. In the 2008.05 release, the installer only offers two options: use the entire disk or use an existing partition.  It does not offer an option for creating a new partition - hopefully this will be fixed in a future release.

I do not want to use the whole disk for OpenSolaris - the third primary partition is the one that I set aside for OpenSolaris (ignore the partition sizes shown here - I got these screen snapshots from a test environment):

And I changed the type for that partition from Linux Swap to Solaris in order to select that partition for the install:

After I clicked Next I got prompted to fill in the usual stuff: user name, time zone, etc. The actual install process then started and immediately died:

Clicking the link for the installation log brought up this window:

The two interesting lines start with:

fdisk: fdisk -n -F failed.
Couldn't create fdisk partition table on disk

It turns out, this is not related to my attempt to have a triple-boot system.  Because of the geometry on the disk drive in my system, I just happened to run into a bug in fdisk. Full details are included in the comments added to the bug that I filed against the OpenSolaris installer, but the bottom line is that when invoked by the installer, fdisk was unable to make the required changes to the partition.

Luckily for me, Jan Damborsky of the installer team was able to help me out with an easy workaround. I shutdown the installer and then at a terminal window typed in this command:

pfexec format -e

Which then gave me this output:

AVAILABLE DISK SELECTIONS:
       0. c5d0 <DEFAULT cyl 9295 alt 2 hd 255 sec 63>
          /pci@0,0/pci-ide@1f,2/ide@0/cmdk@0,0
Specify disk (enter its number):

I typed in 0 and got a long list of available commands.  I then typed in:

fdisk

And got the following output back:

             Total disk size is 24321 cylinders
             Cylinder size is 16065 (512 byte) blocks
                                               Cylinders
      Partition   Status    Type          Start   End   Length    %
      =========   ======    ============  =====   ===   ======   ===
          1                 Other OS          0   888     889      4
          2       Active IFS: NTFS       888  8972    8085     33
          3                 Solaris        8973  18270    9298     38
          4                 EXT LBA        18270  24321    6052     25

SELECT ONE OF THE FOLLOWING:
   1. Create a partition
   2. Specify the active partition
   3. Delete a partition
   4. Change between Solaris and Solaris2 Partition IDs
   5. Exit (update disk configuration and exit)
   6. Cancel (exit without updating disk configuration)
Enter Selection:

The installer needs for fdisk to do two things: Set the partition type to Solaris2 and mark the partition as Active.  When invoked using the command line from the installer, the bug in fdisk causes it to error-exit but when invoked interactively via the format command, it works without any problems. 

Which meant that all I had to do was choose option 4 from the menu and then when prompted, enter 3 for the partition number that I wanted changed from Solaris to Solaris2.  Then I chose option 2 and selected partition 3 again so that it became the Active partition. That resulted in the following partition table:

             Total disk size is 24321 cylinders
             Cylinder size is 16065 (512 byte) blocks
                                               Cylinders
      Partition   Status    Type          Start   End   Length    %
     =========   ======    ============  =====   ===   ======   ===
          1                 Other OS          0   888     889      4
          2                 IFS: NTFS       888  8972    8085     33
          3       Active    Solaris2       8973  18270    9298     38
          4                 EXT LBA        18270  24321    6052     25

I selected option 5 to save my changes and exit fdisk and then entered quit to shutdown the format command. I then restarted the installer and the installation worked without any problems.

You might be wondering: What is the deal with the two Partition Type values in fdisk: Solaris and Solaris2? Frankly, I don't even like to use those names because they can cause confusion; I prefer the underlying hexadecimal values: 0x82 (Solaris) and 0xBF (Solaris2). As I mentioned back in Part 1 of this series of blog entries, partition type 0x82 is overloaded since it is used both by older versions of Solaris and for Linux swap partitions.  So the newer 0xBF (which, other than this bug in Ubuntu's installer is not overloaded) is referred to as Solaris2.

At the end of the install process, there is a button to click to reboot the system.  I did not see, however, an option for removing the CD before the reboot.  So the system restarted and I saw the exact same GRUB menu, since the CD is first in the boot order:

The solution is easy enough: select the final entry so that the new GRUB menu that was just installed on the hard disk is displayed.  It will have only one entry; selecting that entry will boot OpenSolaris from the hard disk.

After OpenSolaris starts, there is only one more step to achieve the triple-boot goal: add the necessary entries for the other operating systems to the GRUB menu.lst file.  I was thinking that menu.lst would be in /boot/grub, but examining that file shows that:

#########################################################################
#                                                                       #
# For zfs root, menu.lst has moved to /rpool/boot/grub/menu.lst.        #
#                                                                       #
#########################################################################

Which means that the command I really want to use is:

pfexec gedit /rpool/boot/grub/menu.lst

As I mentioned in Part 2, I saved off the menu.lst file from Ubuntu onto a USB drive so that I could add its entries to my OpenSolaris menu.lst file:

title        Ubuntu 8.04, kernel 2.6.24-18-generic
root        (hd0,4)
kernel        /vmlinuz-2.6.24-18-generic root=UUID=1ed7fa17-6d77-4b49-be1a-22481310fd1b ro quiet splash
initrd        /initrd.img-2.6.24-18-generic
quiet

title        Ubuntu 8.04, kernel 2.6.24-18-generic (recovery mode)
root        (hd0,4)
kernel        /vmlinuz-2.6.24-18-generic root=UUID=1ed7fa17-6d77-4b49-be1a-22481310fd1b ro single
initrd        /initrd.img-2.6.24-18-generic

And then finally, I also added entries for the recovery partition and Windows Vista:

title VAIO Recovery
    rootnoverify (hd0,0)
    chainloader +1

title Windows Vista
    rootnoverify (hd0,1)
    chainloader +1
After saving the menu.lst file, I now have a triple-boot system.  :-)

Note: This article is originally posted at

http://blogs.sun.com/observatory/entry/triple_boot_part_3_install
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值