Installing Gentoo Linux on dual boot Windoze / Redhat Linux box
Tri Boot: Gentoo, RedHat 7.3, Windows XP sp2
Installing and Configuring the A.M.P platform (Apache - MySQL - [PHP, PERL, Python]) on Gentoo Linux
By: Ben Strawbridge
Revision 1 started: 2/27/2004
I'm not sure, I might be crazy, but I'm going to go for it anyway. My current system is dual boot with my primary OS being RedHat Linux 7.3, and Windows being required... just because there are certain things that are still easier to do in Windows.
Why Tri-Boot a laptop?
The reason I am doing this is because I have a bunch of applications that I use frequently, as well as source code in my RedHat installation, however during the past 6 months - 1 year I have basically stopped using RedHat and switched to Gentoo Linux. So I want to keep RedHat - ultimately I'll wipe it, but for now I need it there as an option. In todays business climate it is an unfortunate fact that windows is basically required. I don't use it very often, but from time to time somebody will want me to do something or go to some website that is platform independent to windows; thus I keep Windows installed - plus I did pay for it when I bought my laptop, so I may as well use it.
Free space from current partitions
The first step is to set up the drive. My laptop has a single hard disk, with 60gb of space. My current configuration has 4 partitions - 1 NTFS ~35gb, /boot ~50mb, /~20gb and Linux Swap of ~1gb. I am going to use a piece of proprietary software - PowerQuest PartitionMagic 8.0 - to rebuild my partition tables.
I believe the swap space can be configured to be used by both RedHat and Gentoo, especially considering that they will not be using it together ever. I will leave that partition as is. Next I will use the Resize a partition tool to extract the free space from my Windows XP and RedHat partitions. I keep /boot and swap as they are. I'm not going to create any new partitions with partition magic, as the tools provided by the Gentoo installation are easier for me to work with for creating linux partitions - (I use the Reiser File System with Linux and it is not even available in Partition Magic).
Resizing the partitions is a bit scary. You click apply, and reboot (I had to manually reboot - Partition Magic didn't do it for me). It then runs a dos batch script which takes quite a while ~2 hrs for my system.
I don't intend to recreate a Gentoo installation guide. That is one of my favorite aspects of Gentoo, they have excellent documentation. Here is a link to the installation guide that I am using for this installation, From here on out I will describe some specifics to my system, as well as hitches I had to work around in the installation instructions to get my system up and running.
Get the distribution
The CD I used for installation is the Gentoo LiveCD. This option ensures that your system will have the most up to date packages, as they are pulled from the internet, however it does require a fast connection to the internet - so if you don't have a connection to the internet, or you have a slow connection you should consider using one of the stage cd's.
Start SSHD and set a root password
After booting into the live cd, (i used gentoo dopcmia for my boot options) you will need to start sshd and create a root password (so you can do this from a machine that is more comfortable to work on, via ssh).
# /etc/init.d/sshd start (start ssh dameon)
# /sbin/ifconfig (find out your ip address, and make sure the networking autoconfigured itself.
Create new Partitions
Using fdisc, i created 2 new extended partitions - one for boot at 50 MB, and the other as the root partition with all remaining disc space. Since this is my laptop and I have a fileserver on my network I am not creating any additional data partitions - this is often a good idea though if you like to keep things seperate from the OS. Here is what my partition layout looks like after the reconfiguration:
255 heads, 63 sectors/track, 7296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 2912 23390608+ 7 HPFS/NTFS
/dev/hda2 2913 2918 48195 83 Linux
/dev/hda3 2919 4999 16715632+ 83 Linux
/dev/hda4 5000 7296 18450652+ f Win95 Ext'd (LBA)
/dev/hda5 5000 5129 1044193+ 82 Linux swap
/dev/hda6 5130 5136 56196 83 Linux
/dev/hda7 5137 7296 17350168+ 83 Linux
Get the most recent stage tarball
I just use stage 3 to install. Though I am a bit curious about the process of installing from a stage 1 tar ball, I assume the compiling will take a very very long time (from what I have read of other folks experiences). Rather than using the stage tarball on the livecd, I choose to download one from the mirrors. This should give me a more recent set of packages so that my first emerge world won't take forever.
Configuring Compile options
I followed the steps in the gentoo guide exactly for this section. The first step of installing the Gentoo Base System caused an error for me. mirrorselect didn't work properly and appended some lines to my /etc/make.conf file. After removing them I was able to chroot in.
The next steps were fine following the instructions. I choose the gaming-sources. I choose them because, for 1, I like gaming, but they are also very high performance sources optimized for heavy graphics and sound.
As with the choice of stage, here I am leaning towards convenience and speed of installation, rather than towards pure customization. In this case I will forgo manual kernel configuration in favor of the genkernel script, provided by Gentoo. I have used this in the past, and for x86 architecture it is quite reliable.
OK ... genkernel all takes a long time. It has been 5 hours so far. Maybe a custom configuration would work better.