Disclaimer

The standard disclaimer applies. The document is provided on an "as is" basis. The author provides no warranty whatsoever, either express or implied, regarding the work, including warranties with respect to its merchantability or fitness for any particular purpose. You can easily ruin your hard disk when trying to do something similar to what I am reporting here.

This is a kind of a field report about my (Bernhard Treutwein) experiences with installing a multiboot Solaris 9 on an Intel deskside PC (Fujitsu-Siemens Scenic, P-III 900 MHz, FSC motherboard D1219 with onboard intel 815 graphics and 256 MB main memory) using Grub as a boot manager.

Attention

With the advent of Solaris-10, which uses a modified version of Grub-Legacy, the information given here is somehow outdated. Anyone willing to update it, is invited to do so and send me the updates via mail to btreut (at) lrz (dot) uni-muenchen (dot) de .

Multiboot Solaris

Installing both Operating Systems

The Knoppix Linux distribution is a Debian based distribution, which tries to support actual hardware and booting from CD only. It can easily be installed, if after booting from CD, the shell script /usr/local/bin/knx-hdinstall is executed. The benefit of Knoppix for a multiboot installation is that if anything goes wrong (which is very easy to accomplish with Solaris), you have a full blown Linux rescue system on the Knoppix CD. It asks several questions (including partitioning with cfdisk) and then installs an almost standard Debian on the hard disk. Be cautious to put Linux at the end of the free space of the existing disk. During my first installation, which is already some times ago, I followed somehow the guidelines given in this article. In the meantime there is more information available at the site devoted to solaris-intel. And I found yet some more info here. Beware and think twice, if your BIOS does not support booting from above 8 GBytes, but that is a different story, which does not fit here, but is covered also here. I remember vaguely that I installed Linux to the upper 10GB of a 20GB parition (both Linux root and the swap partition in an extended LBA partition type 0F, see also here), wrote down the partition table, deleted the extended partition, installed Solaris with some precautions that the Solaris partition does not overlap the extended partition and recreated the extended partition by hand.

This time I first deleted two partitions from within Solaris 9 fdisk, but it creates an out-of sequence partition table, so I deleted this awful partition table and recreated the layout from Linux fdisk (booting from a Knoppix CD, since the boot manager was overwritten by Solaris fdisk, yet another beware). I had made backups of the boot records and I was able to restore the main partition table from my MBR backup. After fiddling around several times with the partition table, I decided to go the save way and add another hard disk, dedicated entirely to Solaris. An old 8GB disk was around and I added it as primary slave. The Solaris 9 8/03 installer refused to use this disk, when the primary master was visible in the BIOS, so I set the primary master to none, but kept the slave active. Alas, Solaris 9 accepted to be installed on this disk. I went through the complete installation, Solaris was also able to see the primary master although it was disabled in the BIOS.

Sorrily, maybe temporal coincidence, maybe due to incorrect usage of the ISO9660 patch for GNU Grub, I ruined the 8GB disk, so I had to reinstall Solaris. I disabled the first IDE disk in the BIOS (Phoenix BIOS allows setting to auto, none, user defined, and ZIP, LS120 or similar) and then I started the installation from the DVD. When asked for rebooting, I reenabled the first IDE disk again, which already contained GNU Grub and chainloaded to the bootsector installed by Solaris on the second harddisk (see entry #3 in the example menu.lst below). And alas, Solaris booted up and continued with its installation.

Grub Configuration

Here is my current grub configuration file (menu.lst)

default saved
And alas, Solaris booted up and continued with its installation. fallback 0
timeout 60

title 1. German Layout
configfile /boot/grub/german.txt

title 2. Knoppix from (hd0,5) <-> /dev/hda6
savedefault root (hd0,5)
savedefault kernel /boot/vmlinuz root=/dev/hda6 ro apm=power-off hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi nomce initrd=initrd.gz

title 3. Solaris 9 - 08/03 --- UFS (hd1,0) chainload to disk /dev/hdb
savedefault
rootnoverify (hd1,0)
chainloader (hd1,0)+1

title 4. Restart from (hd0)
chainloader (hd0)+1

title 5. Reboot from floppy
chainloader (fd0)+1

title 6. Reboot
reboot

title 6. Solaris 9 - 12/02 --- UFS (hd0,0) <-> /dev/hda1 (chainload to saved mbr)
rootnoverify (hd0,0)
chainloader (hd0,5)/boot/grub/Solaris_9_12-02/mbr-Solaris

Some remarks:

  1. See at bottom of my notes. This is particularily nice if you want to edit some parameters of other entries.
  2. The parameters for this entry are copied from the syslinux rescue floppy created during the HD installation of Knoppix.
  3. This loads the Solaris boot manager from the second hard disk. I do not know what exactly rootnoverify (hdx,y) does, but it seems to be necessary for Solaris to boot correctly. It might be possible to boot directly the Solaris secondary bootstrap strap.com but I do not yet know how.
  4. Reload the hard disk's MBR.
  5. This entry is nice if you have disbled the floppy boot in the BIOS, but sometimes you want/have to boot a floppy.
  6. Do a cold reboot.
  7. This shows a nice feature of Grub. You can have a saved master boot record in a file and ask Grub to chainload it. It works like the BIOS would call the bootstrap code in a MBR, but reads that code from the specified file.

DHCP and a MS-Windows Dynamic (?) DHCP Server

MicroSoft Windows DHCP/DNS server alows a client to update DNS with the DHCP client's hostname. To get this working with a Solaris client, I had to do the following (maybe some of it is not essentially necessary, but it worked for me only after having done all steps):

For setting the own hostname and getting DHCP working correctly, it was necessary to refer to the following tip and the script contrary to what is said on the tip page, I added my hostname in hostname.iprb0 prefixed by inet. In /etc/default/dhcpagent I uncommented/changed the line containing REQUEST_HOSTNAME=yes. I have no idea, why registering a hostname in DNS via DHCP is called request a host name, but ...

Mounting Linux ext2fs Partitions in Solaris

An ext2fs driver for Solaris 9 can be found at the bottom of Paul Floyd's software page. It is (thanks Paul) ready compiled; after unpacking the archive, simply say ./getext2fs (as root) and then you are able to read-only mount an ext2fs partition. with mount -r -F ext2fs "device" "mountpoint". My third primary partition on the primary master disk is mounted by
mount -r -F ext2fs /dev/dsk/c0d0p3 /linux

Mounting Solaris Partitions in Linux

Linux can read Solaris slices in Linux partitions. I found the Solaris slices by grepping dmesg for the string "solaris" yields a list of the Solaris slices and the corresponding partition numbers in Linux, i.e.

# dmesg | grep solaris
p2: <solaris: [s0] p5 [s1] p6 [s2] p7 [s6] p8 [s7] p9 >
which can be read as the following correspondence table (given these partitions are on /dev/hda):
slice partition
s0 /dev/hda5
s1 /dev/hda6
s2 /dev/hda7
s6 /dev/hda8
s7 /dev/hda9
And with a mount -t ufs /dev/hda5 /mnt/sol/root the root file system of Solaris is available under the mount point /mnt/sol/root. Analogue mount for the other slices work also, if the slices aren't swap and hav a valid UFS filesystem on it.