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.

The Partition Table

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
1 20G EXT3 / (RHEL)
/mnt/redhat (SLES)
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
4 60G Extended Partition
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.

The Installation Order

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.

  1. Install RHEL 4u4 and create the basic partition table (as above). It doesn’t matter what filesystems you use for partitions 2 and 6 as we can reformat these later. Select EXT3 for partition 3 - this isn’t too important though as the SLES installer will reformat it later.

    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.

  2. Install SLES 10 onto partition 3 - reformatted to ReiserFS - as this is the desired default for SLES 10.

    Once the OS is installed and booted, I did the following to ease the next few steps:

    • changed the partition type for partition 2 to “be” using fdisk (# fdisk /dev/sda > t > 2 > be > w). This is needed so the Solaris 10 installer can find the Solaris partition.
    • copied /boot/grub/menu.lst to /mnt/data - I need this for Nevada as it won’t pick up the Linux partitions automatically like Linux does.
  3. Install Solaris 10 11/06 (update 3) onto partition 2. As part of the installation, slice up the partition as specified above. To get the installer to install into partition 2, I needed to use one of the “text” options as the graphical installer wouldn’t play ball nicely. The text options also give you a lot more freedom with your settings.
  4. Install Nevada onto partition 2, slice 3. Be sure to preserve all other slices.

    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 /mnt/data.

Additional Notes

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.

Easy SSH:

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.

Problematic NFSv4:

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.

Screenshots

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.

RHEL 4 update 4SLES 10Solaris 10 11/06Nevada Build 64

2 Responses to “HOWTO: Multi-boot Solaris, RHEL, SLES and Nevada”  

  1. 1 Dean Russell

    Hi Lildude,

    I have been trying, did I say TRYING, to setup a dualboot install on a single disk in a X2200. The OSs are SLES 10 SP1 x86-64 RC5, installed first via AutoYast and Sol10 x86 update5 build6. The problem I am creating (I say I because I am the only one doing this and there is really no one else to blame) is after SLES goes in first, just fine by the way…boots and everything, the follow up Sol10×86 install fails due to the disk not being found/correct/addressed in /dev/rdsk. Sigh! The fdisk under SLES shows /dev/sda2 as type BE and the fdisk under Sol10 shows the disk as Solaris Boot (even though it does not grace one with a hex or a decimal type). Did I say SIGH yet?

    Steps being taken:
    1) create SLES install with AutoYast, edit XML to add partition type of 190 (hex BE) for partition 2
    # fdisk -l

    Disk /dev/sda: 250.0 GB, 250056000000 bytes
    255 heads, 63 sectors/track, 30400 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes

    Device Boot Start End Blocks Id System
    /dev/sda1 1 7 56196 12 Compaq diagnostics
    /dev/sda2 8 13062 104864287+ be Solaris boot
    /dev/sda3 13063 30400 139267485 f W95 Ext’d (LBA)
    /dev/sda5 13063 13193 1052226 83 Linux
    /dev/sda6 13194 26248 104864256 83 Linux
    /dev/sda7 26249 27292 8385898+ 82 Linux swap / Solaris

    2) commonsense with SLES install, looks good so far (remember the boots and everything)
    3) attempt to run jumpstart to install Sol10×86, starts to install but fails on the boot disk that is specified
    Begin script install_begin execution completed.

    ERROR: Field 2 - Invalid disk name (c1d0p2)
    Solaris installation program exited.
    #

    format only sees c1d0, it does not see and partitions like c1d0p2 and the slices in the /dev/rdsk/c1d0s2 don’t point to anything real.
    Furthermore, any profile with c1d0px fails the check script in jumpstart. sigh.

    I know this is a lot of partial information, there is more where that came from. Do you have any suggestions on how to get Solaris and SuSE to play nicely with each other during an automated install via Yast and Jumpstart?

    Thanks in advance and as always, cheers,

    Dean Russell
    [Ed: Removing contact info for your own protection ;-) ]

  2. 2 Colin

    Hi Dean

    I think you’ve incorrectly specified your boot_device setting. Try leaving off the p# part. The Solaris installer will only find the one partition, so it’ll only install on that partition.

    See http://docs.sun.com/app/docs/doc/820-4042/preparecustom-113?l=en&a=view for more details.

    Cheers,
    Colin

Speak Your Mind    cocomment icon