This section provides more detail on installation. Besides expanding on the installation procedure, this section also provides information on different installation types and on choosing computer hardware.
If anything goes wrong during installation and you get stuck, go to the "Troubleshooting Your Installation" section at the end of this chapter. It gives suggestions for solving common installation problems.
If you are installing a dual-boot system that includes a Windows operating system, try to install the Windows system first and the Red Hat Linux system later. Some Windows systems blow away the Master Boot Record (MBR), making the Red Hat Linux partition inaccessible.
If, when installing Windows or Red Hat Linux, you find that the other operating system is no longer available on your boot screen, don't panic and don't immediately reinstall. You can usually recover from the problem by booting with the Red Hat Linux emergency boot disk, and then using either the grub-install or lilo commands to reinsert the proper MBR. If you are uncomfortable working in emergency mode, seek out an expert to help you.
This chapter details how to install Red Hat Linux from the CDs that come with this book. If you are installing Red Hat Linux from those CDs, you can simply follow the instructions in this chapter. If you are installing Red Hat Enterprise Linux instead, there are a few differences in the installation procedure.
Descriptions of the differences between Fedora Core and Red Hat Enterprise Linux are described in Chapter 1. However, here are a few issues you should be aware of if you are using the installation procedure in this chapter to install Red Hat Enterprise Linux.
Instead of having a 3-CD installation, Red Hat Enterprise Linux consists of a different boot CD for AS and WS installs. After starting installation with the appropriate boot CD, both install types use the same set of additional CDs (marked disc2, disc3, and disc4).
Installation classes for Fedora and Enterprise are different.
The names and logos used for Fedora and Enterprise are different.
Unlike the Fedora installation, which installs all CDs in order, Red Hat Enterprise Linux requires that you insert the boot CD again near the end of the install process.
Besides those differences, an installation of Red Hat Enterprise Linux should match the instructions in this chapter. There are differences in which packages are included with the Fedora and Enterprise distributions, however. (See Appendix B for package descriptions.)
Red Hat Linux offers very flexible ways of installing the operating system. Of course, I recommend installing Red Hat Linux from the CDs that come with this book. However, if you don't have the Red Hat CDs or if you don't have a working CD-ROM drive, you can install Red Hat Linux from any of several different types of media. There are also several special types of installation. The installation types noted here are described fully in the "Special Installation Procedures" section.
First you should determine if you are doing a new install or an upgrade. If you are upgrading an existing Red Hat Linux system to the latest version, the installation process will try to leave your data files and configuration files intact as much as possible. This type of installation takes longer than a new install. A new install will simply erase all data on the Linux partitions (or whole hard disk) that you choose.
You can install Red Hat Linux from any of the locations described here. Each of the installation procedures from locations other than a CD requires a Red Hat Linux installation boot disk. (Creating an installation boot disk is described later.)
HTTP — Lets you install from a Web page address.
FTP — Lets you install from an FTP site.
NFS image — Allows you to install from any shared directory on another computer on your network using the Network File System (NFS) facility.
Hard disk — If you can place a copy of the Red Hat Linux distribution on your hard disk, you can install it from there. (Presumably, the distribution is on a hard disk partition to which you are not installing.)
The following specialty installation type also may be of interest to you:
Kickstart installation — Lets you create a set of answers to the questions Red Hat Linux asks you during installation. This can be a time-saving method if you are installing Red Hat Linux on many computers with similar configurations.
The Red Hat Installation Guide is available from any Red Hat FTP site (such as ftp.redhat.com). The location on the ftp.redhat.com server for the previous release of Red Hat Linux is:
Another document you may find useful before installing is the Red Hat Linux Reference Guide (also listed in the RH-DOCS directory, as rhl-rg-en-9.0). You'll need to check for yourself to find out if Red Hat continues to update the reference guides for Fedora Core.
This may not really be a choice. You may just have an old PC lying around that you want to try Red Hat Linux on. Or you may have a killer workstation with some extra disk space and want to try out Red Hat Linux on a separate partition or whole disk. To install the PC version of Red Hat Linux successfully (that is, the version on the accompanying CD), the computer must have the following:
x86 processor — Your computer needs an Intel-compatible CPU. With the latest version, Red Hat recommends that you at least have a Pentium-class processor to run Red Hat Linux. For a text-only installation, a 200 MHz Pentium is the minimum, while a 400 MHz Pentium II is the minimum for a GUI installation. Although some 486 machines will work, they cannot be counted on.
Floppy disk drive or CD-ROM — You need to be able to boot up the installation process from either floppy disk or CD-ROM. If you don't have a CD-ROM drive, you need a LAN connection to install Red Hat Linux from a server on the network or figure out a way to copy the contents of the CD to a hard disk.
Hard disk —The minimum amount of space you need varies depending on the installation type and packages you select. If you are an inexperienced user, you want at least 2.1GB of space so you can get the GUI with a personal desktop or workstation install:
Personal Desktop — Requires 2.1GB of disk space.
Workstation — Requires 2.6GB of disk space.
Server — Requires 920MB of disk space.
Everything (Custom) — Requires about 5.8GB.
Mimimum (Custom) — Requires at least 510MB of disk space.
RAM — You should have at least 64MB of RAM to install Red Hat Linux. If you are running in graphical mode, you will probably need at least 128MB. The recommended RAM for GUI mode is 256MB.
Keyboard and monitor — Although this seems obvious, the truth is that you only need a keyboard and monitor during installation. You can operate Red Hat Linux quite well over a LAN using either a shell interface from a network login or an X terminal.
Red Hat Enterprise Linux versions, not included with this book, are available for other architectures, such as Intel Itanium, AMD64, IBM PowerPC, and IBM mainframe. The CDs that come with this book and the installation procedures presented here, however, are specific to PCs. Most of the other software described in this book, however, will work the same in any of those hardware environments. (Check out http://redhat.com/mirrors for sites that offer Red Hat Linux for different computer hardware architectures.)
The list of hardware supported by Red Hat Linux is available on the Internet at www.redhat.com/hardware.
If your computer's CD-ROM device is connected to a PCMCIA port (such as those that come on laptop computers), you will need to install PCMCIA support during installation. PCMCIA support is available only on Intel-based computers. See the sidebar on installing Red Hat Linux on a laptop for further information.
If you feel you have chosen the right type of installation for your needs, you can begin the installation procedure. Throughout most of the procedure, you can click Back to make changes to earlier screens. However, once you are warned that packages are about to be written to hard disk, there's no turning back. Most items that you configure can be changed after Red Hat Linux is installed.
It is quite possible that your entire hard disk is devoted to a Windows 95, 98, 2000, ME, NT, or XP operating system and you may want to keep much of that information after Red Hat Linux is installed. Personal Desktop, Workstation and Custom install classes retain existing partitions (by default), but they don't let you take space from existing DOS partitions without destroying them. See the section on reclaiming free disk space called "Using the FIPS Utility" for information on how to assign your extra disk space to a different partition before you start this installation process.
If you are upgrading an existing Red Hat Linux system to this release, you should consider first removing any unwanted packages from your old Red Hat Linux system. Fewer packages that have to be checked during an upgrade can mean a significantly faster upgrade installation, as well as the consumption of less space.
Insert the first CD-ROM in the CD-ROM drive.???If you are installing from a local hard disk or network and you have a floppy disk drive but no CD-ROM drive, you can insert an installation floppy boot disk instead. Refer to the section on creating install disks for information on making the disk (or disks) you need.
Start your computer.???If you see the Red Hat Linux installation screen, continue to the next step.
If you don't see the installation screen, your CD-ROM drive may not be bootable. Creating a bootable floppy may be the best way to proceed. However, you may also have the choice of making your CD-ROM drive bootable. Here's how: Restart the computer. Immediately, you should see a message telling you how to go into setup, such as by pressing the F1, F2, or Del key. Enter setup and look for an option such as "Boot Options" or "Boot from." If the value is "A: First, Then C:" change it to "CD-ROM First, Then C:" or something similar. Save the changes and try to install again.
If installation succeeds, you may want to restore the boot settings. If your CD drive still won't boot, you may need to create an installation boot floppy disk from a bootdisk.img file, plus possibly separate extra driver disks needed for special block devices (drvblock.img), network devices (drvnet.img) or pcmcia devices (pcmciadd.img). These disk images are supplied on the CD. Create the boot disks from descriptions later in this chapter. Then insert the floppy, reboot, and continue this procedure.
Start the boot procedure.???At the boot prompt, press Enter to start the boot procedure in graphical mode. If for some reason your computer will not let you install in graphical mode (16-bit color, 800x600 resolution, framebuffer), refer to the "Choosing Different Install Modes" sidebar. Different modes let you start network installs and nongraphical installs (in case your video card can't be detected).
Media check.???At this point, you may be asked to check your installation media. If so, press Enter to check that the CD is in working order. If one of the CDs is damaged, this step saves you the trouble of getting deep into the install before failing. Repeat this step for each CD in the set; then select Skip to continue.
Continue.???When the welcome screen appears, click Release Notes to see information about this version of Red Hat Linux. Click Next when you're ready to continue.
Choose a language.???When prompted, indicate the language that you would like to use during the installation procedure by moving the arrow keys and selecting Next. (Later, you will be able to add additional languages.) You are asked to choose a keyboard.
Choose a keyboard.???Select the correct keyboard layout (U.S. English, with Generic 101-key PC keyboard by default). Some layouts enable dead keys (on by default). Dead keys let you use characters with special markings (such as circumflexes and umlauts).
Add a mouse.???When prompted, indicate the kind of mouse and click Next. If possible, choose an exact match to the model of mouse you have. Otherwise, you can choose a generic serial mouse (if it connects to a COM port) or a generic PS/2 mouse (if it connects to a PS/2 port). Support also exists for two-button and three-button generic USB mice. For a serial mouse, identify which COM port the mouse is connected to. Generic wheel mice (PS/2 and USB) are also supported. If you are using a two-button mouse, you can click Emulate 3 Buttons. This lets you use the Shift key with a mouse button to emulate the center button from a three-button mouse. (Some USB mice are not well detected during install. Because many USB mice use the same protocol, try selecting Logitech Mouseman Wheel (USB) as the mouse type if you can't match your exact model.)
Select Monitor Configuration.???Scroll down the list to find your monitor's manufacturer; then click the plus sign to choose the model. When you select the model, the correct horizontal and vertical sync rates are added, or you can type your own values. If your model is not found, consult the monitor's manual. Then try a Generic CRT or type the monitor's horizontal and vertical sync rates into the appropriate box. Click Next to continue.
Choose install type.???Select either "Install Red Hat Linux" for a new install or "Upgrade an existing installation" to upgrade an existing version of Red Hat.
To upgrade, you must have at least a Linux 2.0 kernel installed. With an upgrade, all of your configuration files are saved as filename.rpmsave (for example, the hosts file is saved as hosts.rpmsave). The locations of those files, as well as other upgrade information, is written to /tmp/upgrade.log. The upgrade installs the new kernel, any changed software packages, and any packages that the installed packages depend on being there. Your data files and configuration information should remain intact. By clicking the "Customize" box, you can choose which packages to upgrade.
The personal desktop and workstation installation types do not install server packages or many system administration tools. To use most of the administration and server features described in this book (especially from Part IV), you must either 1) select to add additional packages to those install types, or 2) add extra packages as you need them with the redhat-config-packages tool described later in this chapter.
For a new install, you must choose one of the following types (also referred to as classes) of installation. For any of these installation types, you will have the opportunity to install a set of preset packages or customize that set.
Personal Desktop — Installs software appropriate for a home or office personal computer or laptop computer. This includes the GNOME desktop (no KDE) and various desktop-related tools (word processors, Internet tools, and so on). Server tools, software development tools, and many system administration tools are not installed.
Workstation — Similar to a Personal Desktop installation but adds tools for system administration and software development. (Server software is not installed.)
Any Linux partitions or free space on your hard disk(s) will be assigned to the new installation with the Personal Desktop or Workstation types of installation. Any Windows partitions (VFAT or FAT32 file system types) will not be touched by this install. After installation, you will be able to boot Linux or Windows. If there is no free space outside of your Windows partition, you must run the FIPS program (described later) or other disk resizing software before proceeding, or you will lose your Windows installation.
Server — Server installs the software packages that you would typically need for a Linux server (in particular, Web server, file server, and print server). It does not include many other server types (DHCP, mail, DNS, FTP, SQL, or news servers). The default server install does not include a GUI (so you'd better know how to use the shell). This install type also erases all hard disks and assigns them to Linux by default.
This is a big one. In case you didn't catch the previous paragraph, Server installs erase the whole hard disk by default! If you have an existing Windows partition that you want to keep, change the Automatic Partitioning option that appears next either to only remove the Linux Partitions or to only use existing free space.
Custom System — You are given the choice of configuring your own partitions and selecting your own software packages.
With an Everything custom install, you will have all the desktop, server, and development tools that come with Red Hat Linux. If you have the disk space, an Everything install saves you the trouble of installing packages you need later.
At this point, the procedure will continue through a Custom System installation. Even though different install classes choose different partitioning methods by default, in all cases you have the choice to see and change the partitioning that was chosen for you.
Choose your partitioning strategy.???You have two choices related to how your disk is partitioned for Red Hat Linux installation:
Automatically partition— With this selection, all Linux partitions on all hard disks are erased and used for the installation. The installation process automatically handles the partitioning. (It does give you a chance to review your partitioning, however.)
Manually partition with Disk Druid — With this selection, the Disk Druid utility is run to let you partition your hard disk.
Click Next to continue.
Choose partitioning.???If you selected to have the installer automatically partition for you, you can choose from the following options:
If you selected to use Disk Druid for partitioning, refer to the section on partitioning your hard disk later in this chapter for details on using those tools.
Remove all Linux partitions on this system — Windows and other nonLinux partitions remain intact with this selection.
Remove all partitions on this system — This erases the entire hard disk.
Keep all partitions and use existing free space — This only works if you have enough free space on your hard disk that is not currently assigned to any partition.
If you have multiple hard disks, you can select which of those disks should be used for your Red Hat Linux installation. Turn the Review check box on to see how Linux is choosing to partition your hard disk. Click Next to continue.
After reviewing the Partitions screen, you can change any of the partitions you choose, providing you have at least one root (/) partition that can hold the entire installation and one swap partition. A small /boot partition (about 100MB) is also recommended. The swap partition is usually twice the size of the amount of RAM on your computer (for example, for 128MB RAM you could use 256MB of swap). Having less than double your physical memory for swap can cause performance problems.
Click the Next button (and select OK to accept any changes) to continue.
Configure boot loader.???All bootable partitions and default boot loader options are displayed. By default, the install process will use the GRUB boot loader, install the boot loader in the master boot record of the computer, and choose Red Hat Linux as your default operating system to boot.
If you keep the GRUB boot loader, you have the option of adding a GRUB password. The password protects your system from having potentially dangerous kernel options sent to the kernel by someone without that password. GRUB and LILO boot loaders are described later in this chapter.
The names shown for each bootable partition will appear on the boot loader screen when the system starts. Change a partition name by clicking it and selecting Edit. To change the location of the boot loader, click "Configure advanced boot loader options" and continue to the next step. (If the defaults are okay, skip the next step.)
To choose where to store the boot loader, select one of the following:
Master Boot Record (MBR) — This is the preferred place for GRUB. It causes either GRUB or LILO to control the boot process for all operating systems installed on the hard disk.
First Sector of Boot Partition — If another boot loader is being used on your computer, you can have GRUB installed on your Linux partition (first sector). This lets you have the other boot loader refer to your GRUB boot loader to boot Red Hat Linux.
You can choose to add Kernel Parameters (which may be needed if your computer can't detect certain hardware). You can select to use linear mode (which was once required to boot from a partition on the disk that is above cylinder 1024, but is now rarely needed).
For more information on GRUB, refer to the section on boot loaders later in this chapter.
Configure networking.???At this point, you are asked to configure your networking. This applies only to configuring a local area network. If you will use only dial-up networking, skip this section by clicking Next. If your computer is not yet connected to a LAN, you should skip this section.
Network address information is assigned to your computer in two basic ways: statically (you type it) or dynamically (a DHCP server provides that information from the network at boot time). One Network Device appears for each network card you have installed on your computer. The first interface is eth0, the second is eth1, and so on. Repeat the setup for each card by selecting each card and clicking Edit.
Refer to Chapter 15 for descriptions of IP addresses, netmasks, and other information you need to set up your LAN and to Chapter 16 for information related to domain names.
With the "Edit Interface eth0" window displayed, add the following:
Configure using DHCP — If your IP address is assigned automatically from a DHCP server, a checkmark should appear here. With DHCP checked, you don't have to set other values on this page. Remove the checkmark to set your own IP address.
IP Address — If you set your own IP address, this is the four-part, dot-separated number that represents your computer to the network. How IP addresses are formed and how you choose them is more than can be said in a few sentences (see Chapter 15 for a more complete description). An example of a private IP address is 192.168.0.1.
Netmask — The netmask is used to determine what part of an IP address represents the network and what part represents a particular host computer. An example of a netmask for a Class C network is 255.255.255.0.
Activate on boot — Besides this information, you should indicate whether you want the network to start at boot time (you probably do if you have a LAN).
Click OK. Then add the following information on the main screen:
Set the hostname — This is the name identifying your computer within your domain. For example, if your computer were named "baskets" in the handsonhistory.com domain, your full hostname may be baskets.handsonhistory.com. You can either set the domain name yourself (manually) or have it assigned automatically, if that information is being assigned by a DHCP server (automatically via DHCP).
Gateway — This is the IP number of the computer that acts as a gateway to networks outside your LAN. This typically represents a host computer or router that routes packets between your LAN and the Internet.
Primary DNS — This is the IP address of the host that translates computer names you request into IP addresses. It is referred to as a Domain Name System (DNS) server. You may also have Secondary and Tertiary name servers in case the first one can't be reached. (Most ISPs will give you two DNS server addresses.)
To configure your LAN after installation, see Chapter 15.
Choose a firewall configuration.???The use of a firewall has significant impact on the security of your computer. If you are connected to the Internet or to another public network, a firewall can limit the ways an intruder may break into your Linux system. Here are your choices for configuring a firewall during installation:
High — Select this security level if you are connecting your Linux system to the Internet for Web browsing and file downloading (FTP) but don't plan to offer your system as a server to the Internet. Only explicitly defined connections are accepted. To allow Web browsing and basic network setup, DNS replies and DHCP (to serve addresses) are allowed at this level.
Medium — Select this security level if you want to block access to ports used to offer most basic TCP/IP services (standard, reserved ports lower than 1023). This selection denies access to ports used for NFS servers, remote X clients, and the X font server. Those services are available primarily to other computers your own local LAN.
No firewall — Select this security level if you are not connected to a public network and do not want to deny requests for services from any computer on your local network. Of course, you can still restrict access to services by starting up only the services you want to offer and by using configuration files to restrict access to individual services.
If you know you want to allow access to particular services, you can click Customize and allow incoming requests for the following: DHCP, SSH, Telnet, WWW, Mail, and/or FTP services. You can also add a comma-separated list of port numbers to the Other Ports box to open access to those ports. (The /etc/services file lists which services are associated with which port numbers.)
If you have a LAN that consists of trusted computers, you can click the box representing your interface to that LAN (probably eth0). Clicking the box allows access to any services you care to share with the computers on your LAN.
Adding firewall rules here results in rules being added to the /etc/sysconfig/iptables file. The rules are run from the /etc/init.d/iptables start-up script when you boot your system. To make permanent changes to your firewall rules, you can use the Configure Firewalling window, as described in Chapter 14.
Choose language support.???Your installation language should be selected automatically as your default language on this screen. You can select to install support for additional languages by clicking the check boxes next to the languages you want. You can click the Select All button to install all supported languages to your system.
Choose a time zone.???Select the time zone from the list of time zones shown. Either click a spot on the map or choose from the scrolling list. To see a more specific view of your location, click World and choose your continent. From the UTC Offset tab, you can choose a time zone according to the number of hours away from Greenwich Mean Time (GMT), known as the UTC offset.
Set root password.???You must choose a password for your root user at this point. The root password provides complete control of your Red Hat Linux system. Without it, and before you add other users, you will have no access to your own system. Enter the Root Password, and then type it again in the Confirm box to confirm it. (Remember the root user's password and keep it confidential! Don't lose it!) Click Next to continue.
Use the passwd command to change your password later. See Chapter 14 for suggestions on how to choose a good password. See Chapter 11 for information on setting up user accounts.
Select Packages.???You are presented with groups of packages at this point. Which packages are selected by default depends on the type of installation you chose earlier. In general, either more workstation-oriented or server-oriented packages are selected. Select the ones you want and click Next.
You can override your package selections by choosing "Mimimal" or "Everything" install groups. Disk space requirements for those install types are described earlier in this chapter.
Because each group represents several packages, you can click the Details button next to each group to select more specifically the packages within that group. Because workstation and personal desktop installations don't add any server packages, this is a good opportunity to add server packages for the services you expect to use.
Appendix B describes the software packages that come with Red Hat Linux.
A listing of all of the software packages is contained in the file RedHat/base/comps.xml on the first Red Hat installation CD-ROM. It's in XML format, so it is incomprehensible if you can't read XML.
About to Install.???A screen tells you that you are about to begin writing to hard disk. You can still back out now, and the disk will not have changed. Click Next to proceed. (To quit without changes, eject the CD and restart the computer.) Now the file systems are created and the packages are installed. This typically takes from 20 to 60 minutes to complete, although it can take much longer on older computers.
You are prompted to insert additional installation CDs as they are needed.
Create boot disk.???If you want to create a boot disk, insert a blank floppy and click Next to create the boot floppy. I recommend that you do this if you have a floppy disk drive, and label the disk with the name of the computer, operating system, and release number. (You can still skip it by clicking No.)
Finish installing.???When you see the "Congratulations" screen, you are done. Note the links to Red Hat Linux information, eject the CD and click Exit.
Your computer will restart. If you installed GRUB, you will see a graphical boot screen that displays the bootable partitions. Press the Up Arrow or Down Arrow keys to choose the partition you want to boot, and press Enter. If Linux is the default partition, you can simply wait a few moments and it will boot automatically.
The first time your system boots after installation, the Red Hat Setup Agent runs to do some initial configuration of your system. The next section tells how Red Hat Setup Agent works.
The first time you boot Red Hat Linux, after it is installed, the Red Hat Setup Agent runs to configure some initial settings for your computer.
The Red Hat Setup Agent only runs automatically if you have configured Red Hat Linux to boot to a graphical login prompt. To start it from a text login, log in as root and switch to init state 5 temporarily (type init 5). Log in to the graphical prompt. From a Terminal window as root user, type:
# rm /etc/sysconfig/firstboot # /usr/sbin/firstboot
The first screen you see is the Welcome screen. From there, click the Next button to step through each procedure as follows:
Date and Time Configuration — You can manually enter the date (click on the calendar) and time (select hour, minutes, and seconds) or use the network time protocol to have your date and time set automatically from a known time server. Click on Enable Network Time Protocol (NTP), then select a time server by clicking on the down arrow and selecting a site. Network Time Protocol (NTP) is a service that allows computers to synchronize their date and time clocks with reliable time servers.
Red Hat offers two time servers you can use (click the down arrow in the server box to see them). Or you can type in your own time server. It is better to type an IP address than a name for your time server.
Setting NTP in this way adds your chosen NTP server to the /etc/ntp.conf file (see the server option). To check that time has been synchronized, type the ntptrace command. You should not have to change your firewall for NTP to work, because NTP attempts to punch a hole through your firewall to synchronize your time.
User Account — For your daily use of Red Hat Linux, you should have your own user account. You should typically log in with this user name (of your choosing) and use only the root user to perform administrative tasks. In the first of the four text boxes on the screen, type a user name (something like jparker or alanb). Next, type your full name (like John W. Parker or Alan Bourne). Then type your password in the Password box and again in the Confirm Password box. Click Forward.
If some form of network authentication is used, such as LDAP, Kerberos, or SMB authentication, you can click the Use Network Login button. See the "Enabling Authentication" sidebar for information on choosing different authentication types.
Sound Card — The Setup Agent tries to detect your sound card. Click on Play test sound, to check if the card is working. If you hear the sound, click Yes. Then click Next to continue.
Install Additional Software — If you have Red Hat Linux CDs other than those that come with this book, you can install them now by inserting the CD you want to install and clicking the appropriate button.
The Red Hat Setup Agent is complete. See Chapter 3 for a description of how to log in to Red Hat Linux and start learning how to use Linux.
When Red Hat Linux starts up the next time, it will boot up normally to a login prompt. For this release of Red Hat Linux, a new graphical boot screen is displayed (instead of a scrolling list of services starting up). If you miss the old scrolling list, you can view it by clicking the Details button or by pressing Ctrl+Alt+F1.Then go back again by pressing Ctrl+Alt+F8.