Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Linux+ Certification Bible.pdf
Скачиваний:
46
Добавлен:
15.03.2015
Размер:
3.78 Mб
Скачать

92

Part II Installation

Selecting the machine type

2.4 Select packages based on the machine’s “role” (e.g., Workstation, Server, Custom)

After these basic configurations have been completed, most distributions will ask for the type of installation that the installer desires. Most installers use the format shown in Figure 4-5.

Figure 4-5: The Red Hat installation type screen

The options you can choose are a Workstation, Server System, Laptop, Custom System or Upgrade. The following sections break these down:

Workstations

Workstation configurations are generally the best choice for end users who do not need all the server applications installed. The Workstation installation includes the standard software packages that are needed to perform daily tasks. This includes software to perform Web browsing, to create documents and spreadsheets, and to retrieve e-mail. Some Workstation class packages allow the installation of commercial software to be included with the installation of Linux. Selecting a Workstation installation does not, however, limit the system to this role, but it does use a configuration that is meant for workstations.

Chapter 4 Installing Linux

93

Installation classes, such as workstation, are predetermined configurations in some Linux distributions and may limit or provide no options during the installation.

The pre-configuration usually includes not only the default software packages, but also some workstation-specific features, such as the hard drive partitioning and the security level the system starts at. Because additional packages can be added to the workstation, users can change the role of the system to provide services that are normally provided by a server.

Server Systems

By selecting Server at this point in the installation process, the installer is selecting basic features and configuration of a server. This includes the partitioning of the hard drive (including packages for providing services that a server can supply) and customized priorities for running applications. The selection of a Server configuration does not limit the system to this role, but does configure it to perform the tasks that a server is called upon to perform.

Laptops

Although Linux excels at performing on a server, Linux has had difficulty performing on a laptop. This is changing for many reasons, one of which is the standardization of laptop hardware, which has enabled Linux to provide better support for laptops. As a result, Linux has created a custom installation that provides for the needs of laptop hardware, including special hardware support, advanced power management, and a minimized volume of software to be installed.

Custom Systems

Customized Systems range from the most minimized system to the most complete installation of Linux. This option allows the installer to configure virtually every feature of the Linux installation. More advanced users may desire this installation method to achieve the most customized installation possible. This option also requires the most knowledge of how to configure Linux.

Upgrades

The final installation option is the ability to upgrade the existing installation of the Linux operating system. This is usually best used on the same distribution of Linux, because structural differences may exist between different distributions, which can cause unreliable upgrading.

Whether you choose a Workstation, Server, Laptop, Custom, or Upgrade installation the subsequent screens for disk partitioning will vary depending on your selection, so select the appropriate options as required.

94

Part II Installation

Partitioning the hard disk drive

1.4 Determine how storage space will be allocated to file systems. (e.g., partition schemes)

2.5Select appropriate options for partitions based on pre-installation choices (e.g., FDISK, third party partitioning software)

2.6Partition according to your pre-installation plan using fdisk (e.g., /boot, / , /usr, /var/home, SWAP)

2.7Configure file systems (e.g., (ext2) or (ext3) or REISER)

The next step in your installation is to partition the hard drive. This is performed automatically for Workstation, Server, and Laptop installation classes. The automatic configuration standards that can be set up by selecting a Workstation, Laptop, or Server class, however, usually won’t work if the hard drive has an existing partition. At this point in the installation, or if a custom installation has been selected, a manual configuration of the partition must be performed. Disk Druid and fdisk are the usual partition utilities that are offered at this point, but others may be presented depending on your distribution. Disk Druid is the recommended tool for most users and is an easy-to-use and capable partitioning tool. Disk Druid is illustrated in Figure 4-6.

Figure 4-6: Hard Drive Partitioning with Disk Druid screen

Chapter 4 Installing Linux

95

The other major tool that is used for partitioning is fdisk. fdisk offers fast and easy-to-manage tools for partitioning. The most common partition file system types are ext2 or Linux native, Linux swap, and the newer Reiser File System or ReiserFS. Linux, however, also supports the following partitions: DOS FAT 16, Win98 FAT32, Linux RAID, Linux Logical Volume Manager, BSD/386, NetBSD, Solaris Boot Partition, UNIX System V, and virtually every other partition type available.

For the exam, it’s important to know the major Linux partition file systems, which include ext2, ext3, Linux swap, and ReiserFS. You should also understand the interaction that Linux has with the other major file systems in Microsoft and UNIX worlds.

These partition file system options are important for dual boot systems or on systems that are used to test potential operating systems. The Reiser File System may be the preferred partition type to use for a Linux-only system. Because the ReiserFS is a journaling file system, it allows for faster recovery from unexpected problems, such as power outage. It also uses a method to write to the hard drive that is faster and more secure. You can better understand the benefit of the ReiserFS if you know a little about how the ext2 file system writes information to a hard drive.

The ext2 partition first caches the data, and then writes it to the hard drive. If a power outage occurs while the system is operating, the file system can become corrupted because some of the data in the cache may not have been written to the drive. The next time Linux boots, it should detect this corruption, and run the fsck utility to correct any damage that was done.

The ReiserFS method adds additional safety by performing file writes in a more intelligent fashion. The ReiserFS system uses the following method:

1.Cache the data in RAM

2.Perform a preparatory command to write the data to the hard drive

3.Write the data to the hard drive

4.Verify the write to the hard drive

5.Clear the cache

96

Part II Installation

If a power failure occurs, the journaling system is able to detect partially written data and can “back out” the data upon power restoration. By using this method, the Reiser file system prevents most of the data corruption that can occur, and therefore does not usually run fsck when an unexpected power loss is experienced. Therefore, because of the journaling capabilities, the ReiserFS is usually considered to be better than ext2. Another benefit of the ReiserFS is that it uses fast balanced trees. Balanced trees provide more robust performance and a sophisticated algorithmic file system. This method allows even small 100 byte files to be written into one block, while other file systems place each file into their own block. This speeds the handling of small files and saves space. Another space-saving feature of the ReiserFS is that it doesn’t use fixed space for the allocation for inodes — which are data structures that hold information about files in a Unix file system — thus saving approximately six percent of the overall disk space.

Each file contains an inode, and files are uniquely identified in the file system by their inode numbers. Each inode contains the following information:

device where the inode resides

locking information

mode and type of file

number of links to the file

owner’s user and group IDs

number of bytes in the file

access and modification times

time that the inode was last modified

addresses of the file’s blocks on disk

Yet another advanced feature of the ReiserFS is that it uses plug-in based, objectoriented, balanced tree algorithms. This allows the plug-in based objects to improve performance of the ReiserFS as newer algorithms are created to resolve issues found in the current objects. Therefore, monthly updates can improve performance of an already good file system. This is now the recommended file system and should be used on most modern installations of Linux — unless a specific reason dictates otherwise. The ext3 file system — once thought to be the next journaling system for Linux but is still in development — may never be used because the ReiserFS has found a home on most systems.

Chapter 4 Installing Linux

97

After you have selected the file system, you must create the individual file structure. Workstations generally employ a basic structure that includes a / (slash) partition, a /home partition, and a swap partition (a variant of this is to also include a /usr partition). The most basic structure is a / and swap partition. The size of these partitions should be determined by the size of the hard drive, but given the low price of hard drives, installers can use a size structure similar to the information presented in Table 4-5.

Table 4-5

Simple workstation partition

Partition

Size

Notes

 

 

 

/

500 MB

Usually this is enough space

 

 

 

/usr

2900 MB

Often has many subdirectories

 

 

 

/home

12000 MB

Lots of space for users

 

 

 

Swap

256 MB

Determined by the amount of system memory

 

 

 

This table shows a simple structure that could be used. Each individual system needs to be sized according to the needs of the server, which often include the preceding structures and an additional partition of /var. This structure changes the sizes of the partitions to a partition scheme similar to the one demonstrated in Table 4-6.

Table 4-6

Simple server partition

Partition

Size

Notes

 

 

 

/

256MB

Usually this is enough space

 

 

 

/usr

2900MB

Often has many subdirectories

 

 

 

/home

6900MB

Lots of space for users

 

 

 

/var

5500MB

Need for large system logs

 

 

 

Swap

384MB

Determined by the amount of system

 

 

memory, the recommended minimum is

 

 

equal to the RAM in the system

 

 

 

98

Part II Installation

After you have determined and entered the partitioning using either Disk Druid or fdisk, the partitions need to be activated. To do this, the partition table must be written to the hard drive. Until this point, all of the information that has been entered exists only in memory. After you have committed the partition to the hard drive, the existing data on a hard drive will be lost, and the new partitions will be placed on the drive. Also up to this point, a reboot of the system will return the system to its previous state. After the partition is written, a new operating system must be installed. When this decision has been made, the screen shown in Figure 4-7 — or one like it — will be presented.

Figure 4-7: The Red Hat “choose partitions to format” screen

On this screen, you can select the partitions to be written, plus you are given the option to test the hard drive for bad blocks while the formatting is being done. I recommend taking this action on all but the most trusted hard drives because even brand new drives may have been damaged in shipping or installation. This is the final opportunity to abandon the installation without changing the existing system. To continue from this point will complete the partitioning of the system and its preparation for the installation of Linux.

Соседние файлы в предмете Операционные системы