3
Installation
CERTIFICATION OBJECTIVES
3.01 Selecting an Installation Option
3.02 Required Disk Space
3.03 Filesystems
3.04 The Installation Process
3.05 Boot Loaders: GRUB and LILO
3.06 Creating Partitions: Details
3.07 Other Installation Sources
3.08 Viewing Boot Time Information
3.09 Postinstallation Validation
3.10 Sample Installation Exercises
✓
Two-Minute Drill
Q&A
Self Test
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
Blind Folio 3:95
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
Blind Folio 3:95
D:\omh\CertPrs8\485-1\ch03.vp
Wednesday, September 18, 2002 9:48:05 AM
Color profile: Generic CMYK printer profile
Composite Default screen
I
nstallation is one of the three parts of the RHCE exam. To pass this part of the exam, you’ll
need to know a lot more than just the basic GUI installation process for a single computer!
Once you’ve studied the installation chapters (2, 3, and 5), you’ll be able to install Red Hat
Linux in a number of ways: directly from the CD, using boot disks, managing special situations
on laptop computers, accessing from networks, and using automated Kickstart-based tools.
While this chapter covers the “basics,” the basics are important. You’ll learn the
nuances of different installation classes. Both fdisk and Disk Druid are useful tools
for configuring your hard drives. Both GRUB and LILO are popular and flexible
options as boot loaders. And if you’re managing a LAN and don’t want to spend all
night inserting CDs and typing in commands at every computer, you need to learn
how to install Red Hat Linux in various network configurations.
Many users download their version of Red Hat Linux directly from one of many
FTP sites on the Internet. That is a common practice in a software world governed
by the Linux General Public License. There are four basic installation routes that
you can take—but they all use the same packages, and customization is possible in
each case.
All you need to get started is sufficient unformatted free disk space. The easiest
way to get this is by adding a new disk drive to your system. The mechanics of adding
a drive and changing your CMOS settings (so your CD-ROM is a bootable device)
are beyond the scope of this book, but neither operation is complicated. Once the new
drive is installed and your system is configured to boot from the CD-ROM drive,
just stick the first Red Hat Installation CD-ROM into the CD drive and reboot!
Take the defaults for a Workstation installation and see what happens; it will probably
just install, dual-boot automatically, and voilà! You are ready to play!
As you prepare for the RHCE exam, remember to think in terms of what is
practical. While it is important to know how to download and set up a Red
Hat Installation CD, it wouldn’t be practical for a group of students to all
be downloading the Red Hat installation CDs during an actual exam.
96
Chapter 3: Installation
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
D:\omh\CertPrs8\485-1\ch03.vp
Wednesday, September 18, 2002 9:48:06 AM
Color profile: Generic CMYK printer profile
Composite Default screen
CERTIFICATION OBJECTIVE 3.01
Selecting an Installation Option
Red Hat Linux includes its own installation program. The graphical version of this
program is known as Anaconda. There are five basic directions you can take during
the installation process: Personal Desktop, Workstation, Server, Custom, and Upgrade.
This section will help you understand the implications of each of these choices, as
illustrated in Figure 3-1.
Time is usually of the essence on the RHCE exam. As text mode installation is
the fastest way to install Red Hat Linux, all of the Figures in this chapter are
based on that installation method.
The two most important options are Workstation and Server. Almost by definition,
a Workstation installation is much simpler than a Server installation. Furthermore,
Workstation installs are optimized for local user applications associated with the X
Window system. While many Linux administrators don’t even bother installing the
X Window on a Linux server, expect to install the X Window for regular users.
Selecting an Installation Option
97
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
FIGURE 3-1
Red Hat
installation
options
D:\omh\CertPrs8\485-1\ch03.vp
Wednesday, September 18, 2002 9:48:06 AM
Color profile: Generic CMYK printer profile
Composite Default screen
It’s important for administrators to know how to configure the X Window
on a Linux computer.
The server installation includes more network servers and management features.
The default Red Hat Linux server includes several distinct partitions that make up
the filesystem, including separate /usr, /home, and /var directories. By splitting out
the /home directories to one partition, disk quotas can be maintained on just that
filesystem, and backups and restores are more specific. With smaller filesystems, it is
easier to recover from a disaster. In addition, it is easier to expand a smaller filesystem.
Depending on your needs, you can set up a system with anywhere from 500MB
to 4.7GB of files. Of course, you have to have additional room for user files, log files,
and any additional applications that you may want to install in the future.
The essence of each installation is in the installed packages. As you examine each
of the options, focus on the installed packages.
Several partitions are associated with specific sizes. For example, the current default
size for /boot is 100 MB. The actual size that you see in your installation will vary
depending on the size and number of cylinders on your hard drive(s).
Personal Desktop
The Personal Desktop option includes packages for basic Linux users. Generally, more
experienced users like yourself will use the Workstation or Server installation options.
The following lists the minimum disk space requirements for a basic US Personal
Desktop installation.
■
Personal Desktop with GNOME or KDE: 1.8GB
■
Personal Desktop with GNOME and KDE: 1.9GB
Please note, these figures may vary slightly from those shown in the Red Hat Linux
documentation. They were taken from a sample installation of the latest Red Hat
Linux beta available at the time of this writing.
This is just the minimum disk space required for Linux packages and other files.
You’ll also need a swap partition. In the default configuration, Red Hat Linux sets
up a swap partition that is twice the size of the detected RAM. You’ll also require
more for actual data files such as documents, downloads, source files, and more. If
you’ve set up additional partitions for separate directories such as /home, /usr, and
/tmp, the space requirements will also increase.
98
Chapter 3: Installation
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
D:\omh\CertPrs8\485-1\ch03.vp
Wednesday, September 18, 2002 9:48:06 AM
Color profile: Generic CMYK printer profile
Composite Default screen
If you are testing Linux for the first time, add at least several hundred megabytes
of additional space; more if you plan to reconfigure your kernel. With other applications
available during Red Hat Linux installation, you may need 4GB or more of disk space.
Behind the Scenes: The Partition Layout for Personal Desktop
The Personal Desktop installation option first deletes all Linux partitions. Other
partitions, such as those created for Microsoft Windows filesystems such as VFAT
and NTFS, are untouched. The deleted Linux partitions are added to the free space
on your hard drive. Then the default Workstation installation configures the following
three partitions in that free space:
■
A swap partition twice the size of your RAM. (This may change if the amount
of RAM is large or the size of your hard drive is small.)
■
A 100MB /boot partition.
■
A variable-sized partition for the root directory, configured to consume all
remaining free space.
As of Red Hat 8.0, there is no longer a separate installation option for laptop
computers.
Dual-Boot with Previous OS
Any previous operating system that existed on the machine is left intact. This provides
several advantages. It is appropriate on a test or development computer where you
need both operating systems. Alternatively, if you’re making the transition to Linux,
you may still need the old operating system for a few files and applications.
Please note, the figures for required hard disk space may vary from those shown
in the Red Hat Linux documentation. They were taken from a sample installation
of the latest Red Hat Linux beta available at the time of this writing.
Workstation
The following lists the minimum recommended disk space requirements for a basic
workstation installation.
■
Workstation with GNOME or KDE: 2.1GB
■
Workstation with GNOME and KDE: 2.3GB
Selecting an Installation Option
99
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
D:\omh\CertPrs8\485-1\ch03.vp
Wednesday, September 18, 2002 9:48:06 AM
Color profile: Generic CMYK printer profile
Composite Default screen
This is just the minimum disk space required for Linux packages and other files.
You’ll also need a swap partition. In the default configuration, Red Hat Linux sets
up a swap partition that is twice the size of the detected RAM. You’ll also require
more for actual data files such as documents, downloads, source files, and more. If
you are testing Linux for the first time, add at least several hundred megabytes of
additional space; more if you plan to reconfigure your kernel.
Behind the Scenes: The Partition Layout for Workstation
The Workstation installation option first deletes all Linux partitions. Other partitions,
such as those created for Microsoft Windows filesystems such as VFAT and NTFS,
are untouched. The deleted Linux partitions are added to the free space on your hard
drive. Then the default Workstation installation configures the following three
partitions in that free space:
■
A swap partition twice the size of your RAM. (This may change if the amount
of RAM is large or the size of your hard drive is small.)
■
A 100MB /boot partition
■
A variable-sized partition for the root directory, configured to consume all
remaining free space
The Apache Web Server package is not installed with a Workstation
installation. You can add the required packages at any time using the
rpm utility.
Dual-Boot with Previous OS
Any previous operating system that existed on the machine is left intact. This provides
several advantages. It is appropriate on a test or development computer where you
need both operating systems. Alternatively, if you’re making the transition to Linux,
you may still need the old operating system for a few files and applications.
Workstation Option Packages Installed
The list of file packages installed by a default Workstation installation is listed on the
CD-ROM in /RedHat/base/comps.xml. This list contains references, either directly
or indirectly through the use of group names, to the hundreds of packages installed.
Each package contains at least one file, and sometimes dozens or more.
100
Chapter 3: Installation
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
D:\omh\CertPrs8\485-1\ch03.vp
Wednesday, September 18, 2002 9:48:06 AM
Color profile: Generic CMYK printer profile
Composite Default screen
Selecting an Installation Option
101
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
<group>
<id>workstation-common</id>
<uservisible>false</uservisible>
<name>Workstation Common</name>
<grouplist>
<groupreq>base</groupreq>
<groupreq>base-x</groupreq>
<groupreq>admin-tools</groupreq>
<groupreq>editors</groupreq>
<groupreq>sound-and-video</groupreq>
<groupreq>dialup</groupreq>
<groupreq>office</groupreq>
<groupreq>graphical-internet</groupreq>
<groupreq>text-internet</groupreq>
<groupreq>authoring-and-publishing</groupreq>
<groupreq>printing</groupreq>
<groupreq>graphics</groupreq>
<groupreq>games</groupreq>
</grouplist>
</group>
Notice that the workstation contains 13 groups (referenced by the <groupreq>
container preceding the group name) of software packages. You can use this syntax
to customize the installation process, if you use the automated Kickstart system
discussed in Chapter 5.
Server
The server option includes a default group of packages that allow you to manage this
computer as a Linux Server. Before starting a server installation, move any data that
you might need from this computer. The server installation removes all partitions
on all disks.
This installation option removes all partitions on all disks.
Server Partitions
The default Red Hat Linux 8.0 server installation includes packages that require at
least 735MB of total disk space. However, since these packages are installed in
different partitions, considerable additional hard disk space is required. The default
installation sets up seven different partitions: three primary, one extended, and
three logical partitions, as shown in Table 3-1.
D:\omh\CertPrs8\485-1\ch03.vp
Wednesday, September 18, 2002 9:48:06 AM
Color profile: Generic CMYK printer profile
Composite Default screen
The Custom Installation Option
The Custom Installation option provides the most flexibility for an experienced Linux
or Unix administrator. This option allows you to select all of the package groups that
you need. If you know exactly what you want, you can even select from a list of
individual RPM packages.
Selecting Package Groups
The custom installation process allows you to select as many of the package groups as
you need. Each group encompasses a list of RPM packages. As explained in Chapter 4,
102
Chapter 3: Installation
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
Partition Default Size
/ 500MB
/boot 100MB
/home Depends on available hard disk space
/usr Depends on available hard disk space
/var Depends on available hard disk space
Swap Twice available RAM
Extended Depends on available hard disk space
TABLE 3-1
Default Red Hat
Server Installation
Partitions
FIGURE 3-2
Red Hat Custom
Installation
Packages,
first screen
D:\omh\CertPrs8\485-1\ch03.vp
Wednesday, September 18, 2002 9:48:06 AM
Color profile: Generic CMYK printer profile
Composite Default screen
Selecting an Installation Option
103
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
some RPMs such as certain kernel libraries won’t work unless the appropriate C language
compiler is installed. These are known as dependencies. The Red Hat installation
program includes routines to make sure that all dependencies are satisfied.
Figures 3-2 through 3-5 show the various package groups available, based on the
Custom installation option. It is straightforward. Selected packages include a checkmark
in the box to the left of the package group name.
FIGURE 3-3
Red Hat Custom
Installation
Packages,
second screen
FIGURE 3-4
Red Hat Custom
Installation
Packages,
third screen
D:\omh\CertPrs8\485-1\ch03.vp
Wednesday, September 18, 2002 9:48:07 AM
Color profile: Generic CMYK printer profile
Composite Default screen
It’s important to pick only the package groups you need. Fewer installed packages
means more room for personal files for you and your users, as well as the log files
you need to monitor your system and actually get some use from your applications.
See the next section for more information on each package.
Understanding how these package groups work is important in a kickstart
installation, which is described in more detail in Chapter 5.
Packages
This section includes the briefest possible overview of each of the packages you can
select when you use the Custom installation option in Red Hat Linux. While the details
will vary as Red Hat Linux evolves, the spirit of what is installed by these packages is
relatively constant. Remember, some of these packages depend on others; for example,
if you want to install Dialup Support, Red Hat will make sure that you install Network
Support as well.
For complete details of the RPMs associated with each package, go to the first Red
Hat Linux installation CD, and read the comps.xml file in the /RedHat/base directory
in the text editor or Web browser of your choice.
These packages are based on the latest beta version of Red Hat Linux 8.0 available
as of this writing, and are therefore subject to change.
104
Chapter 3: Installation
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
FIGURE 3-5
Red Hat Custom
Installation
Packages,
fourth screen
D:\omh\CertPrs8\485-1\ch03.vp
Wednesday, September 18, 2002 9:48:07 AM
Color profile: Generic CMYK printer profile
Composite Default screen
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
Selecting an Installation Option
105
You can modify the comps.xml file to group packages in any way you desire.
Since the Red Hat installer, Anaconda, reads from the /RedHat/base/comps.xml
file on the installation directory, it will read any package group that you
choose to add to this file. You’ll see the result on one of the screens shown
in Figures 3-2, 3-3, 3-4, or 3-5.
Administration Tools
Red Hat is developing a series of graphical administration tools for Linux, such
as redhat-config-date and redhat-config-users. There are other Red Hat graphical
administration tools available as part of the Server Configuration Tools package group.
Authoring and Publishing
The Authoring and Publishing group includes support for several documentation
systems, such as DocBook and TeX.
DNS Name Server
The DNS Name Server group includes the tools you need to configure and maintain
a Domain Name System server on the local Linux computer. In the Linux world,
a DNS server is also known as a nameserver, based on the Berkeley Internet Name
Domain (bind).
Development Tools
This group includes a large number of development tools. Additional development
tools are included when you install other packages such as GNOME Development,
Graphics, Web Server, News Server, and more.
Editors
These include the basic text editors associated with Linux, including vi, emacs, and
joe. While it’s essential that you know vi to use the Linux rescue mode, the emacs
text editor may be the most popular text editor in the world of Linux and Unix. It
also requires an extensive series of packages, which makes it impossible to include
emacs on a rescue floppy that is limited to 1.44MB.
Engineering and Scientific
Red Hat Linux includes a group of packages for mathematical and scientific purposes,
such as gnuplot, pvm and units.
D:\omh\CertPrs8\485-1\ch03.vp
Wednesday, September 18, 2002 9:48:07 AM
Color profile: Generic CMYK printer profile
Composite Default screen
106
Chapter 3: Installation
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
FTP Server
This includes two of the more important FTP servers: anonftp and vsftpd.
GNOME Desktop Environment
The GNOME group includes the basic packages required to install the GNOME
Network Object Model Environment. While GNOME is the default GUI for Red
Hat Linux, the desktop manager that you configure does not matter for the exam.
GNOME Software Development
The GNOME group includes the basic packages required to develop additional GTK+
and GNOME GUI applications.
Games and Entertainment
Be careful with this package group. Do you really want to install games on a business
computing system? Some believe that computer games are useful to help newer users
to become comfortable with Linux.
Graphical Internet
Linux now includes a number of different GUI clients for Internet access, from the
mozilla Web browser, the xchat and gaim instant message utilities, and the evolution
and kmail e-mail readers. Closely related to the Text-based Internet package group.
Graphics
This package group automatically incorporates the X Window package, and a number
of graphical applications. This includes the most prominent Linux graphics application,
The GIMP. Depending on whether you also install GNOME and/or KDE, this also
installs graphical packages associated with each of these GUIs.
KDE
The KDE group includes the basic packages required to install the K Desktop
Environment, which is the main alternative GUI for Red Hat Linux. It is the default
GUI for a number of other Linux distributions.
KDE Software Development
The GNOME group includes the basic packages required to develop additional QT
and KDE GUI applications.
D:\omh\CertPrs8\485-1\ch03.vp
Wednesday, September 18, 2002 9:48:07 AM
Color profile: Generic CMYK printer profile
Composite Default screen
Selecting an Installation Option
107
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
Kernel Development
This group includes the very large Kernel source packages, which currently require
around 400MB of disk space. It also requires the installation of the Software
Development package.
Mail Server
This group includes the packages required to configure a sendmail based IMAP
or a postfix mail server.
Network Servers
This package group includes a number of smaller servers that are useful for running
a network, including DHCP, telnet, and rsh. It does not include larger network
daemons such as Apache, news, FTP, or DNS.
News Server
This is a simple group, incorporating the inn (Internet Network News) server.
Office/Productivity
This group includes two of the major Linux office suites, KOffice and openoffice, as
well as related packages such as pdf viewers. It is very large at around 300MB. If you
don’t need these tools on your Linux computer, you should consider leaving this out
of the installation.
Time is of the essence on the RHCE exam. If you choose not to install large
package groups such as the Office/Productivity package group, you may save
some time on the Server Installation and Network Services Setup exam.
Printing Support
Red Hat Linux currently includes support for two different print systems. The LPRng
system, short for Line PRinter, next generation, is based on the original lpr daemon
developed for Unix. Red Hat manages lpr-based printers well. Red Hat includes a
printer configuration utility, printconf-gui, which can automate the configuration
of the otherwise difficult /etc/printcap configuration file.
While Red Hat Linux also includes support for CUPS, this system is not included
in the Red Hat Linux 8.0 Printing Support package group. As of this writing, you’ll
need to install CUPS packages separately. CUPS is the Common Unix Printing System
D:\omh\CertPrs8\485-1\ch03.vp
Wednesday, September 18, 2002 9:48:07 AM
Color profile: Generic CMYK printer profile
Composite Default screen
108
Chapter 3: Installation
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
which supports the next-generation printing protocol, known as IPP. Once installed, it
can help detect network printers, with a Web-based interface.
As of this writing, LPRng is the default for Red Hat Linux 8.0; it is reasonable
to expect the RHCE 8.0 exam to focus on this print system. However, Red Hat
is in the process of moving to CUPS. Expect later RHCE exams to cover this
other print system. For the latest information, see the latest Red Hat exam
prep guide at www.redhat.com.
SQL Database Server
The structured query language (SQL) is one of the basic database languages. This
group includes support for the PostgreSQL and mysql database systems.
Server Configuration Tools
Red Hat is developing a series of server configuration tools for Linux, such as redhat-
config-bind and redhat-config-samba. There are other Red Hat graphical administration
tools available as part of the Administration Tools package group.
Sound and Video
Not surprisingly, the Sound and Video group installs the packages required to allow
you to use sound cards and interconnect the basic components of your sound and
video system: sound card, speakers, microphone, and CD/DVD drive.
System Tools
This package group includes a varied array of tools, from the Samba client to the
ethereal network traffic reader and the gnome-lokkit front end to the lokkit firewall
configurator.
Text-based Internet
Linux includes a number of different text-based clients for Internet access, from the
lynx Web browser, the ncftp FTP client, and the pine and mutt e-mail readers. These
are closely related to the Graphical Internet package group.
Web Server
The Web Server group installs Apache, Squid, and the extensive array of supporting
modules and configuration files.
D:\omh\CertPrs8\485-1\ch03.vp
Wednesday, September 18, 2002 9:48:07 AM
Color profile: Generic CMYK printer profile
Composite Default screen
Windows File Server
This is not a very complex group; it includes the Samba packages required to set up
Linux as a client and as a server on a Windows-based network.
X Software Development
The X Software Development group includes the basic packages such as XFree86-devel
required to develop additional GUI applications.
X Window System
This package group includes a number of basic Linux GUI fonts, libraries, and critical
tools such as redhat-config-xfree86.
Xconfigurator has been replaced by redhat-config-xfree86.
Upgrade Installation
The final option for installing the latest version of Red Hat Linux is to upgrade, which
allows you to upgrade packages from a previous version of Red Hat Linux. It does
not change any current partition. It does allow you to change the boot loader from
LILO to GRUB or vice-versa. And once your current packages are identified, you
can choose to upgrade those packages or more.
When you're planning an upgrade of any version of Red Hat Linux on several
computers, try the upgrade on a test computer first. If you have a working
service that you don’t want to change yet, such as Apache, you can exclude
those packages from the upgrade. If you’re ready to upgrade, remember to
back up your system first, or at least the configuration files that you used, so
that you can go back if something goes wrong.
Baseline Packages
Every installation of Red Hat Linux gets a series of packages, organized into the Core
and Base package groups. You can find a list of these on the first Red Hat Installation
CD-ROM in /RedHat/base/comps.xml, at the top of this text file. Figure 3-6 shows
the first few base packages from this file.
Selecting an Installation Option
109
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
D:\omh\CertPrs8\485-1\ch03.vp
Wednesday, September 18, 2002 9:48:07 AM
Color profile: Generic CMYK printer profile
Composite Default screen
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
CERTIFICATION OBJECTIVE 3.02
Required Disk Space
Most new computers come with very large disks, easily supporting even the nearly
5GB of files associated with a full installation of Red Hat Linux. If you do not have
this much space available, you should carefully consider the space requirements
associated with each type of installation. When considering the following options,
remember to leave adequate room for swap space, personal files, log files, and any
applications that you may want to install after Red Hat Linux installation is complete.
It’s common to install Linux on older computers with limited hard disk space.
Linux functions quite well on older computers. It’s common to configure such
computers as servers for DNS, DHCP, NIS, and more.
110
Chapter 3: Installation
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
FIGURE 3-6
Red Hat Linux
base packages
D:\omh\CertPrs8\485-1\ch03.vp
Wednesday, September 18, 2002 9:48:07 AM
Color profile: Generic CMYK printer profile
Composite Default screen
Required Disk Space
111
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
Workstation- and Personal Desktop Space Requirements
A Workstation-class installation, with GNOME or KDE (and swap space), normally
takes over 2GB free space, before you add other files. You can add additional
packages during the Red Hat workstation-class installation process. Personal
Desktop-class installation requirements are nearly identical.
Server-Class Space Requirements
The space requirements of a server-class installation can vary. By default, Red Hat
Linux installs less than 1GB of files in this type of installation. But the default Red
Hat server partition scheme sets up seven different partitions in this type of installation,
which requires nearly 4GB of disk space. Obviously, you can’t install everything,
which requires enough space for 4.7GB of files.
You can add additional packages during the Red Hat server-class installation process,
installing up to 4.7GB of files within the default partition setup.
Custom-Class Space Requirements
A custom-class installation requires around 500MB for a minimal installation and
over 4.7GB of free space if every package is selected.
The Everything option includes more packages than just selecting all the
specified groups, and thus it requires more disk space overall. To use automatic
partitioning, you must have enough free disk space available. If you do not
have enough free disk space, the automatic partitioning option will not work,
and you will be required to partition the disk.
How Much More Space Is Needed?
The question of disk space needed over and above operating system needs is always
relevant. You will require as much as it takes, and probably more. The absolute
minimum for a Red Hat Linux OS is around 500MB of disk space, if you install Linux
with few server services and without X. With 800MB, you could probably sneak in
X, but you still wouldn’t have enough room for a few server services and games. You
still should have at least 100MB or more to work with. And if you want GNOME
or KDE, you’ll need another 200MB or so.
For a Workstation installation, 2GB+ of disk space is merely a starting point;
you’ll likely need lots of additional space for user data. Fortunately, it is relatively
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
D:\omh\CertPrs8\485-1\ch03.vp
Wednesday, September 18, 2002 9:48:07 AM
Color profile: Generic CMYK printer profile
Composite Default screen
easy to add additional physical hard disks to Linux. You can then use tools like fdisk
and LVM as discussed here and Chapter 5 to expand your filesystem.
Then, if you are new to Linux, select either Workstation for a single dedicated user
or the Server option for Web, FTP, File and Print, DNS, and NFS services. If you
have some Linux or Unix experience, you will probably want to use the Custom
installation option for additional flexibility.
You’ll also need to remember swap space requirements. By default, Red Hat usually
configures a swap partition that is about twice the amount of RAM on your computer.
The actual amount of swap space that you may need is a highly debatable issue. Some
suggest that Linux computers can use a swap partition that is up to three or even four
times the amount of available RAM. Others suggest that at higher levels of RAM,
100MB of swap space is more than sufficient.
Remember, the true cost of disk space is the cost of the disk space itself plus
the cost of the backup media and associated backup hardware!
CERTIFICATION OBJECTIVE 3.03
Filesystems
In all of the preceding configurations, automatic partitioning sets up multiple volumes—
separate volumes on each directory. The advantage of separate partitions for certain
directories is that it limits the risks to your system. For example, many Webmasters
configure their Web sites to write daily log files with data relating to all users who
visit their sites. These files can become quite large, especially for large online merchants.
Before you decide how to set up partitions, you need to know about each of the
major Linux directories. Linux directories are organized according to something known
as the Filesystem Hierarchy Standard (FHS).
Filesystem Hierarchy Standard
The FHS is a standard for organizing directories for Linux- and Unix-based systems.
Every FHS-compliant operating system starts with a top directory, root, symbolized
by the forward slash. All other directories are subdirectories of root. The major FHS
directories are shown in Table 3-2.
112
Chapter 3: Installation
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
D:\omh\CertPrs8\485-1\ch03.vp
Wednesday, September 18, 2002 9:48:08 AM
Color profile: Generic CMYK printer profile
Composite Default screen
Why Separate Filesystems?
Unix was developed when disk space was scarce. As Unix was an operating system for
larger companies and universities, administrators could get multiple disks for each
Unix computer. They took advantage of the space by splitting up the filesystem into
smaller, more manageable pieces. Different directories were mounted on different
physical drives.
This has a number of advantages. Small partitions are easier to maintain. Smaller
partitions are easier to back up and restore. The size of a partition can limit the space
taken by any specific directory. You can set up specific partitions as “read-only” for
additional security.
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
Filesystems
113
Directory Description
/ The root directory. Other directories are below root in the FHS hierarchy.
Unless mounted separately, the contents of other directories are in the
root directory partition.
/bin Essential command line commands. Do not mount this directory on
a separate volume, or else you may not be able to find these commands
when you use a rescue disk.
/boot Linux startup programs. Normally includes the Linux kernel. Separate
/boot partitions are common; the default size is currently 100MB.
/dev Linux device drivers. Do not mount this directory on a separate partition.
/etc Basic configuration files.
/home User home directories (except the root user).
/lib Program libraries. Do not mount this directory on a separate partition.
/mnt Mount point for removable media (floppy disks, CD drives).
/opt For applications, such as StarOffice or VMWare.
/proc Running kernel processes.
/root Home directory for the root user. Do not mount this directory separately.
/sbin System administration commands. Do not mount this directory separately.
/tmp Temporary file default directory.
/usr Small programs.
/var Log files, print spools, other variable-sized data.
TABLE 3-2
Filesystem
Hierarchy
Standard
Directories
D:\omh\CertPrs8\485-1\ch03.vp
Wednesday, September 18, 2002 9:48:08 AM
Color profile: Generic CMYK printer profile
Composite Default screen
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
114
Chapter 3: Installation
There is at least one case where you should not mount different Linux directories
on different partitions. If you’re limited to a smaller hard drive, you need all of the
spare room that you can get. This may apply to an older laptop computer, or an older
computer that you’re using for a dedicated purpose, such as a DNS server or a gateway
router.
Configuring Linux Filesystems on Different Partitions
When you set up a Red Hat Server filesystem, you can let Red Hat configure the
partitions for you. The following is the default server filesystem breakdown.
Partition Description
/boot Used for larger hard drives on older computers, which can see only the
first 1024 cylinders on a disk.
/home If you’re limiting the disk space for each user, you should also mount
/home on a separate partition to make sure you don’t let user requests
get out of control.
/var The variable area gets written to by memory; often used for mail and
spooling; system memory data becomes very fragmented.
/usr Programs that you may want to protect. If you mount /usr separately,
consider making it read-only in /etc/fstab.
/ The root directory for all other files.
Any additional filesystems that you create can also be mounted on separate
partitions to meet additional or specific needs of related groups of users. Some
examples include: /development, /dbms, /financials, /inventory. The /tmp directory is
often also mounted on a separate partition, to limit the space allocated to what
should be temporary storage.
Other Possible Separate Filesystems
Dedicated services are also good candidates for separate filesystems. For example,
specific applications such as Web and FTP services can take up gigabytes of data. You
want to protect the rest of your computer if problems arise with a specific service. File
D:\omh\CertPrs8\485-1\ch03.vp
Wednesday, September 18, 2002 9:48:08 AM
Color profile: Generic CMYK printer profile
Composite Default screen
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
and print sharing services such as NFS and Samba present security risks because they
expose shared directories to other users.
If you don’t mount these services on separate partitions, anyone who uploads a large
number of files could conceivably fill your hard disk.
If the number of files and users are large, you may even want to spread shared files
over several partitions on different physical drives. In this situation, not every user will
want data from the same drive all of the time. The load is shared by the different drives.
Performance is improved.
CERTIFICATION OBJECTIVE 3.04
The Installation Process
You have many interrelated questions to answer during installation, just as you have
many ways to access installation files, and many options on how to install the operating
system. The following installation outline is designed to get you through the process
in as simple a fashion as possible, with just enough detail to keep you going. While
other sections and chapters address the special situations that you’re more likely to
encounter on the RHCE exam, you need to know how to install Red Hat Linux before
you can work though the other installation scenarios.
Booting the First CD-ROM
Most current Intel-based PC hardware systems allow you to boot directly from the
CD-ROM drive. The latest official copy of Red Hat Linux, as well as Red Hat Linux
installation CDs that you might download from alternate sources, is also designed
to boot directly into the installation program.
Figure 3-7 shows the Red Hat 8.0 startup screen. You should be able to access this
screen by booting from the CD-ROM, or with the help of one of the following floppy
disk images: boot.img, bootnet.img, or pcmcia.img.
If You Need an Installation Floppy
If your hardware does not boot from the CD-ROM, you will need to create one or
more DOS-based boot disks, from the image files supplied with the first Red Hat
installation CD-ROM.
The Installation Process
115
D:\omh\CertPrs8\485-1\ch03.vp
Wednesday, September 18, 2002 9:48:08 AM
Color profile: Generic CMYK printer profile
Composite Default screen
Installation floppies are easy to create. Depending on your hardware and location
of the Red Hat installation files, select one of the following disk images:
■
boot.img Local installation from a hard disk or CD-ROM
■
bootnet.img Network installation through HTTP, FTP, or NFS
■
pcmcia.img Laptop computer–based installation. Supports installation
from local or network sources.
Depending on your hardware, you may also need one of the following images
on a floppy disk:
■
pcmciadd.img Additional support for PCMCIA adapters
■
drvblock.img Additional drivers for special hardware
■
drvnet.img Additional network card drivers
116
Chapter 3: Installation
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
FIGURE 3-7
The Startup
installation screen
for Red Hat
Linux 8.0
D:\omh\CertPrs8\485-1\ch03.vp
Wednesday, September 18, 2002 9:48:08 AM
Color profile: Generic CMYK printer profile
Composite Default screen
Creating Boot Floppies
There are two easy ways to project the boot images from the first Red Hat Installation
CD-ROM onto a floppy disk.
In a Microsoft Windows–based operating system, open an MS-DOS window.
Navigate to the drive associated with your CD-ROM. For example, if your CD-ROM
is drive E: on your Microsoft-based system, just enter: E:\> \dosutils\rawrite.
The rawrite program prompts you for the filename to write to the diskette. Next,
it prompts you for the target drive, normally the A: drive.
At the first prompt, enter the full path to the desired filename as follows:
E:\images\
filename.
img
You can view the files on any of the floppies that you create with MS-DOS
commands. You also must repeat this entire rawrite process for each image file you
wish to create, as illustrated in Figure 3-8.
Once the boot image is transferred to disk, it’s easy to read, as shown in Figure 3-9.
Creating Diskette Images with Any Unix/Linux System
You can also create diskette images with the dd command from any running Unix
or Linux computer, along with the desired image files on the CD-ROM. For example,
the following commands mount the appropriate CD and “disk dumps” the image into
a disk on a floppy drive.
# mount /mnt/cdrom
# dd if=/mnt/cdrom/images/bootnet.img of=/dev/fd0
The Installation Process
117
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
FIGURE 3-8
Using the
rawrite utility
D:\omh\CertPrs8\485-1\ch03.vp
Wednesday, September 18, 2002 9:48:08 AM
Color profile: Generic CMYK printer profile
Composite Default screen
Alternatively, you can just “cat” the disk image of your choice directly to a floppy drive
device. For example, the following command reads the laptop boot disk directly to
the first floppy drive:
# cat /mnt/cdrom/images/pcmcia.img > /dev/fd0
Know how to create the right boot disk for your system. If you have a problem,
the installation boot disk can also serve as a rescue disk. At the boot prompt,
the linux rescue command will eventually bring you to a rescue mode that
can help you mount your partitions or recover specific files or directories.
Almost Ready to Install
Now you have your Red Hat Installation CD-ROMs. If necessary, you also have boot
floppies to get to the Red Hat installation files. Your system is now configured to boot
either from the CD-ROM directly or from one of the boot floppies created from one
of the previously mentioned boot images (boot.img, bootnet.img, pcmcia.img). Now
install your first Red Hat Linux Installation CD-ROM, and reboot your computer.
Bootable CD-ROM
Most newer computers can be set to boot directly from the CD-ROM. Just after your
computer reboots, go into the BIOS menu, as discussed in Chapter 2. You should
be able to change the boot order to look to the CD-ROM drive first. If this option
is not available, you’re just going to have to use an installation boot floppy.
118
Chapter 3: Installation
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
FIGURE 3-9
Files extracted
from bootnet.img
D:\omh\CertPrs8\485-1\ch03.vp
Wednesday, September 18, 2002 9:48:08 AM
Color profile: Generic CMYK printer profile
Composite Default screen
CD-ROM or Boot Diskette Starts Installation
Now your PC should boot from the CD-ROM or the installation boot floppy. After
a few files are opened and decompressed, a Welcome To Red Hat Linux screen should
appear, as shown in Figure 3-10.
You are finally at the first stage of installing Red Hat Linux. Press the
F2
button.
As you can see in Figure 3-11, a number of options are available to you when you
start. Especially if you’re working from installation CDs that you downloaded from
the Internet, your first step should be to check the media. While Red Hat provides
checksums that you can use for this purpose, the easiest way to check your CDs is with
the linux mediacheck option. Type in that command at the boot: prompt, and you’ll
see an option to test the media as shown in Figure 3-12.
If you have a problem with your graphics hardware press
F3
from the first screen.
You can try to force a resolution with a command such as linux resolution=800x600.
The Installation Process
119
CertPrs8 / RHCE Red Hat Certified Engineer Linux Study Guide / Jang / 222485-1 / Chapter 3
FIGURE 3-10
The First Red Hat
installation screen
D:\omh\CertPrs8\485-1\ch03.vp
Wednesday, September 18, 2002 9:48:09 AM
Color profile: Generic CMYK printer profile
Composite Default screen