Gentoo Linux 1.1a PPP Installation Instructions
First and foremost, you need to download, and burn to a blank CD-R, the Gentoo Linux 1.1a Stage3 ISO:
The ISO image is about 130Mb, and contains the same packages as the 16Mb ISO, plus a pre-built i686 base system. The Stage3 ISO requires a Pentium Pro or greater processor (K6 won't work). If you have an i686+ system, you should be fine.
You will also need some packages copied onto floppies, or burnt onto a CD.
The first is a System Logging Daemon. The three choices we have are:
The second is a Cron. The three choices we have are:
The third is a set of packages for our Internet Connection. You will need the following packages copied onto a floppy:
Once you've burnt the Stage3 ISO onto a CD, go ahead and boot it. You'll be greeted with a bunch of text and a boot: prompt at the bottom of the screen. At this prompt, hit enter, and Linux will begin to load from the CD.
Next, you'll be greeted with a small list of commands available on the boot CD, including nano (a pico editor clone) and instructions for setting up the network. Then, you'll be prompted to select your preferred keymap, followed by PCI autodection. The PCI autodetection process will automatically load the appropriate kernel modules for many popular PCI SCSI and ethernet devices. After this, you can hit enter to enter the minimal boot CD Linux environment. You should have a root ("#") prompt on the current console, and can also open new consoles by typing alt-f2, alt-f3, etc and then hitting enter.
Now, it's time to create the /etc/resolv.conf file so that name resolution (finding Web/FTP sites by name, rather than just by IP address) will work.
Here's a template to follow for creating your /etc/resolv.conf file:
Replace 10.0.0.1 and 10.0.0.2 with the IP addresses of your primary and secondary DNS servers respectively.
4.Set Up Partitions
Here's a quick overview of the standard Gentoo Linux partition layout. We're going to create at least three partitions: a swap partition, a root partition (to hold the bulk of Gentoo Linux), and a special boot partition. The boot partition is designed to hold GRUB boot loader information as well as your Linux kernel(s). The boot partition gives us a safe place to store everything related to booting Linux. During normal day-to-day Gentoo Linux use, your boot partition should remain unmounted. This prevents your kernel from being made unavailable to GRUB (due to filesystem corruption) in the event of a system crash, preventing the chicken-and-egg problem where GRUB can't read your kernel (since your filesystem isn't consistent) but you can't bring your filesystem back to a consistent state (since you can't boot!)
Now, on to filesystem types. Right now, you have four filesystem options: XFS, ext2, ext3 (journaling) and ReiserFS. ext2 is the tried and true Linux filesystem but doesn't have metadata journaling. ext3 is the new version of ext2 with both metadata journaling and ordered data writes, effectively providing data journaling as well. ReiserFS is a B*-tree based filesystem that promises very good small file performance, and greatly outperforms both ext2 and ext3 when dealing with small files (files less than 4k), often by a factor of 10x-15x. However, we do not recommend ReiserFS at this time, due to repeated occurances of file-system corruption with the 2.4.x series kernels. ReiserFS has metadata journaling, but no data journaling. XFS is a high-performance enterprise-class filesystem with metadata journaling that is fully supported under Gentoo Linux.
If you're looking for the most standard filesystem, use ext2. If you're looking for the most rugged journalled filesystem, use ext3. If you're looking for a high-performance filesystem with journaling support, use XFS; both ext3 and XFS are mature and refined. All filesystems except ReiserFS are production-ready. Here are our basic recommended filesystem sizes and types:
Once you've created your partitions using fdisk, it's time to initialize the filesystems that will be used to house our data. Initialize swap as follows:
You can use the mke2fs command to create ext2 filesystems:
To create an XFS filesystem, use the mkfs.xfs command:
If you'd like to use ext3, you can create ext3 filesystems using mke2fs -j:
To create ReiserFS filesystems, use the mkreiserfs command:
Now, we'll activate our new swap, since we may need the additional virtual memory that provides later:
Next, we'll create the /mnt/gentoo and /mnt/gentoo/boot mountpoints, and we'll mount our filesystems to these mountpoints.
If you are setting up Gentoo Linux with a separate /usr or /var, these would get mounted to /mnt/gentoo/usr and /mnt/gentoo/var, respectively.
6.Mounting the CD-ROM
Even though we've booted from the CD-ROM, the CD-ROM itself is not mounted under our minimal Linux boot CD environment. We'll need to mount it so that we can access the compressed build image tarball contained on the CD-ROM. To mount the CD-ROM, one typically types:
With the CD-ROM mounted, you should be able to see the starge???.tbz2 file(s) by typing ls /mnt/cdrom.
7.Unpack the Stage3 Tarball
Now it's time to extract the compressed stage tarball of your choice to /mnt/gentoo. Then, we'll chroot over to the new Gentoo Linux build installation.
After you execute these commands, you'll be "inside" your new Gentoo Linux environment.
8.Setting Your Timezone
At this point, you should have a Stage3 system that's ready for final configuration. We'll start this process by setting the timezone. By setting the timezone before building the kernel we ensure that users get reasonable uname -a output.
Look for your timezone (or GMT if you using Greenwich Mean Time) in /usr/share/zoneinfo. Then, make a symbolic link by typing:
9.Compiling the Kernel
Since you're installing a Gentoo Linux 1.1+ stage3 tarball, we've made things convenient for you and included recent Linux sources in /usr/src/linux.
Now it's time to compile your own custom kernel:
Your new custom kernel (and modules) are now installed.
10.Installing Aditional Packages
Remeber the 4 files that you downloaded above? Now it's time to put them to use.
First off, make two directories:
Then mount your floppy drive:
Copy all files from the floppy drive to /usr/portage/distfiles
Finally, merge the packages you chose onto your system:
You now have a System Kernel Logging Daemon, Cron, PPP Daemon, and WVDial installed.
11.Setting Up Your Internet
Now it's time to get your Internet Connection working. We need to setup your computer to dial-out:
Edit this, and input your ISP's phone number, your Username, and your Password. Be sure to remove the semicolons AND the extra space in front of the three lines you just edited. Lastly, add a new line at the bottom: New PPPD
Now lets see if you can connect, and if so, test your connection with a ping command:
If your connection is Ok, you should see some messages indicating that 3 packets were sent and recieved.
Your Gentoo Linux system is almost ready for use. All we need to do now is configure a few important system files and install the GRUB boot loader. The first file we need to configure is /etc/fstab. Remember that you should use the notail option for your boot partition if you chose to create a ReiserFS filesystem on it. Remember to specify ext2, ext3 or reiserfs filesystem types as appropriate.
Use something like the /etc/fstab listed below, but of course be sure to replace "BOOT", "ROOT" and "SWAP" with the actual block devices you are using (such as hda1, etc.)
13.Set the root password
Before you forget, set the root password by typing:
14.Configuring /etc/hostname and /etc/hosts
Edit the file /etc/hostname so that it contains your fully-qualified domain name on a single line, i.e. mymachine.mydomain.com.
The file /etc/hosts contains a list of ip addresses and their associated hostnames. It's used by the system to resolve the IP addresses of any hostnames that may not be in your nameservers. Here's a template for this file:
15.Configure basic settings (including the international keymap setting)
Follow the directions in the file to configure the basic settings. All users will want to make sure that CLOCK is set to his/her liking. International keyboard users will want to set the KEYMAP variable (browse /usr/share/keymaps to see the various possibilities).
The most critical part of understanding GRUB is getting comfortable with how GRUB refers to hard drives and partitions. Your Linux partition /dev/hda1 is called (hd0,0) under GRUB. Notice the parenthesis around the hd0,0 - they are required. Hard drives count from zero rather than "a", and partitions start at zero rather than one. So, /dev/hdb3 gets translated to (hd1,2), and /dev/hdd7 gets translated to (hd3,6). After you've gotten the feel for that, convert your boot and root partition names to the GRUB format and write them down. Now, it's time to install GRUB.
The easiest way to install grub is to simply type grub at your chrooted shell prompt:
You'll be presented with the grub> grub command-line prompt. Now, you need to type in the right commands to install the GRUB boot record onto your hard drive. In my example configuration, I want to install the GRUB boot record on my hard drive's MBR (master boot record), so that the first thing I see when I turn on the computer is the GRUB prompt. In my case, the commands I want to type are:
Here's how the two commands work. The first root ( ) command tells GRUB the location of your boot partition (in our example, /dev/hda1 or (hd0,0) in GRUB terminology. Then, the second setup ( ) command tells GRUB where to install the boot record - it will be configure to look for its special files at the root ( ) location that you specified. In my case, I want the boot record on the MBR of the hard drive, so I simply specify /dev/hda (also known as (hd0)). If I were using another boot loader and wanted to set up GRUB as a secondary boot-loader, I could install GRUB to the boot record of a particular partition. In that case, I'd specify a particular partition rather than the entire disk. Once the GRUB boot record has been successfully installed, you can type quit to quit GRUB. Gentoo Linux is installed, but we need to create the /boot/grub/menu.lst file so that we get a nice GRUB boot menu when the system reboots. Here's how to do it.
Now, create the menu.lst file (nano -w /boot/grub/menu.lst), and add the following to it:
After saving this file, Gentoo Linux installation is complete. Selecting the first option will tell GRUB to boot Gentoo Linux without a fuss. The second part of the menu.lst file is optional, and shows you how to use GRUB to boot a bootable Windows partition.
Also, if you need to pass any options to the kernel, simply add them to the end of the kernel command. We're already passing one option (root=/dev/hda3), but you can pass others as well. In particular, you can turn off devfs by default (not recommended unless you know what you're doing) by adding the gentoo=nodevfs option to the kernel command.
Now, Gentoo Linux is installed. The only remaining step is to exit the chrooted shell, safely unmount your partitions and reboot the system:
If you have any questions or would like to get involved with Gentoo Linux development, consider joining our gentoo-user and gentoo-dev mailing lists (there's a "click to subscribe" link on our main page). Enjoy and welcome to Gentoo Linux!