Planning the Installation


The major decisions when planning an installation are determining how to divide the hard disk into partitions or, in the case of a dual-boot system, where to put the Linux partitions, and deciding which software packages to install. In addition to these topics, this section discusses hardware requirements for Red Hat Linux, Fedora Core versus Red Hat Enterprise Linux, and fresh installations versus upgrades.

Considerations

SELinux


If you plan to use SELinux, turn it on during Firstboot (page 56). Because SELinux sets extended attributes on files, it can be a time-consuming process to turn on SELinux after you install Linux.

GUI


On most installations (except for servers), you will probably want to install a graphical desktop environment. GNOME is installed by default. You can also install KDE or both GNOME and KDE.

Chapter 4, "Introduction to Red Hat Linux," 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.

On a server, you normally dedicate as many resources to the server as possible and few resources to anything not required by the server. For this reason, servers rarely include a graphical interface.

Software and services


As you install more software packages on a system, the number of updates and the interactions between the packages increase. Server packages that listen for network connections make the system more vulnerable by increasing the number of ways the system can be attacked. Additional services can also slow the system down.

For a system to learn on, or for a development system, additional packages and services may be useful. However, for a more secure production system, it is best to install and maintain the minimum number of packages required and enable only needed services.

Requirements

Hardware


Red Hat Linux can run on many different types of hardware. This section details installation on 32-bit Intel and compatible platforms such as AMD, Cyrix, and VIA as well as 64-bit platforms such as AMD64 processors (both Athlon64 and Opteron) and Intel processors with Intel Extended Memory 64 Technology (EM64T). Refer to the release notes if you are installing Red Hat Linux on PowerPC (PPC) hardware. Within these platforms, Red Hat Linux runs on much of the available hardware. You can view Red Hat's list of compatible and supported hardware at hardware.redhat.com. Although these lists apply to Red Hat Enterprise Linux, they serve as a good guide to what Fedora Core will run on. Many Internet sites discuss Linux hardware; use Google (www.google.com/linux) to search on linux hardware, fedora hardware, or linux and the specific hardware you want more information on (for example, linux sata or linux a8n). In addition, many HOWTOs cover specific hardware. There is also a Linux Hardware Compatibility HOWTO, although it becomes dated rather quickly. Red Hat Linux usually runs on systems that Windows runs on, unless the system includes a very new or unusual component.

Memory (RAM)


You need a minimum of 128 megabytes of RAM for a 32-bit x86 system that runs in text mode (no GUI) and 192256 megabytes for a graphical system. For a 64-bit x86_64 system, you need at least 128 megabytes for text mode and 256512 megabytes for a graphical system. Linux makes good use of extra memory: The more memory a system has, the faster it will run. Adding memory is one of the most cost-effective ways you can speed up a Linux system.

CPU


Red Hat Linux requires a minimum of a 200-megahertz Pentium-class processor or the equivalent AMD or other processor for textual mode and at least a 400-megahertz Pentium II processor or the equivalent for graphical mode.

Hard disk space


The amount of hard disk space you need depends on which version of Red Hat Linux you install, which packages you install, how many languages you install, and how much space you need for user data (your files). The operating system can occupy from about 600 megabytes to over 9 gigabytes.

BIOS setup


Modern computers can be set to boot from a CD/DVD, floppy diskette, or hard disk. The BIOS determines the order in which the system tries to boot from each device. You may need to change this order: Make sure the BIOS is set up to try booting from the CD/DVD before it tries to boot from the hard disk.

CMOS


CMOS is the persistent memory that stores system configuration information. To change the BIOS setup, you need to edit the information stored in CMOS. When the system boots, it displays a brief message about how to enter System Setup or CMOS Setup mode. Usually you need to press Del or F2 while the system is booting. Press the key that is called for and move the cursor to the screen and line that deal with booting the system. Generally there is a list of three or four devices that the system tries to boot from; if the first attempt fails, the system tries the second device, and so on. Manipulate the list so the CD/DVD is the first choice, save your choices, and reboot. Refer to the hardware/BIOS manual for more information.

Which Are You Installing: Fedora Core or Red Hat Enterprise Linux?

This book describes two products: Fedora Core and Red Hat Enterprise Linux. This section briefly highlights the differences between these products.

FEDORA


The Fedora Project is sponsored by Red Hat and supported by the open-source community. With releases, called Fedora Core, coming out about every six months, this Linux distribution tests cutting-edge code; it is not a supported Red Hat product and is not recommended for production environments where stability is important. Fedora aims to reflect the upstream projects it incorporates, including the kernel. In contrast, Red Hat Enterprise Linux includes many changes introduced by Fedora Core. Architectures supported by the Fedora Project include

  • i386 Intel x86-compatible processors, including Intel Pentium and Pentium MMX, Pentium Pro, Pentium II, Pentium III, Celeron, Pentium 4, and Xeon; VIA C3/C3-m and Eden/Eden-N; and AMD Athlon, AthlonXP, Duron, AthlonMP, and Sempron.

  • ppc PowerPC processors (found in Apple Power Macintosh, G3, G4, and G5, and IBM pSeries systems).

  • x86_64 64-bit AMD processors including Athlon64, Turion64, and Opteron; and Intel 64-bit processors that incorporate EM64T technology.

RHEL


Although you can download the code for free (refer to "More Information" on page 24), Red Hat Enterprise Linux is typically sold by annual subscription that includes the Red Hat Network (page 498) and technical support. It is more stable but less cutting edge than Fedora Core.

Red Hat Enterprise Linux AS (advanced server) and Red Hat Enterprise Linux ES (enterprise server) function identically and are designed to run servers. ES is licensed for x86-compatible, AMD64, Intel EM64T, and Intel Itanium2 systems with one or two CPUs and up to 16 gigabytes of memory. AS is licensed for servers of any size and supports IBM zSeries, POWER series, and S/390 series systems in addition to the systems that ES supports.

Red Hat Enterprise Linux WS (workstation) supports the same architectures as ES on the desktop/client side, running office productivity and software development applications. WS supports systems with one or two CPUs, up to 4 gigabytes of memory, and does not include all the server applications that come with AS and ES. It is not designed for a server environment.

Installing a Fresh Copy or Upgrading an Existing Red Hat System?

Upgrade


An upgrade replaces the Linux kernel and utilities on an already installed version of Red Hat Linux with newer versions. During an upgrade, the installation program attempts to preserve both system and user data files. An upgrade brings utilities that are present in the old version up-to-date but does not install new utilities (you can install them later if you like). Existing configuration files are preserved and new ones added with a .rpmnew filename extension. A log of the upgrade is kept in /root/upgrade.log. Before you upgrade a system, back up all files on the system.

Caution: A fresh installation yields a more stable system than an upgrade

For better system stability, Red Hat recommends that you back up data on a system and perform a fresh installation rather than an upgrade.


Clean install


An installation, sometimes referred to as a clean install, writes all fresh data to a disk. The installation program overwrites all system programs and data as well as the kernel. You can preserve some user data during an installation depending on where it is located and how you format/partition the disk.

Graphical or Textual Installation?

There are several ways to install Red Hat Linux. You can choose a graphical installation, which displays graphics on the screen and allows you to use the mouse, window buttons, and scroll lists to choose how you want to configure the system. If you have a smaller system with less memory or a system with an unsupported graphics board, you can run a textual installation. This type of installation performs the same functions as a graphical installation, but uses a pseudographical interface to step you through the process of configuring the system. The Anaconda utility controls both types of installations.

Setting Up the Hard Disk

Formatting and free space


Hard disks must be prepared in several ways so an operating system can write to and read from them. Low-level formatting is the first step in preparing a disk for use. Normally you will not need to low-level format a hard disk, as this task is done at the factory. The next step in preparing a disk for use is to divide it into partitions. The area of the disk that is not occupied by partitions is called free space. A new disk has no partitions: It is all free space. Under DOS/Windows, the term formatting means writing a filesystem on a partition; see "Filesystems" below.

Partitions


A partition, or slice, is a section of a hard disk that has a device name, such as /dev/hda1, so you can address it separately from other sections. During installation you use Disk Druid (page 58) to create partitions on the hard disk. After installation you can use parted (page 65) to manipulate partitions.

LVM


Disk Druid can set up logical volumes (LVs) that function like partitions. When you set up LVs, you can use the Logical Volume Manager (LVM, page 32) to change the sizes of volumes. It is much more difficult to change the sizes of partitions.

Filesystems


Before most programs can write to a partition, a data structure (page 1028), called a filesystem, needs to be written on a partition. The mkfs (make filesystem) utility, which is similar to the DOS/Windows format utility, writes a filesystem on a partition. Many types of filesystems exist. Red Hat Linux typically creates ext3 filesystems for data, while Windows uses FAT and NTFS filesystems. Apple uses HFS (Hierarchical Filesystem) and HFS+. OS X uses either HFS+ or UFS. Under DOS/Windows, filesystems are labeled C:, D:, and so on (sometimes a whole disk is a single partition). Under Linux, typical hierarchical filesystem names are / (root), /boot, /var, and /usr. You can have different types of partitions on the same hard disk, including both Windows and Linux partitions. Under Linux, the fsck (filesystem check) utility (page 470) checks the integrity of filesystem data structures.

Filesystem independence


The state of one filesystem does not affect other filesystems: One filesystem on a drive may be corrupt and unreadable while other filesystems function normally. One filesystem may be full so you cannot write to it while others have plenty of room for more data.

Primary and Extended Partitions

Partitioning allows you to divide an IDE disk into a maximum of 63 separate partitions, or subdisks. A SCSI disk can be divided into 15 partitions at most. You can use each partition independently for swap devices, filesystems, databases, other resources, and even other operating systems.

Unfortunately disk partitions follow the template established for DOS machines a long time ago. At most, a disk can hold four primary partitions. One of these primary partitions can be divided into multiple, logical partitions; this divided primary partition is called an extended partition. If you want more than four partitions on a driveand you usually doyou must set up an extended partition.

A typical disk is divided into three primary partitions and one extended partition. The three primary partitions are the sizes you want the final partitions to be. The extended partition occupies the rest of the disk. Once you establish the extended partition, you can subdivide it into additional partitions that are each the size you want.

Partitioning a Disk

During installation, Anaconda calls Disk Druid to set up disk partitions. This section discusses how to plan partition sizes. Although this section uses the term partition, the planning and sizing of LVs (page 32) is the same. For more information refer to "Using Disk Druid to Partition the Disk" on page 58 and to the Linux Partition HOWTO at www.tldp.org/HOWTO/Partition.

Tip: Under Red Hat Linux, druid means wizard

Red Hat uses the term druid as part of the names of programs that guide you through a task-driven chain of steps. Other operating systems call these types of programs wizards.


Planning Partitions

Simple setup


It can be difficult to plan partition sizes appropriately if you are new to Linux. For this reason many people choose to have only three partitions. The first partition holds the information the system needs to boot: the kernel image and other files. This partition is mounted as /boot and can range in size from 50 to 300 megabytes. A second partition is the swap partition, which can be any size from 512 megabytes to 2 or more gigabytes. The last partition is designated as root (/) and contains the remainder of the disk space. This setup makes managing space quite easy. But if a program runs amok or if your system receives a DoS attack (page 1030), the entire disk can fill up, and system accounting and logging information (which may contain data that can tell you what went wrong) may be lost.

When you ask Disk Druid to set up the disk with the default layout, it uses the scheme described above, with the root and swap space set up as LVs.

Partition Suggestions

This section discusses additional partitions you may want to create. Consider setting up LVM (page 32) before you create partitions (LVs); LVM allows you to change partition sizes easily after the system is installed.

(swap)


Linux temporarily stores programs and data on a swap partition when it does not have enough RAM to hold all the information it is processing (page 458). The size of the swap partition should be twice the size of the RAM in the system, with a minimum size of 512 megabytes. For example, a system with 1 gigabyte of RAM should have a 2-gigabyte swap partition. Although it is not required, most systems perform better with a swap partition.

/boot


This partition holds the kernel and other data the system needs when it boots. Red Hat recommends that the /boot partition be 100 megabytes, although the amount of space required depends on how many kernel images you want to keep on hand. This partition can be as small as 50 megabytes. Although you can omit the /boot partition, it is useful in many cases. Some older BIOSs require the /boot partition (or the root [/] partition if there is no /boot partition) to be near the beginning of the disk.

/var


The name var is short for variable: The data in this partition changes frequently. Because it holds the bulk of system logs, package information, and accounting data, making /var a separate partition is a good idea. In this way, if a user runs a job that uses up all the disk space, the logs will not be affected. The /var partition can occupy from 500 megabytes up to several gigabytes for extremely active systems with many verbose daemons and a lot of printer activity (files in the print queue are stored on /var). Systems that are license servers for licensed software often qualify as extremely active systems.

/home


It is a common strategy to put user home directories on their own disk or partition. If you do not have a separate disk for the home directories, put them in their own partition. These partitions are often named /home or /usr/home.

Tip: Set up partitions to aid in making backups

Plan partitions around what data you want to back up and how often you want to back it up. One very large partition can be more difficult to back up than several smaller ones.


/(root)


Some administrators choose to separate the root (/), /boot, and /usr partitions. By itself, the root partition usually consumes less than 30 megabytes of disk space. However, /lib, which can consume more than 200 megabytes, is part of the root partition. On occasion, you may install a special program that has many kernel drivers that consume a lot of space in the root partition. Allot 1 gigabyte to the root partition at a minimum.

/usr


Separating the /usr partition can be useful if you plan to export /usr to another system and want the security that a separate partition can give. The size of /usr depends on the number of packages you install.

Tip: Where to put the /boot partition

On older systems, the /boot partition must reside completely below cylinder 1023 of the disk. When you have more than one hard disk, the /boot partition must also reside on a drive on

  • Multiple IDE or EIDE drives: the primary controller

  • Multiple SCSI drives: ID 0 or ID 1

  • Multiple IDE and SCSI drives: the primary IDE controller or SCSI ID 0


/usr/local and /opt


Both /usr/local and /opt are also candidates for separation. If you plan to install many packages in addition to Red Hat Linux, you may want to keep them on a separate partition. If you install the additional software in the same partition as the users' home directories, for example, it may encroach on the users' disk space. Many sites keep all /usr/local or /opt software on one server and export it to other systems. If you choose to create a /usr/local or /opt partition, its size should be appropriate to the software you plan to install.

Table 2-1 gives guidelines for minimum sizes for partitions used by Linux. Size other partitions, such as /home, /opt, and /usr/local, according to need and the size of the hard disk. If you are not sure how you will use additional disk space, you can create extra partitions using whatever names you like (for example, /b01, /b02, and so on).

Table 2-1. Example partition sizes

Partition

Example size

/boot

50100 megabytes.

/ (root)

1 gigabyte.

(swap)

Two times the amount of RAM (memory) in the system with a minimum of 512 megabytes.

/home

As large as necessary; depends on the number of users and the type of work they do.

/tmp

Minimum of 500 megabytes.

/usr

Minimum of 1.75.5 gigabytes, depending on which Red Hat Linux programs you install. These figures assume /usr/local is a separate partition.

/var

Minimum of 500 megabytes.


RAID

RAID (Redundant Array of Inexpensive/Independent Disks) employs two or more hard disk drives or partitions in combination to improve fault tolerance and/or performance. Applications and utilities see these multiple drives/partitions as a single logical device. RAID, which can be implemented in hardware or software (Red Hat gives you this option), spreads data across multiple disks. Depending on which level you choose, RAID can provide data redundancy to protect data in the case of hardware failure. Although it can also improve disk performance by increasing read/write speed, RAID uses quite a bit of CPU time, which may be a consideration in some situations. Fedora Core 5 introduced support for motherboard-based RAID chips through the dmraid driver set.

Caution: Do not replace backups with RAID

Do not use RAID as a replacement for regular backups. If your system undergoes a catastrophic failure, RAID will be useless. Earthquake, fire, theft, and other disasters may leave the entire system inaccessible (if your hard disks are destroyed or missing). RAID also does not take care of something as simple as replacing a file when you delete it by accident. In these cases, a backup on a removable medium (that has been removed) is the only way you will be able to restore a filesystem.


Disk Druid gives you the choice of implementing RAID level 0, 1, 5, or 6:

  • RAID level 0 (striping) Improves performance but offers no redundancy. The storage capacity of the RAID device is equal to that of the member partitions or disks.

  • RAID level 1 (mirroring) Provides simple redundancy, improving data reliability, and can improve the performance of read-intensive applications. The storage capacity of the RAID device is equal to one of the member partitions or disks.

  • RAID level 5 (disk striping with parity) Provides redundancy and improves (most notably, read) performance. The storage capacity of the RAID device is equal to that of the member partitions or disks, minus one of the partitions or disks (assuming they are all the same size).

  • RAID level 6 (disk striping with double parity) Improves upon level 5 RAID by protecting data when two disks fail at once. Level 6 RAID is inefficient with a small number of drives.

LVM: Logical Volume Manager

The Logical Volume Manager (LVM2, which will be referred to as LVM) allows you to change the size of logical volumes (LVs, the LVM equivalent of partitions) on the fly. With LVM, if you make a mistake in setting up LVs or your needs change, you can use system-config-lvm to make LVs smaller or larger easily without affecting user data. You must choose to use LVM at the time you install the system or add a hard disk; you cannot retroactively apply it to a disk full of data. LVM supports IDE and SCSI drives as well as multiple devices such as those found in RAID partitions.

LVM groups disk components (partitions, hard disks, or storage device arrays), called physical volumes (PVs), into a storage pool, or virtual disk, called a volume group (VG). See Figure 2-1. You allocate a portion of a VG to create a logical volume.

Figure 2-1. LVM: Logical Volume Manager


An LV is similar in function to a traditional disk partition in that you can create a filesystem on an LV. It is much easier, however, to change and move LVs than partitions: When you run out of space on a filesystem on an LV, you can grow (expand) the LV and its filesystem into empty or new disk space, or you can move the filesystem to a larger LV. LVM's disk space manipulation is transparent to users; service is not interrupted.

LVM also eases the burden of storage migration. When you outgrow or need to upgrade PVs, LVM can move data to new PVs. To read more about LVM, refer to the resources listing under "More Information" on page 24.




A Practical Guide to Red Hat Linux
A Practical Guide to Red HatВ® LinuxВ®: Fedoraв„ў Core and Red Hat Enterprise Linux (3rd Edition)
ISBN: 0132280272
EAN: 2147483647
Year: 2006
Pages: 383

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net