When you install Red Hat Linux, you copy operating system files from media to the local system and set up configuration files so that Linux runs properly on the local hardware. You can install Linux from many types of media, including CDs, DVD, or hard disk, and from files on other systems that are accessed over a network. Operating system files can be stored as directory hierarchies on CDs, a DVD, or a hard disk, or as CD or DVD (ISO) images on a hard disk. You can use a browser, ftp , or BitTorrent to download the ISO images. It is a good idea to test the ISO image files when they are downloaded and the burned CDs before you use them to install Red Hat Linux.
The major decisions to be made when planning an installation are how to divide the hard disk into partitions and which software packages to install. If you plan to use SELinux, turn it on during Firstboot, after you install Linux. Because SELinux sets extended attributes on files, it can be a
The Fedora Project is sponsored by Red Hat and supported by the
3. Step-by-Step Installation
Chapter 2 covered planning the installation of Red Hat Linux: determining the requirements; performing an upgrade versus a clean installation; planning the layout of the hard disk; obtaining the files you need for the installation, including how to download and burn CD and DVD ISO images; and collecting the information about the system you will need during installation. This chapter focuses on installing Fedora Core. The process of installing Red Hat Enterprise Linux is similar. Frequently the installation is quite simple,
Installing Red Hat Linux
To begin most installations, insert the first installation CD or the installation DVD into the CD/DVD drive and
The system boots from the CD or DVD and displays a screen of instructions with a boot : prompt at the bottom. Refer to "BIOS setup" on page 26 if the system does not boot from the CD or DVD.
You cannot boot from a floppy diskette
Booting the System: The boot: Prompt
You can supply many different parameters following the
: prompt. You must press
after entering any of these parameters. If you are installing from CDs or a
, you can
Tip: CD and DVD installations work the same way
On the installation screens, the
If you encounter problems with the display during installation, supply the following parameters, which turn off video memory, in response to the boot: prompt:
boot: linux nofb
If you are installing from other than CDs or a DVDthat is, if you are installing from files on the local hard disk or from files on another system using FTP, NFS, or HTTPsupply the following parameters in response to the boot: prompt:
boot: linux askmethod
See page 45 for information on using the askmethod parameter.
As the system boots, text
The balance of this section covers the parameters you can supply following the
prompt. Unless you are having problems with the installation or have special requirements, you can skip to the
All of the parameters (except for memtest86 ) you can supply following the boot : prompt consist of the word linux followed by an argument that is passed to the kernel or to the Anaconda installer. Many of these parameters can be combined. For example, to install Linux in text mode using a terminal running at 115,200 baud, no parity, 8 bits, connected to the first serial device, give the following parameters (the ,115200n8 is optional):
boot: linux text console=ttyS0,115200n8
The next set of parameters
boot: linux resolution=1024x768 noprobe askmethod
Following are some of the parameters you can give at the
: prompt. A set of parameters must be
Without entering a parameter, press RETURN in response to the boot: prompt to perform a graphical installation from CDs or a DVD. This installation probes the computer to determine as much as possible about the hardware.
Calls memtest86+ when you boot from a CD or DVD only. The GPL-licensed memtest86+ utility is a stand-alone memory test for x86-based computers. Press C to configure the test; press ESCAPE to exit. See www.memtest.org for more information.
When using NFS, the remote (server) system must export (page 685) the directory hierarchy that holds the ISO images of the installation CDs or DVD. The NFS Setup screen requires you to enter the NFS server name and name of the Fedora Core directory. Enter the server's IP address and the name of the exported directory, not its device name.
Runs the installation program at a resolution of 640 x 480 pixels. See also linux resolution .
linux mem= xxx M
Tests the integrity of one or more installation CDs or DVDs using an SHA1 sum. This option works with the CD, DVD, hard disk ISO, and NFS ISO installation
Disables hardware probing for all devices, including network interface cards (NICs), graphics cards, and the monitor. Forces you to select devices from a list. You must know exactly which cards or chips the system uses when you use these parameters. Use these parameters when probing causes the installation to hang or
Puts the system in rescue mode; see page 397 for details.
linux resolution= W x H
Specifies the resolution of the monitor you are using for a graphical installation. For example, resolution=1024x768 specifies a monitor with a resolution of 1024 x 768 pixels.
Allows you to configure the monitor manually; see linux noprobe for more information.
Installs Linux in textual (pseudographical) mode. Although the images on the screen appear to be graphical, they are
Installs over a VNC (Virtual Network Computing) remote desktop session. After providing an IP address, you can control the installation remotely using a VNC client from a remote computer. You can download the VNC client, which runs on several platforms, from www.realvnc.com.
The CD Found Screen
The first screen that the installation process displays is the pseudographical CD Found screen. Because it is not a true graphical screen, the mouse does not work. Instead, you must use the TAB or ARROW keys to highlight different choices and press RETURN to select the highlighted choice. This screen allows you to test as many installation CDs or DVDs as you like, in any order. Choose OK to test the media or Skip to bypass the test. See the following caution box.
Caution: Test the CDs or the DVD
FEDORA Because Red Hat does not manufacture Fedora disks, during a CD- or DVD-based Fedora installation, Anaconda displays the CD Found screen before starting the installation. From this screen, you can verify that the installation CDs or DVD do not have any errors. Testing the CDs or DVD takes a few minutes and can save you hours of aggravation if the installation fails due to bad media.
RHEL+FEDORA You can force the display of the CD Found screen by supplying the parameters linux mediacheck in response to the boot: prompt (page 46).
A CD or DVD may fail the media test if the software that was used to burn the disk did not include padding. If a CD or DVD fails the media test, try booting with the following parameter:
If the CD or DVD
The Anaconda Installer
Anaconda, which is written in Python and C, identifies the hardware, builds the filesystems, and installs or upgrades the Red Hat Linux operating system. Anaconda can run in textual or graphical (default) interactive mode or in batch mode (see "Using the Kickstart Configurator" on page 63).
Tip: Anaconda does not write to the hard disk until it displays the Begin Installation screen
While you are installing Red Hat Linux, until Anaconda displays the Begin Installation screen (Figure 3-9, page 55), you can press CONTROL-ALT-DEL to abort the installation process and reboot the system without making any changes to the hard disk. However, if Anaconda displays the initialize warning dialog box (page 49), when you click
Exactly which screens Anaconda displays depends on whether you are installing Fedora Core or Red Hat Enterprise Linux and which parameters you specified following the boot : prompt. With some exceptionsmost notably if you are running a textual installationAnaconda probes the video card and monitor and starts a native X server with a log in /tmp/X.log . (This log is not preserved unless you complete the installation.)
While it is running, Anaconda opens the virtual consoles (page 113) shown in Table 3-1. You can display a virtual console by pressing CONTROL-ALT-F x , where x is the virtual console number and F x is the function key that corresponds to the virtual console number.
Table 3-1. Virtual console assignments during installation
At any time during the installation, you can switch to virtual console 2 ( CONTROL-ALT-F2 ) and give commands to see what is going on. Do not give any commands that change any part of the installation process. To switch back to the graphical installation screen, press CONTROL-ALT-F7 .
Anaconda provides a Next button at the lower-right corner of each of the installation screens and a Back button next to it on most screens. When you have completed the entries on an installation screen, click Next or, from a textual installation, press the TAB key until the Next button is highlighted and then press RETURN . Select Back to return to the previous screen. Click Release Notes at the lower-left corner of the screen to display the release notes for the version of Red Hat Linux you are installing.
Anaconda displays different screens depending on which commands you give and which choices you make. During a graphical installation, when you leave the CD Found screen, Anaconda starts, loads drivers, and probes for the devices it will use during installation. After probing, it starts the X server. This section describes the screens that Anaconda displays during a default installation and explains the choices you can make on each of them.
Anaconda displays the Logo screen (Figure 3-1) after it obtains enough information to start the X Window System. There is nothing for you to do on this screen except display the release notes. Select Next .
Figure 3-1. The Logo screen
Select the language you want to use for the installation. This language is not
Select the type of keyboard attached to the system.
Anaconda displays the Monitor screen only if it cannot probe the monitor successfully. Select the brand and model of the monitor attached to the system. Select a generic LCD or CRT display if the monitor is not listed. You can specify the Sync frequencies in place of the monitor brand and model, but be careful: Specifying the wrong values can ruin some older hardware.
This warning is displayed if the hard disk has not been used before. The dialog box says that the partition table on the device was unreadable and asks if you want to initialize the drive. When you initialize a drive, all data on the drive is lost. Click Yes if it is a new drive or if you do not need the data on the drive. Anaconda initializes the hard disk immediately.
Install or Upgrade
Anaconda displays the Install or Upgrade screen (Figure 3-2) only if it detects a version of Red Hat Linux on the hard disk that it can upgrade. Anaconda gives you the choice of upgrading the existing installation or overwriting the existing installation with a new one. Refer to "Installing a Fresh Copy or Upgrading an Existing Red Hat System?" on page 27 for help in making this selection.
Figure 3-2. The Install or Upgrade screen
Partition the Disk
The Partition the Disk screen (Figure 3-3) allows you to specify partition information and to select which drives you want to install Red Hat Linux on (
Figure 3-3. The Partition the Disk screen
The default layout that the first three choices create includes two logical
If you put a check mark in the box labeled Review and modify partitioning layout or if you select Create custom layout in the combo box, Anaconda runs Disk Druid (page 58) so that you can verify and modify the layout before it is written to the disk.
Tip: The disk is not partitioned until later
With one exception, Anaconda does not write to the hard disk when you specify partitions. Instead, it creates a table that specifies how you want the hard disk to be partitioned. The disk is actually partitioned and formatted when you click Next from the Begin installation screen (page 54). However, if Anaconda displays the initialize warning dialog box (page 49), when you click Yes , it writes to the disk immediately.
Anaconda runs Disk Druid only if you put a check mark in the box labeled Review and modify partitioning layout or if you select Create custom layout from the combo box as described in the previous section. See page 58 for information on the Disk Druid disk-partitioning program.
Displays a warning if you are removing or formatting partitions. Click Format or Yes to proceed.
Boot Loader Configuration
Anaconda displays the Boot Loader Configuration screen (Figure 3-4) only when you put a check mark in the box labeled Review and modify partitioning layout or select Create custom layout in the combo box in the Partition the Disk screen. By default, Anaconda installs the grub boot loader (page 533). If you do not want to install a boot loader, click the radio button next to No boot loader will be installed . When you install Red Hat Linux on a machine that already runs another operating system, Anaconda frequently recognizes the other operating system and sets up grub so you can boot from either operating system. Refer to "Setting Up a Dual-Boot System" on page 68. To manually add other operating systems to grub 's list of bootable systems, click Add and specify a label and device to boot from. For a more secure system, specify a boot loader password.
Figure 3-4. The Boot Loader Configuration screen
The Network Configuration screen, which allows you to specify network configuration information, has three
Figure 3-5. The Network Configuration screen
The Network Devices frame lists the network devices that the installer finds. Normally you want network devices to become active when the system boots. Remove the check mark from the box at the left of a device if you do not want it to become active when the system boots.
To configure a network device manually (not using DHCP), highlight the device and click Edit to the right of the list of devices. Anaconda displays the Edit Interface window (Figure 3-6). Remove the check mark from the box labeled Configure using DHCP and enter the IP address and netmask of the system in the appropriate boxes before clicking OK .
Figure 3-6. The Network Configuration: Edit Interface window
If you are not using DHCP, click manually under Set the hostname in the Network Configuration screen and enter the name of the system. When you turn off DHCP configuration in Network Devices, Anaconda allows you to specify a gateway address and one or more DNS (nameserver) addresses. You do not have to specify more than one DNS address, although it can be useful to have two in case one nameserver stops working. Click Next to continue.
The Time Zone screen allows you to specify the time zone the system is located in. Click a location on the map to enlarge the selected portion of the map and then click a city in the local system's time zone. Alternatively, you can scroll through the list in the combo box and highlight the appropriate selection. Put a check mark in the box next to System clock uses UTC if the system clock is set to UTC (page 1062).
Specify the root password twice to make sure you did not make a mistake typing it.
Tip: Install KDE to follow the examples in Chapter 4
Chapter 4 uses examples from KDE to introduce the graphical desktop. Install KDE if you want to follow these examples. You can remove KDE later if you like. To install KDE, click the radio button next to Customize now on the Software Selection screen and follow the instructions in the text.
As the Software Selection screen explains, by default Anaconda installs a basic Fedora Core system including software that allows you to use the Internet. See Figure 3-7 (next page). The screen has three boxes that you can put check marks in to select additional categories of software to install:
Figure 3-7. The Software Selection screen
Toward the bottom of the screen are two radio
In most cases it is a good idea to customize the software selection before installation. The examples in Chapter 4 are based on KDE. If you want to follow these examples, click the radio button next to Customize now and follow the instructions in the next step.
When you select Customize now in the preceding step, Anaconda runs the pirut utility (page 483), which allows you to specify the software you want to install. Regardless of the software you select now, you can use pirut to change which software is installed on a system any time after the system is up and running (as long as the system can connect to the Internet).
utility displays two adjacent
Figure 3-8. The pirut package selection utility with KDE selected
Clicking Next on the Begin Installation screen (Figure 3-9) begins the process of writing to the hard disk. First Anaconda partitions and formats the disk as necessary; next it installs Red Hat Linux based on what you have specified in the preceding screens, placing a log of the installation in /root/install.log and a Kickstart file (page 63) in /root/anaconda-ks.cfg. Clicking Back allows you to step back through the installation screens and make changes. To completely change the way you set up Fedora Core, you can press CONTROL-ALT-DEL to reboot the system and start over. If you reboot the system, you will lose all the work you did up to this point. Click Next to install Red Hat Linux.
Figure 3-9. The Begin Installation screen
Caution: This is when Anaconda writes to the hard disk
You can abort the installation by pressing CONTROL-ALT-DEL at any point up to and including the Begin Installation screen (Figure 3-9) without making any changes to the system. Once you press Next in this screen, Anaconda writes to the hard disk. However, if Anaconda displayed the initialize warning dialog box (page 49), when you clicked Yes , it wrote to the hard disk at that time.
Installing Red Hat Linux can take a while. The amount of time it takes depends on the hardware you are installing the operating system on and the number of software packages you are installing. If you are installing from CDs, Anaconda will periodically prompt you to switch CDs.
When Anaconda is finished, it
Firstboot: When You Reboot
When the system reboots, it is running Red Hat Linux. The first time it boots, Red Hat Linux runs Firstboot, which asks a few questions before allowing you to log in.
There is nothing for you to do on the Welcome screen (Figure 3-10). Click Forward .
Figure 3-10. The Welcome screen
After the Welcome screen, Firstboot displays the License Agreement screen. Select Yes, I agree to the License Agreement if you agree with the terms of the license agreement and click Forward .
Next you are given the opportunity to set up a very basic firewall. First select
from the Firewall combo box (Figure 3-11). If you enable the firewall, select the services that you want the firewall to allow to pass through to the system. These services are the ones that the system is providing by means of servers you set up. For example, you do not need to enable WWW to browse the Web using Firefox; you need to do so only if you want to set up an Apache (HTTP) server. Selecting
does not allow HTTPS (secure HTTP), which is used for secure browser connections to financial institutions and when giving credit card information, through the firewall. Select
Secure WWW (HTTPS)
to allow secure HTTP to pass. In the Other Ports text box, list other ports and protocols you want the firewall to pass. The Firewall screen is the same as the one displayed by the
Figure 3-11. The Firewall screen
SELinux, which stands for Security Enhanced Linux, enforces security policies that limit what a
Date and Time
The next screen allows you to set the date and time. Running the Network Time Protocol (NTP) causes the system clock to reset itself periodically from a clock on the Internet. If the system is connected to the Internet, you may want to enable NTP by clicking the Network Time Protocol tab and
Next Firstboot displays the Display screen, which allows you to specify the type, resolution, and
The next screen allows you to set up user accounts. You can set up user accounts either now or after the system is fully operational. For more information refer to "Configuring User and
The Sound Card window identifies the sound card(s) and has a button that can play a test sound. You can specify the default audio card and PCM (digital audio) device from the Sound Card screen. Click Finish .
When the Sound Card screen
Initializing Databases and Updating the System
After booting the system, log in as or su to root . Update the whatis database so that whatis (page 146) and apropos (page 145) work properly. Next update the locate database so that locate works properly. (The locate utility indexes and allows you to search for files on your system quickly and securely.) Instead of updating these databases when you install the system, you can wait for cron (page 547) to run them overnight, but be aware that whatis , apropos , and locate will not work until the next day. The best way to update these databases is via the cron scripts that run them daily. Working as root , give the following commands:
# /etc/cron.daily/makewhatis.cron # /etc/cron.daily/mlocate.cron
These utilities run for several minutes and may complain about not being able to find a file or two. When the system displays a prompt, the whatis and locate databases are up-to-date.
If the system is permanently connected to the Internet, you can set up yum (page 476) to update the system software and utilities nightly. If it is connected to the Internet periodically, you must run yum manually to update the system. Working as root , give the following commands:
# /sbin/service yum start # /sbin/chkconfig yum on
See page 482 for more information.