Triple-Boot OS Project
by Justin Metcalfe
Introduction..
This document was written to describe a project that I did
for my CS121 (Unix) class. In the beginning, I set out to
install and evaluate three different Unix or Unix-like operating
systems. I decided to chose a linux, a bsd, and a more commercial
unix os. In the end I decided upon Gentoo Linux, FreeBSD-5.3RELEASE,
and Solarix 10. My reasons for these choices are rather simple. I
already have a great deal of Gentoo experience, FreeBSD is, I believe,
the most popular BSD distro, and Solaris 10 is now free for personal use.
During this experiment, I documented the installation procedure, along with
certain evaluations once the OS was actually installed. I figured it would be
useful for me to document just how easy it was to get things running
after the initial installation. I'll be using grub for a bootloading and it's
going to be installed on Gentoo. I'm not exactly sure what else to say here, so
I'm just going to jump right in..
Gentoo..
Background» Gentoo Linux
is an increasingly-popular linux distribution for several reasons.
It is a from-source distribution, where everything is
compiled from source instead of using binary packages like most other
Linux distributions. The current release version is 2004.3, which is what
I am using for this experiment. Gentoo also has two "mini-distributions", I guess
you could call them. They're almost just like Debian's three, stable, testing, and unstable.
On a x86 machine, you have two options: x86, and ~x86 (unstable.). I've never had a problem
using ~x86, so that's what i'm going to use for this. Many other CPU architectures are
also supported, but I don't have any non-x86 CPUs so they aren't going to be covered in this doc.
Installation» The installation procedure is, in my opinion, rather unique. Instead
of getting a little menu to do everything from, you download and burn a gentoo LiveCD. After you
boot this baby up, it just drops you to a bash shell where you must do everything by hand. Although this
can be intimidating, just imagine the control and power you have over the installation. Luckily,
documentation
is very readily available. Anyway, I guess I should continue to the actual installation procedure, eh?
After booting, all your hardware should be identified and the proper kernel modules loaded. The first step
should be the partitioning. The docs do things a little bit differently than I do, but it's really
personal choice. Instead of fdisk, I use cfdisk (it's curses, so it has a little menu). Running
cfdisk /dev/sda (or /dev/hda, usually, since most people use IDE. For the rest
of this doc, just replace sda with hda if you're using IDE) will present you with a menu that you can use to
partition your harddrives. For this, we're just going to do the minimum of two partitions. The first partition
will be the linux data partition, and second will be the linux swap partition. Since I'm going to be installing three
OSs on a 120gb harddrive, i made my linux partition 60gigs with a 1gig swap partition. Now that you've done the partitioning,
write the partition table and quit cfdisk. Now that the partitions exist, formatting is needed. The docs say that you
should use ReiserFS for the root, but I like ext3, so let's just use that. Format the root partition with the command
mke2fs -j /dev/sda1. The swap partition also needs to be formatted, so now run
mkswap /dev/sda2. Since the swap partition now exists, lets tell the livecd to actually use it by running:
swapon /dev/sda2. Gentoo installations take place in 3 stages, stage1 involves bootstrapping
your compilers and such, stage2 includes the compilation of the basic system utilities, and stage3 is everything else. Since
I'm lazy and impatient, we're going to do a stage3 install. Before we can write to our newly-created root partition, we have
to mount it so let's do that: mount /dev/sda1 /mnt/gentoo. Now, download the stagefile:
cd /mnt/gentoo && wget http://gentoo.osuosl.org/releases/x86/2004.3/stages/athlon-xp/stage3-athlon-xp-2004.3.tar.bz2.
(Note: If you don't have an athlon-xp processor, this isn't the right stagefile for you. Look at the gentoo mirror site for a mirror that
contains the correct stagefile for your cpu.). Next comes extracting the stagefile, which is as simple as
tar xpvjf /mnt/gentoo/stage3*. Now that it's been extracted, you can go ahead and delete the stagefile with a simple
rm -f /mnt/gentoo/stage3-athlon-xp-2004.3.tar.bz2. Copy your DNS information from the livecd's ramdisk
to your root partition with cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf.
The rest of the install takes in a chroot environment, so let's set that up. I'm getting tired of writing individual
commands, so we'll mount a proc and chroot at the same time: mount -t proc none /mnt/gentoo/proc && chroot /mnt/gentoo.
Now that we're in the chroot environment, we need to change some variables so run env-update && source /etc/profile.
Now we need to grab our portage tree, so type emerge sync and wait a while. Since gentoo loves
customizability, edit /etc/make.conf to have the settings you like. Lots of stuff can be changed here
including CFLAGS, if you want to use ~x86, and things like that. If you decided to use ~x86 like i did, some of the stuff
from the stagefile isn't as new as it could be. This next step usually takes a few hours, so if I were you, I'd take
a nap. Updating every existing package to the newest version is as simple as typing emerge -uvD world.
The next morning, you're ready to continue with a completely updated system. The next step is to edit your /etc/fstab to
contain the correct information. You're provided with a skeleton file so it isn't too hard to figure out the syntax.
Now it's time to get a kernel. Since I like fast machines, we're going to use the CK kernel patchset. Go ahead and
grab the sources by typing emerge ck-sources. It's time for manliness to come into play.
Go ahead and config and compile your kernel with the following command: cd /usr/src/linux && make menuconfig && make && make modules_install.
After the kernel is made, copy it to your boot directory so it's in a nice place: cp arch/i386/boot/bzImage /boot/kernel-<kernelversion>
. Now we need to grab our logger, cron daemon, and probably hotplug: emerge syslog-ng vixie-cron hotplug.
After they're done compiling and installing, it'd be nice if they started with the boot, right? To do this type:
rc-update add syslog-ng default; rc-update add vixie-cron default; rc-update add hotplug default.
We now have a base system compiled and ready. All that's left now is a little bit of configuring. Set the root
password by running passwd and setting the password. Since running as root is never a good
idea, add another user and set it's password with the following command: useradd your_user -m -G users,wheel,audio -s /bin/bash && passwd your_user
We're so close to being done, it's scary. Set your hostname: echo mymachine > /etc/hostname.
Edit /etc/conf.d/net and then run rc-update add net.eth0 default so that we have ethernet
at boot. Now that the real installation is done, we need a bootloader. I'm rather fond of grub, so lets
use that. Compile it by running emerge grub and read through man grub
for information about how to install it. With grub installed, we're ready to reboot. Exit the chroot and unmount
/mnt/gentoo/proc and /mnt/gentoo. Rebooting with shutdown -r now will reboot your computer.
If you remember to take the cd out as it reboots, it should boot into your newly installed gentoo system.
Usage» After that long, arduous install, we now have a base gentoo
system running. As root, new programs can be installed using the emerge
command. Xorg and all its dependencies can be installed as easily as emerge xorg.
Oh, I should probably mention that the package management system in gentoo is called 'portage' and is
based off the idea of BSD's 'ports' package management system. The entire system seems pretty fast and stable
and has managed to keep an uptime of 3 days so far. Evaluation» Gentoo's installation is definitely not an easy process, especially
if you're a newbie to the linux world. If you have a decent amount of time and/or knowledge, however,
you can probably figure it out without problems. The wealth of documentation is also a big helper.
From source-distrobutions take a long time to install things, but the benefits in speed and stability
definitely make up for that. In fact, I'm typing this on the very same gentoo system I installed for
this project.
Overall:
- Ease of Installation: 3/10
- Control of Install: 10/10
- Ease of Use: 7/10
- Available install documentation: 10/10
- Available usage documentation: 8/10
FreeBSD..
Background» FreeBSD is
a free distribution of the Berkley Software Distribution of Unix. It doesn't seem to have quite
the cult following that Linux does, but it still remains very popular, especially on internet webservers.
The release of FreeBSD that I'm going to be using is FreeBSD-5.3RELEASE.
Installation» The FreeBSD installation is _much_ simpler/quicker than that of Gentoo.
I went ahead and decided to use a net-install cd because I don't like downloading a bunch of
packages that aren't going to be close to new. Upon booting, you'll be presented with what
looks like a curses-based menu. This will make things easy, don't you think? The installation
is as simple as hitting enter, filling in the required information, and hitting enter again. Documentation
is readily available on the cd. I'd like to warn you, however, because I did run into a problem. During
the installation, I was asked to choose a mirror. Apparently, the mirror I chose was missing a file
that I needed, so I was presented with an error informing me of this. I'd hit ok, and it'd try again
on the same mirror. It gets stuck in a little infinite loop which required me to hard-reboot and
start the installation over. During the install, a decent amount of choice in what is going to be installed
is given. To save time, I just chose the "X-User" package set (It contains normal end user packages, including Xorg).
After it grabs and installs all the packages, it allows you to configure the system before you reboot. Since we're
doing a triple-boot system, make sure you chose to leave the MBR alone so that you don't kill grub. After
the FreeBSD installation is complete, it will be needed to boot into gentoo and edit the grub config to allow you
to boot the new FreeBSD install.
Usage» Using FreeBSD is pretty much just like using Linux. I had some time to play
with the ports system, which was amusing. I can definitely see why the Gentoo guy chose ports
to base portage off of. In ports, you just cd to the right directory in /usr/ports and type "make build"
and it builds it and its dependencies for you. I couldn't really think of what I wanted to do, so I
didn't really do anything uber-special when I was running FreeBSD. Stability very central to the
goals of the FreeBSD developers. It didn't seem nearly as fast as Gentoo, but I was using mostly
unoptimized, binary packages, so how could it be as fast?
Evaluation» FreeBSD's installation was a breeze, especially compared Gentoo. If you did,
however, run into a problem, documentation is available. Working in FreeBSD is rather simple too.
It seems to perform decently, but seems to have rock-solid stability. This must be why
it is a popular server operating system. I did, however, have to dig around a little bit on their
website to
Teh List:
- Ease of Installation: 7/10
- Control of Install: 5/10
- Ease of Use: 7/10
- Available install documentation: 8/10
- Available usage documentation: 6/10
Solaris..
This is going to be very simple. Solaris 10 sucks. I have a pretty normal system, but for some
reason the installation crashed randomly with no error messages everytime I tried. Plus, before
it would crash, the install seemed _very_ slow and laggy. It kept telling me I was having a
floppy drive error, even though there is no floppy drive in my computer. In my opinion, I think
Solaris 10 should be avoided at all costs unless you're using a SPARC.