Posted by lildude on 31 May 2007
Once upon a time I let it be known that I'd done a fair bit of "playing" with Linux and as a result I attended a RedHat training course. As a result of this, I've been given the task of being one of the primary x86/x64 engineers in the UK solution centre. With this responsibility came a lovely new Ultra 20 to keep my feet warm and the requirement that I need to be able to offer assistance in supporting all the *NIX varieties that Sun supports on it's hardware.
Well, never put off my a new opportunity and a chance to
play with learn something new, I gratefully accepted the Ultra 20 and set myself the task of installing RedHat Enterprise Linux, SuSE Linux Enterprise Server, Solaris 10 and Nevada onto the same disk on the same machine.
I can happily report, I've done this now and thought I'd share my method.
First, the partition/slice table. As we're installing several operating systems on the one disk, we need to do a bit of planning. What's more, the current Solaris and OpenSolaris installer will only allow one Solaris partition (primary or extended) per disk. You can actually cheat and work around this using GRUB to change the partition types on the fly, but I haven't gone this route.
This is what I've gone for:
|Part #||Size||Type||Mount Point||Notes|
|This will be the root partition for RHEL|
|2||50G||UFS||s0 - Sol 10 (10G)|
s1 - Swap (2G)
s3 - Nevada (10G)
s4 - ABE (10G)
s5 - ZFS (4G)
s6 - ZFS (4G)
s7 - /export (10G)
|s1 will be used by Linux for SWAP too [#]|
s3/4 are interchangeable and will be used for LiveUpgrading Nevada and Solaris 10
s5/6 are so I can play with ZFS without affecting my OS or data
s7 will be for Solaris specific apps needed on both Solaris and Nevada
|3||20G||ReiserFS||/ (SLES)||I've stuck with the default filesystem for SLES|
|5||10G||FAT32||/mnt/data||This gives me a partition I can mount on ALL of the operating systems on this machine. I use it to store all host config info to start off with.|
|6||50G||TBA||TBA||This is a scratch partition that can be used by any OS for any reason. It can be formatted with any filesystem as and when it's needed. I only envision this being used for things like testing other operating systems and other OS functionality.|
Whilst the installation isn't too important, I found the following to be the easiest method and removed the need to reload boot blocks or re-install GRUB. Ultimately, as Nevada will be my primary OS, I'll use Nevada's GRUB.
Once the OS has been installed, there is one thing you need to do - change your
/etc/fstab so partitions are mounted by device name and number and not label. ie replace
LABEL=/ with the correct
/dev/sd?# device. This is needed as only RedHat seems to use the labels, and if they are overwritten later (by SLES or Solaris), then RedHat will still boot correctly.
Once the OS is installed and booted, I did the following to ease the next few steps:
Once the OS was installed I added the RHEL and SLES grub entries into Nevada's
/boot/grub/menu.lst from the file I copied earlier to
Linux Using the Solaris SWAP slice:
Now you may be curious to know how Linux is going to be able to use the Solaris swap slice for it's own swap partition.
Well, when Linux creates the devices for each partition, it will detect the presence of the Solaris fdisk partition table on partition 2, and will process this too and create the appropriate devices. The pseudo-partition numbers start immediately after the last physical partition. This can be seen in
/var/log/messages or the
dmesg output with lines that look similar to this (your output may differ):
sda: sda1 sda2 sda3 < sda5 sda6 sda7 >
sda2: <solaris: [s0] sda8 [s1] sda9 [s2] sda10 [s3] sda11 [s4] sda12 [s5] sda13 [s6] sda14 [s7] sda15 >
You can now add the appropriate entry to your /etc/fstab file.
One more hurdle though - to use it as Linux swap, it must be properly formatted. Run a mkswap from the Linux side to format the swap partition. Fortunately Solaris skips over the header so it won't get mangled.
As you're multibooting, each OS will have a different SSH host key. This plays havoc with your known_hosts file, so to ease ssh connections, copy the /etc/ssh/ssh_host_*_key* from one of the operating systems to /etc/ssh/ on each of the other operating systems installed.
As part of my configuration, I export a filesystem for access from remote systems. Unfortunately, the NFSv4 implementation on Linux is just plain wrong and causes havoc with the Solaris automounter. Accordingly, I had to disable NFSv4 on RHEL and SLES.
Of course we need some screenshots too. I personally think the SLES desktop is the cleanest and most pleasing on the eye with Nevada coming in a close 2nd. Solaris 10 is horrible.