Installing Fedora Core is a simple and straightforward task on most modern computers.
To install Fedora Core, you’ll need the installation media and your computer. If you are going to use a local area network or broadband Internet connection, it’s recommended that you have it connected during the installation process.
Be sure to check the system requirements in the release notes at http://fedora.redhat.com/docs/release-notes/ or in the root directory of the Fedora Core DVD or CD disc 1.
On your system, if you have any data that you want to preserve, back it up before installing Fedora Core, and test the integrity of the backup copy.
If your system already has Windows installed, and you intend to continue to use Windows, you will need to free up some space on the hard disk for Fedora Core. See Lab 10.1, “Resizing a Windows Partition ,” for instructions on shrinking a Windows disk partition (or deleting one that is unused).
There is an alternative to repartitioning your disk: you can install an additional disk drive in your system and use that drive for Fedora, or use an external USB or FireWire drive.
Insert your installation media (DVD, CD, or USB stick, or plug your system into a network with a PXE network boot server) and turn your system on. If it does not boot from the installation media, change your system BIOS settings to boot from it.
The first thing you will see is the boot screen shown in Figure 1-1.
boot: prompt at the bottom of the screen lets you configure special options. You can press Enter for a standard, graphical installation, or you can type
linux followed by any of the keywords in Table 1-3 to specify particular options for the installation session. Table 1-4 lists hard disk device names.
Additional installation boot options are discussed in Chapter 10.
Table 1-3. Fedora Core basic installation options
||Uses 640×480 screen resolution.||Use if you are installing with a very old monitor.|
||Specifies a standard video resolution.||Use if the installer does not correctly detect your monitor capabilities and the video signal is out of range.|
||Uses text mode for installation (no graphics mode or mouse access).||Use this if graphics are garbled or slow when using the regular installer.|
||Ask the user for the installation method (source of the software to be installed).||The installer will automatically ask if the boot media is a USB flash drive or a network boot. For a CD or DVD installation, the installer will assume that you’re installing from the CD or DVD unless the |
||Specifies the installation ||For the |
||Enables the use of a driver disk with additional device driver modules.||Use this to install onto hardware that requires driver modules not included in Fedora Core 6.|
Table 1-4. Hard disk device names
|Device name||Disk type||Controller||Unit|
|/dev/hda||Parallel ATA (IDE)||Primary||Master|
|/dev/hdb||Parallel ATA (IDE)||Primary||Slave|
|/dev/hdc||Parallel ATA (IDE)||Secondary||Master|
|/dev/hdd||Parallel ATA (IDE)||Secondary||Slave|
|/dev/hde||Parallel ATA (IDE)||Auxiliary #1||Master|
|/dev/hdf||Parallel ATA (IDE)||Auxiliary #1||Slave|
|/dev/hdg||Parallel ATA (IDE)||Auxiliary #2||Master|
|/dev/hdh||Parallel ATA (IDE)||Auxiliary #2||Slave|
|/dev/sd<X>||SATA, SCSI, IEEE1394, or USB||
<X> is |
For example, if you are using a CD for booting, and you want to use text mode and to be asked for the installation method, enter this boot string:
At this point—if you are installing from DVD or CD set—a media-check tool enables you to test the DVD or CD set, as shown in Figure 1-4. Press Enter to test the discs (optional), or press Tab and then Enter to skip the media check. The tests will take 2–6 minutes per CD or 8–12 minutes per DVD on a modern computer.
Some disc burning programs will pad the image before burning it, adding additional data to the end of the disc. This will cause the disc to fail the media check even though the disc is valid.
Select the language to use during installation using the up/down cursor keys, and then press Enter to proceed. The keyboard selection screen shown in Figure 1-6 will appear.
Select the entry that matches your keyboard and press Enter.
If you included the
askmethod keyword at the boot prompt or booted from a
USB flash disk or a PXE boot server, the installation method dialog shown in Figure 1-7 will appear next.
If you select an installation method that is network-based (NFS, FTP, or HTTP), you will be presented with a network configuration screen where you can enable automatic IP configuration through DHCP and select IPV4 (used on most networks) and/or IPV6. If you do not enable DHCP support, an additional page will appear to collect the IP settings (IP address, netmask, DNS server, and gateway). In most established networks (including small business or home networks with a broadband Internet connection through a router/gateway device), the IP settings can be obtained from a DHCP server. If in doubt, try the DHCP server option; if it fails, you will be given the opportunity to enter the network information manually.
If you select the
hard disk installation method, you will be prompted to select the disk device and path to the Fedora Core ISO images. Use Table 1-4 to determine the disk device, and append the partition number to the device name (for example, use
/dev/hda2 for partition 2 on the IDE primary master disk); for the path, enter the pathname of the directory containing the ISO images, using the
/) character to separate directories instead of the Windows-style backslash (
At this point, control of the system passes from the boot media to the installation media. For example, if you’ve used a USB flash drive to boot and HTTP for the installation method, it is at this point that the system switches over to software from the HTTP server.
If you’re using a graphical installation, the graphical environment will be started now, and the splash screen shown in Figure 1-8 will appear. Click Next to proceed.
If your mouse is not working, you can activate a graphical button on the installation screen by using the keyboard; just press Alt and the letter underlined in the button label. For example, to view the release notes while on the splash screen in Figure 1-8, press Alt-R (because R is underlined on the Release notes button).
If you are using a text-mode installation, you will see a text-based version of each of the following screens; the layout may be slightly different to accommodate the available screen space and the absence of a mouse pointer. Use the Tab key to navigate among the controls on the text screen.
You cannot manually create a new Logical Volume configuration using the text-mode installer.
The installation program will check to see if you have an existing Fedora installation; if you do, it will offer you the option of upgrading the current system instead of performing a new installation (Figure 1-11).
Choose Install Fedora Core if you want to replace your existing installation, or “Upgrade an existing installation” if you want to upgrade your existing Fedora system to Fedora Core 6. Click Next.
This dialog may appear if you previously started a Fedora installation, but aborted the installation process before it was finished (producing a partially installed system). In that case, choose Install rather than Upgrade to ensure that the new system is complete.
If you have an existing Fedora installation and you want to replace it with Fedora Core 6, but you wish to preserve the data in your home directories, and the home directories have their own filesystem or partition, you can choose Upgrade.
If you choose Install, skip to the next section titled “Performing a New Fedora Installation.” Otherwise, the screen shown in Figure 1-12 will appear, asking what you want to do with the bootloader configuration.
Click Next. After a few seconds, the screen shown in Figure 1-13 will appear.
This is the point of no return. Click Next to proceed with the upgrade, but remember that the upgrade process must run to completion and cannot be safely interrupted. The Fedora installer will analyze the software installed in your existing Fedora system, determine what needs to be updated, and install the new packages.
If any of your hard disks are empty and have not been previously used, the warning message displayed in Figure 1-14 will appear. If the drive contains data that you wish to preserve, abort the installation and boot into your existing operating system, figure out why the disk does not show a partition table, and restart the installation. Otherwise, click Yes to continue the installation.
The installer will now ask what you want to do about partitioning, as shown in Figure 1-15. In most cases, there are four options available:
This will wipe out everything on the drive and use the entire drive for Fedora Core. Select this option on a new computer or a computer you want to convert for use entirely with Fedora Core. This is also the right option to use when you are installing Linux on a second (or third) disk drive, leaving the software and data on the other drives untouched—but be careful that only the Fedora Core drive is selected in the list of available disks.
If you have more than one disk drive installed, you will be able to select the drive(s) to be used for Fedora using the checkboxes in the rectangle labeled “Select the drive(s) to use for this installation.” Refer to Table 1-4 for Linux disk names.
At the bottom of this screen, be sure to select the checkbox labeled “Review and modify partitioning layout” so that you will have an opportunity to see the proposed disk layout before it is used. Click Next to continue.
If you have selected an option that involves removing an existing partition, you will see the partition-removal warning shown in Figure 1-16. Review the information shown, and then click Yes to confirm that you are prepared to remove the partitions listed.
By default, Fedora Core uses a system called Logical Volume Management (LVM). A partition managed using LVM is called a physical volume (PV). Storage space from one or more PVs is used to create a pool of storage called a volume group (VG). Out of this pool of storage, one or more virtual partitions are created; each virtual partition is a logical volume (LV). Figure 1-17 illustrates the relationship between these components.
LVM has several advantages over traditional partitioning:
Logical volumes can be resized, enabling you to shift space between filesystems without reinstalling the system.
Logical volumes can span multiple physical volumes, enabling the use of filesystems that are larger than one physical disk.
Additional storage can be added to existing filesystems—for example, you can add a new disk drive and add that storage space to the home filesystem.
Data can be migrated from one drive to another.
Chapter 6 delves into more detail regarding LVM.
Although logical volumes can be enlarged or reduced at any time, the ext3 filesystem that Fedora uses can be enlarged only while it is in use. It must not be in use when it is reduced in size. This can make it fairly complicated to shrink an ext3 partition. Because it’s difficult to determine how much disk space each filesystem will require in the future, it is a good idea to make Fedora filesystems no larger than necessary at first, and then add space to them as required. This avoids the need to reduce the size of one LV in order to increase the size of another.
In order to use Fedora Core’s hibernate feature, you will also need a swap partition (either instead of or in addition to swapspace on a logical volume). See Lab 3.1, “Power Management,” for more information on hibernation.
If you have selected a partitioning option that includes the default layout and have selected the checkbox to review and modify the layout, the screen in Figure 1-18 will appear at this point in the installation.
The table on the bottom half of the screen contains two sections: one for LVM volume groups and one for hard disks. The default layout creates a 100 MB boot partition, and takes all remaining available disk space on all drives and places it in a single volume group named VolGroup00. The space in this volume group is then divided into two logical volumes: LogVol00 for the root filesystem and LogVol01 for swap space (virtual memory).
There are three improvements that we are going to make to the default Fedora Core partition/LVM layout:
A separate LV will be used for the /home filesystem, so that users’ home directories are separated from the operating system. This will enable you to wipe out the operating system and reinstall it (or install another distribution of Linux or a later version of Fedora Core) without affecting the users’ files.
The LVs will be reduced in size so that they are no larger than necessary. Surplus disk space can be left unassigned within the volume group and added to logical volumes as needed; this eliminates the need to perform complex operations to shrink one volume group in order to grow another.
The volume group and logical volume names will be replaced with more descriptive text.
To make these changes, double-click on the line in the table that reads VolGroup00 and then click the Edit button. The Edit LVM Volume Group window will appear, as shown in Figure 1-19.
Start by changing the Volume Group Name at the top of this window from
main. Next, click on the entry that has a mount point of
/ and click Edit; the Edit Logical Volume window shown in Figure 1-20 will appear.
Change the Logical Volume Name to
root, and change the size to a value that is closer to the size of the installation. I recommend 8,000 MB (i.e., 8 GB; most server and desktop systems will take 2–6 GB of space to install, so 8 GB gives a modest amount of headroom). Click OK when you are done.
Figure 1-21 shows the settings that repeat the process for the other predefined LV: click on this LV and then click Edit. Change the Logical Volume Name to
swap, leaving the size at the default value. Click OK when you are done.
Finally, click the Add button and create a new Logical Volume to hold the home directories, as shown in Figure 1-22. Set the Mount Point to
/home, the File System Type to
ext3, the Logical Volume Name to
home, and then set a reasonable size for storing the users’ home directories (if you’re not sure what value to use, start with
1000). Click OK when you are done.
Review the final disk partition and LVM layout, and then click Next. The bootloader configuration screen will appear, as shown in Figure 1-23.
The default bootloader configuration replaces any existing bootloader installed on the main hard disk. If you have more than one operating system installed, the bootloader will ask you which OS to boot when the system is started. If you have a Windows boot partition present, it will be listed as a boot option, but it will be labeled Other. To change this label to something more descriptive, click on that entry, and then click Edit. Enter the text of your choice, such as
Professional, and then click OK.
It is a good idea to install a bootloader password. Without this, any person with physical access to your machine will be able to easily override all security by booting the system into single-user mode. Click “Use a boot loader password” and then enter your selected password twice when prompted.
The bootloader password is a critical piece of information—don’t lose it!
Click Next to proceed.
If you have not already configured the network, and you have a network adapter installed in your system, the network configuration screen appears next, as shown in Figure 1-24.
If you have a DHCP server on your network—which is the case in most large networks and in most small office and home networks that have a broadband Internet gateway/router device—then you will only need to change the “Set the hostname” option to “manually” and then enter the hostname of your choice (unless your DHCP server sets the hostname for you). If you have a registered domain, choose a hostname within that domain, such as bluesky.fedorabook.com (which specifies the host bluesky within the domain fedorabook.com); otherwise, choose a hostname and append .localdomain to the end of the name.
If you do not have a DHCP server on your network, select your primary Ethernet card from the Network Devices list and then click Edit. You will see the Edit interface window shown in Figure 1-25. Click on the “Configure using DHCP” option to deselect that checkbox, then enter the IP address and netmask. Click OK to save this information, and enter the hostname, gateway, and DNS server information in the blanks provided (it is necessary only to enter a Primary DNS server).
Click Next to proceed to the next step in the installation, which is time zone selection, as shown in Figure 1-26.
Click on your region of the map to zoom in, and then click on the major city closest to your location—or use the pull-down menu to select your time zone.
You can choose to configure the system’s hardware clock to store information in local time or in Coordinated Universal Time (UTC). This is controlled by the checkbox labeled “System clock uses UTC.” If you are using multiple operating systems on your computer (dual-boot), to use local time, deselect the checkbox so that the other operating system will interpret the time correctly.
If you are using only Fedora, or Fedora and another distribution of Linux, choose UTC by selecting the checkbox. This will avoid multiple adjustments of the clock when entering or exiting daylight savings time.
Click Next to proceed.
The screen in Figure 1-27 requests that you enter a root password for the system (twice). This is the master system administration password, so be sure to safeguard it against both theft and loss.
Choose passwords that are easy for you to remember but hard for others to guess. One way to do this it to choose a line or verse from a song, poem, book, or play, and use the first letter from each word plus the punctuation marks. For example, from Shakespeare’s line “Do you bite your thumb at us, sir?” you would derive the password Dybytau,s?
The next screen, shown in Figure 1-28, is used to select the software that will be installed. Use the checkboxes to select the categories of applications that you wish to have installed. To further refine the software selection, select the “Customize now” option; this is recommended if you are installing on a system with minimal disk space or a slow Internet connection.
When installing from DVD or CD, the button labeled “Add additional software repositories” can be used to add a Fedora Updates network repository to ensure that the latest versions of the Fedora Core packages are installed. This can be somewhat faster than installing the disc version of all packages and then updating the software after installation, but it requires a good Internet connection (or local repository). See Lab 5.3, “Using Repositories,” for more information.
Click Next to continue. If you selected “Customize now,” you will see the screen shown in Figure 1-29. Otherwise, skip ahead two paragraphs.
Select a category on the left side to see the package groups within that family on the right side. Use the checkboxes provided to select the groups you want. For even finer control, you can select a package group, click the “Optional packages” button, then select the individual packages you wish to include from the window shown in Figure 1-30.
Click Next to continue. After a short time for dependency processing, the screen shown in Figure 1-31 will appear.
This is the point of no return; once you click Next, the partition table, filesystems, and bootloader will all be modified. Once the installation process begins, it cannot be safely interrupted and must be allowed to run to completion. During the installation, a progress bar similar to the one in Figure 1-32 will be shown.
Bored? You can read the release notes during the installation; just click on the button in the lower-left corner of the screen.
When the installation is complete, the confirmation message shown in Figure 1-33 is displayed. Remove the installation boot media, and then click Reboot to start up the new system.
On some systems, you may need to click Reboot and wait for the system to start the boot process before you can remove optical media.
The first time you boot your freshly installed Fedora system, you will be asked a few questions to finish up the initial configuration. The display shown in Figure 1-34 will greet you; as you work through the questions, the arrow on the lefthand side of the screen will move downward to indicate your progress.
Click Forward to enter the firewall configuration screen. I strongly recommend that you leave the firewall enabled, and that you initially select only ssh as a trusted service. You can loosen your firewall to permit other inbound services later, as you set those services up.
Click Next to proceed to SELinux configuration. SELinux hardens the Linux kernel against attack. Although it can be a bit difficult to configure at times, the protection that it provides is well worth the extra effort. SELinux is covered in more detail in Lab 8.2, “Using SELinux.” For now, leave the Modify SELinux Policy option at its default setting; you can always adjust SELinux later.
Click Forward to proceed to the date and time configuration screen. Select the current date by clicking on the calendar, and enter the current time into the fields provided.
If you have an always-on Internet connection, click on the Network Time Protocol tab. Select the checkbox labeled Enable Network Time Protocol. This will configure your system to communicate with timeservers on the Internet to keep the clock closely synchronized to official time. This is valuable because it ensures that time and date stamps on your system are always accurate.
You can edit the list of timeservers that can be contacted using the Add, Edit, and Remove buttons beside the server list. The NTP Server Pool Project maintains a pool of publicly accessible timeservers; the default server list (0.fedora.pool.ntp.org, 1.fedora.pool.ntp.org, and 2.fedora.pool.ntp.org) configures your system to randomly select up to three timeservers from the pool at boot. To use a timeserver in your country, use your ISO country code as the hostname within the pool.ntp.org domain; I’m in Canada, so a server in my country could be found using the name ca.pool.ntp.org.
Click Next to proceed on to creating the first user. The root password that you entered during installation is used only for system administration and should not be used for day-to-day work. This screen lets you create the first user account; you can create as many additional accounts as you want later (see Lab 4.7, “Managing Users and Groups”).
Fill in the four fields on this screen:
Choose a username that contains no spaces and starts with a letter. This name will be used for logging in and will also serve as the user’s local email address (typically, this is not intended to replace the email address you got from your ISP or mail provider; it is generally used to receive system notices and other local messages). I recommend using only lowercase letters, digits, underscores, and periods. If you are setting up a home or personal system, first names work well; for a corporate server, full names in firstname.lastname form reduce the likelihood of confusion between users (now and in the future).
Enter the user’s full name (for example,
Enter a password that is easy to remember and hard to guess. Just like the root password, using the first letter from each word plus the punctuation from an obscure line of text can be helpful (for example,
FL:AcgtRHcd. for “Fedora Linux: A complete guide to Red Hat’s community distribution.”).
If the button in the lower-righthand corner of the screen reads Forward, there is one more step. Click on that button to proceed to the the sound card check screen.
On this screen, click on the Play button (labeled ) and adjust the volume slider until you hear a guitar strum on the right, left, then the center channel of your sound system. If you don’t hear anything, check your speaker power, physical volume control, and sound connections (if you have multiple sound cards, use the device tabs on the left side to switch between them), clicking Play after each adjustment (or just select the Repeat checkbox).
If you can’t get sound working at this point, don’t worry; you may just need access to some of the advanced mixer controls, which you can experiment with later (see Lab 2.6, “Configuring Sound”).
Tools for adding and removing software (see Chapter 5).
A tool that checks the system at boot time to see if any hardware has been added or removed, and adjusts the system configuration appropriately.
Graphical tools to configure individual system components.
Because the hard disk is in an unknown state and the CD is not writable during the installation session, Anaconda uses a ramdisk—an area of memory configured to act like a disk drive—as the filesystem while it is running. After interacting with you to get the configuration details, Anaconda partitions and formats the hard disks and mounts them. It then starts installing RPM packages containing the selected software. Finally, it reboots the system.
Each time the system boots, the init script /etc/rc.d/init.d/firstboot is executed. If the file /etc/sysconfig/firstboot does not exist, the Python script /usr/sbin/firstboot is executed to ask the initial configuration questions.
You can rerun the firstboot script by adding
reconfig to the boot parameters when the system is started (boot parameters are entered in the same way as runlevels are during the boot process; see Lab 4.5, “Using Runlevels”). The sequence of steps used during a reconfiguration is slightly different and longer from that used when the script executes for the first time; for example, you can change the system’s default language during reconfiguration.
If you are not using a bootloader password, then any user with physical access to your computer can reset the password of any account on the system using the
reconfig boot argument.
Fedora is a community-based project, and the Fedora community is very helpful. The best places to turn for help are the Fedora Forum and the Fedora mailing lists. You can also access help using IRC (see Lab 9.2, “Using IRC,” for more information).
The Fedora Core release notes: http://fedora.redhat.com/docs/release-notes/
The Anaconda web page: http://fedora.redhat.com/projects/anaconda-installer/
The Fedora Forum: http://fedoraforum.org