![]() | ![]() |
|
Linux+Solaris HOWTOMax Bergerv0.8-$Revision: 1.1 $, $Date: 2000/04/17 23:48:03 $Describes how to use Linux (x86) and Solaris (x86) together on one machine
1. Introduction
2. Preparing your Hard Drive
3. Preparing Linux
4. Installing Solaris
5. Boot managing
6. Sharing data
7. Running foreign binariesAppendix
8. Finding additional info
9. Credits and legal stuff1. Introduction1.1 Why Solaris?This is actually a good question. Why use Solaris, when you can have Linux? Solaris is a commercial system, the hardware support is scarce. But if you are reading this you have probably already decided on using Solaris. If not, here are some reasons:
1.2 Things covered in this HOWTOThis HOWTO tries to help you install Solaris 7 or 8 on an x86 computer already running Linux. The main targets are
1.3 Referenced versionsThe reference versions used while creating this document where:
1.4 WarningPlease back up any data before messing with your system! A lot of the things described in this document may result in excessive data loss! I am not responsible for any data loss! See also section Legal stuff 2. Preparing your Hard DriveTo Prepare your hard-drive for Solaris, you need to know about standard PC partition tables and about Solaris disk slices. In this HOWTO I talk about single-disk systems only, but all the information should also apply to a multi-disk environment. 2.1 Traditional PC partitionsThe standard partition-table has only 4 entries. The entries important for us are the following:
fdisk program. Partitions numbers 1 to 4
(hda1 ..4 , sda1 ..4 , ...) are the ones
in your partition table.
2.2 Solaris partition labelsSolaris has its own partitioning scheme. It uses one entry in the partition table, and this entry is and acts as this partition would be the entire disk. This virtual disk is then divided in up to 8 slices. The third slice, s2, covers the whole virtual disk, so you actually have up to 7 slices for Solaris. Unfortunately, the Solaris partition entry has the same type as a Linux Swap partition (82). Therefore, you should not have any Linux swap partitions as primary partitions. Linux doesn't care about this, but who knows what Solaris does? Although the Linux fdisk program has some ``Sun disklabel'' support, this doesn't seem to help any. 2.3 Hard disk spaceOf course, Solaris needs disk space. The minimum installation of Solaris 8 is about 300 MB. For the normal tools its about 700 MB, and for a ``developer-system'' about 1 GB. But this is only the space required for the base installation. You might want to add a lot of GNU-Tools, and other stuff. And if you want to share data between Solaris and Linux, this has to happen on the Solaris partitions. You might even think of sharing your home directories between Solaris and Linux. As the time of this writing: Forget it! I messed up my home directory doing so and I was very happy about my backup. See also section sharing data 2.4 Quick check listHere's the quick check list. Make sure you:
3. Preparing Linux3.1 Building a new kernelSome people donīt like building a custom kernel. For those of you: you must build your own kernel if you want to share data between Solaris and Linux on one hard disk. If, however, you do not want to share data, you are safe with your old kernel. Here are your kernel options for ``Solaris compatibility'':
3.2 Preparing your boot loaderBefore messing with your boot loader, please make sure that you have an emergency disk ready which enables you to boot your old system. Unfortunately the Solaris install overwrites the master boot record (MBR) and overwrites your old boot manager. Fortunately, the Solaris boot manager is able to chain-boot. For this to work you have to put your old boot loader (e.g. lilo) into the boot sector of one primary Linux partition. For lilo this means: look at your
/etc/lilo.conf. Look for the A way to check if your boot-loader is chain-loadable is installing lilo in to the MBR and trying to chain load your other boot-manager. I used the following file called lilo.conf.mbr for this: #lilo.conf.mbr #Lilo in Master Boot Record doing nothing but chain-loading another lilo boot=/dev/hda root=/dev/hda5 install=/boot/boot.b map=/boot/map vga=ask delay=50 other=/dev/hda1 label=lilochain You can then run lilo -C lilo.conf.mbr to install lilo into your
MBR. And donīt forget to run lilo to have lilo in
the boot sector of your hard-drive.
If you reboot
now, you should have a lilo-prompt. When you select 4. Installing Solaris4.1 Solaris interactive
Please Note: If you abort during the Solaris installation, the MBR of your hard disk may already be overwritten and you may not be able to boot from the hard disk at all. 4.2 Web-StartI couldn't get Web-Start to work at all. Please mail me if you have any experience using it. However, once Solaris was installed, I had no problems adding web-start-packages 4.3 Getting GNU-toolsSolaris standard installation doesn't even have a
5. Boot managing5.1 Using the Solaris boot managerWhen booting, the Solaris boot manager gives you all 4 primary partitions for choosing which to boot from. If you had your boot loader installed on the boot sector of a primary partition, everything should be fine. Just boot from this partition, and Linux should come up. 5.2 Using liloNow you have lilo as a secondary boot loader, but you want
it to be your primary boot loader again? No Problem. Lilo
can easily chain boot Solaris. Just add the appropriate
For testing, you should add the Solaris chain loading to the lilo in your boot sector first. Then try chain loading lilo, Solaris, lilo, Solaris, ... until you have enough of it. If this works, you should be able to put lilo back into the MBR again. However, Solaris might have messed up your partition table. This has happened on my system after installation of Solaris 8. Lilo doesn't like the new partition, nor does fdisk. I had no problems with Solaris 7 5.3 Using grubUnfortunately, I have no experience with grub booting Solaris. If you do, please mail me! 6. Sharing data6.1 Using a shared partitionIf you have build your kernel with Sun disk label support and UFS support as mentioned in section building your new kernel, you are now able to mount your Solaris partitions. During boot up, you should get something similar to: hda: [PTBL] [523/255/63] hda1 hda2 < hda5 hda6 hda7 hda8 > hda3 <Polaris: [s0] hda9 [s1] hda10 [s2] hda11 [s3] hda12 [s6] hda13 [s7] hda14 >Meaning (in this case): partition 3 ( hda3 ) is a
Solaris partition with 6 slices (s0,s1,s2,s3,s6,s7). They
are mapped to Linux devices hda9 to hda14 .
Try mounting your Solaris
partitions. When mounting UFS partitions, you always have to
add an mount -oufstype=sunx86 /dev/hda14 /mntNow, test your partition. Please note: The write support on UFS partitions is very experimental. Please don't trust any data you write on your UFS partitions! If you want your Solaris partitions automatically mounted at boot time, you can add a line like /dev/hda14 /solaris ufs ufstype=sunx86 0 0to your /etc/fstab 6.2 Alternative waysAnd, of course there are always other ways of sharing data:
7. Running foreign binaries7.1 Linux binaries on SolarisIs supposed to work using a program called ``lxrun''. I haven't got around to testing it yet. See the Solaris web site for more information. 7.2 Solaris binaries on LinuxAre as far as I know unsupported 8. Finding additional infoHere are some URI that might help you:
9. Credits and legal stuff9.1 CreditsThanks to Marcel Meyer for beta testing this HOWTO while installing Solaris on his machine 9.2 Questions, comments, suggestionsAre always welcome. You can reach me via e-mail at max.berger@xslt.de 9.3 LicenseThis document is copyrighted © by Max Berger. You may use and/or modify it according to the Linux Documentation Project License (LDPL) found at http://www.linuxdoc.org/COPYRIGHT.html. According to the license you don't have to tell me, but I'd very much like to know when you modify and/or republish this document. Although the information given in this document is believed to be correct, the author will accept no liability for the content of this document. Use the tips and examples given herein at your own risk. |
![]() |