Linux and Solaris

Support knowledgebase (smt_solaris)
Applies to

Kernel: Versions since 2.2

Request:

How can I install both Linux and Solaris (7) on one machine.

Procedure:

There are some things you have keep in mind if you install both operating systems to avoid problems or even data loss.

You should make a backup of all your data just like with every other installation.

  1. Since Kernel 2.1.x and 2.2.x Linux is able to detect solaris slices. This starts with SuSE Linux 6.1. So the kernel can detect them during boot, e.g.:
    Partition check:
     sda: sda1 
     sdb: sdb1 sdb2 sdb3 sdb4
    
    The kernel assign slices to logical drives, as if it was an extended partition - but this doesn't apply to fdisk and YaST!. So it kann happen that you select the wrong partition.
  2. Solaris uses for data partitions the same partition ID like Linux for swap partitions. Therefore you have to be careful when selecting the partitions with both Linux and Solaris. But you can temporarily (while you install solaris) assign a different ID for Linux swap. If the swap partition is listed in /etc/fstab it is known to the kernel and can then be temporarily changed with fdisk.
  3. Unfortunately like it always happens on PCs solaris and Linux may use different geometries for the hard drives. The following message will be printed by the kernel if solaris changed the partition table:
    Partition X does not end on cylinder boundary: should be (A, B, C)
    
To work around these problems you should use two different hard drives for each operating system, while solaris should be installed on the first drive on the first primary partition. This partition should be created with fdisk under Linux and marked as active because of the geometry. So this partition has only be specified under solaris.

Before you install you are well advised to also make a backup of the Master Boot Record (MBR). This can be done with:

dd if=/dev/sda of=MBR_saved bs=512 count=1
so that you can recover it in case of possible problems.

Solaris writes a new MBR during installation and overwrites LILO. Therefore LILO has to be reinstalled - with an entry for solaris.

Since solaris is on an active, primary partition you can boot it like a DOS partition with LILO (probably with most other boot managers). This is a sample /etc/lilo:

boot=/dev/sda
backup=/boot/mbr_sda.old   # create a backup of MBR
#compact                   # faster, but won't work on all systems.
#linear
read-only
prompt
timeout=100
vga = normal               # force sane state
#########################
image = /boot/vmlinuz
  root = /dev/sdb1
  label = Linux
#
other = /dev/sda1
  table = /dev/sda
  label = Solaris

Keywords: SOLARIS, INSTALLATION, FDISK, LILO PARTITIONS

SDB-smt_solaris, Copyright SuSE Linux AG, Nürnberg, Germany - Version: 07. Jul 2000
SuSE Linux AG - Last generated: 07. Jul 2000 by snbarth (sdb_gen 1.40.0)