Installing Red Hat Linux 7.2
- Chapter 3: Installing Red Hat Linux
- Step-by-Step Installation
- Login and Shutdown
- Reference
In This Chapter
Choosing How to Install Red Hat Linux
Step-by-Step Installation
Login and Shutdown
This chapter provides a basic guide to installing Red Hat Linux through a short step-by-step installation. Before installing Red Hat Linux, you should have a basic understanding of your system's hardware. This will help ensure that the process of creating a new Linux system is done quickly and efficiently with a minimum of problems. Arm yourself with information about your system beforehand in order to head off potential problems such as choosing partition sizes that are too small or hardware mis-configuration.
It is your job to properly allocate your system's resources, and create a working, stable install. You should know the type of installation to perform beforehand (such as a workstation, server, firewall, gateway, router, development system, and so on). Servers that are designed for a single purpose, such as serving or managing electronic mail will have software, storage, and system requirements different from a simple gateway. Installing and configuring a workstation or development workstation will have different software and storage requirements, which can either lighten the load of or tax CPU, RAM, and storage resources.
Most new users with standalone Red Hat Linux computers will install all the software included with Red Hat Linux and depend on Red Hat's RPM technology to sort out and handle software dependencies (see Chapter 8, "Managing Software and System Resources" for more details about using RPM). Using Linux isn't like living in a house built with a pack of playing cards where one misplaced or missing piece of software can bring down the computer. But crafting an efficient, stable, and working system will require some consideration about the type of software to use.
Planning Partition Strategies
Part of planning a custom system involves implementing a partitioning strategy based on the knowledge of existing hardware before the install. And in corporate or enterprise-level environments, part of the planning should also take into consideration future expansion or evolution of the system. The idea can be to craft a flexible system that might possibly evolve as it is used. Knowing how to allocate software on your hard drive for Linux involves knowing how Red Hat Linux organizes its file system, or layout of directories on storage media. This knowledge will help you make the most out of hard drive space, and in some instances, such as planning to have user directories mounted via NFS or other means, can help head off data loss, increase security, and accommodate future needs. Create a great system, and you'll be the hero of information services. Create a house of cards, and you'll be looking for a new job.
Some questions you should have the best possible (or correct) answers to before installing Red Hat Linux include "How much disk space is required now or in the future?" "Will the system boot just Red Hat Linux or another operating system?" or "How much data needs to be backed up, and how will it be backed up?"
Choosing a Boot Loader
You will also need to know how the system will be booted. Various software packages and schemes can be used. For example, will you use the Linux Loader, LILO, or the GRand Unified Bootloader, known as GRUB? LILO is a small boot loader usually installed in the Master Boot Record of an IDE hard drive, the root Linux partition, or on a floppy disk. This loader (like others) can be used to pass essential kernel arguments to the Linux kernel for use during the boot process. Some arguments include disk geometry, additional network interfaces, or perhaps installed RAM values. LILO uses a configuration file named /etc/lilo.conf. Other boot loaders, such as GRUB, might support boot read-only memory (ROM) or flashed memory chips containing boot-loading code. Yet other approaches supported by some, but not all, PC hardware BIOS include booting via a network. And Linux can also be booted via removable media or a floppy disk.
Note
Red Hat's mkbootdisk command can be used to create boot media while using Linux by using the Linux kernel release number (returned by using the uname -r command) and a specified device, such as: mkbootdisk --device /dev/ fd0 2.4.7-2
Red Hat Linux can also be booted from a DOS session using the LOADLIN program, a DOS PATH to the Linux kernel, and the location of Linux kernel, such as:
LOADLIN c:\KERNEL\VMLINUZ root=/dev/hda2 ro
In this example, the kernel named VMLINUZ is loaded, and the second primary partition of the first IDE hard drive is specified at the root (\) partition of the Red Hat Linux system.
Note
If you find that LOADLIN fails to boot Linux and complains about a large kernel size, you can either try using make bzimage to build a smaller kernel, or rebuild a kernel that relies less on built-in features and more on loadable modules. See Chapter 23, "Kernel and Module Management," for more information.
A good boot loader will support multiple operating systems, the ability to boot different Linux kernels (in order to change the characteristics of a system or easily accommodate new hardware), password protection, custom boot displays, and sane defaults.
Another consideration in using a system hosting one or more operating systems is that some operating systems "don't play well with others" (such as later versions of Windows from Microsoft), and might wipe out MBR settings or might not use the MBR. If you find yourself in this situation, it might be best to turn to commercial boot loader software. If you run into trouble after installing Red Hat Linux, make sure to read the documentation for your boot loader to acquire any diagnostic information. Most boot loaders will report on any problems and the solution might be commonly fixed.
Choosing How to Install Red Hat Linux
Red Hat Linux can be installed in a variety of ways using different techniques and hardware. You should also know how you plan to install Linux before starting in order to devise a policy or perhaps foil subsequent installs for security. For example, installing via a network onto workstations lacking removable media can help increase security to some degree.
Red Hat Linux is typically installed by booting to the install directly from a CD-ROM. Other options include
Booting to an install using a floppy diskette
Using a hard drive partition to hold the installation software
Booting from a DOS command line
Booting to an install and installing software over a network using FTP or HTTP protocols
Booting to an install and installing software from an NFS-mounted hard drive
How you choose to install (and use) Red Hat Linux depends on your system's hardware, corporate information service policy, or personal preference.
Installing from CD-ROM
Most PCs' BIOS supports booting directly from a CD-ROM drive, and offers an ordering of devices to search for bootable software. Set your PC's BIOS if required, and then insert the CD-ROM and turn on or reboot the PC to install Red Hat Linux. Problems can arise if the CD-ROM isn't recognized by the Linux kernel, but trouble shouldn't occur unless there is hardware failure. (In the past, some CD-ROM drives required a kernel patch, this should no longer be a problem; see Table 3.1 in this chapter, which lists a driver disk image used to support older drives.)
Booting to an Install from DOS
As previously mentioned, a DOS utility such as LOADLIN (or BOOTLIN) can be used to either boot to an install directly from CD-ROM or to load the Red Hat Linux install kernel. See the dosutils directory on the first Red Hat Linux CD-ROM included with this book, and read the README file under the dosutils directory for an overview of the DOS utilities. The directory contains a one-line DOS batch file (.bat file) that can help boot to an install:
loadlin autoboot\vmlinuz initrd=autoboot\initrd.img
In this example, the LOADLIN command will boot the Red Hat Linux install kernel residing under the dosutils/autoboot directory, and then load the installation software to launch an install.
Making an Installation Boot Diskette
Your Red Hat Linux installation can also be started using a boot floppy. Floppy images (.img files) are contained in the images directory on the first Red Hat Linux CD-ROM. Red Hat, Inc. provides a number of images, as listed in Table 3.1.
Table 3.1 Red Hat Linux Boot Images
Name |
Description |
boot.img |
Enable booting using CD-ROM or hard drive partition |
bootnet.img |
Install via FTP, HTTP, or NFS |
pcmicia.img |
Boot install using PCMCIA hardware (requires the pcmciadd.img) |
drivers.img |
Utility image containing various hardware drivers |
oldcdrom.img |
Support image for booting using old CD-ROM drives |
images/pxeboot |
Directory containing a PXE-enabled Linux kernel |
Most of the images listed in Table 3.1 support booting to an install using either local hardware or using local hardware to install using a network. The pxeboot directory contains a kernel that supports a remote booting protocol named PXE that enables installation or upgrades of network-only PCs. Use of this software requires a properly configured server and local PCs BIOS settings.
The diskettes images can be created using the DOS RAWRITE command or the Linux dd command to create the floppy. The RAWRITE command is used after starting DOS like this:
D:\dosutils\rawrite
You'll need one or more blank diskettes. Follow the prompts to create the images, entering a source filename and a target drive (such as A or B). To create a boot diskette dd, mount the first Red Hat Linux CD-ROM and use the dd command like so:
# dd if=/mnt/cdrom/images/nameofimage.img of=/dev/fd0
This will create a diskette in the DOS drive A. Use /dev/fd1 if you want to use an installed secondary floppy drive. PC notebook users installing via a network or external CD-ROM drive using a PCMCIA adapter might need the pcmcia.img and pcmciadd.img diskettes.
Hard Drive Partition Installation
A hard partition can be used to either boot the Red Hat Linux install or hold the software required from an install. The partition must be large enough to hold .iso images (binary images of a CD-ROM). Copy the images of the first and second Red Hat Linux CD-ROMs in a directory on the local hard drive. If you use this type of install and don't need the required hard drive space later on, a system can be quickly reinstalled from the partition.
The .iso images can be downloaded from Red Hat, Inc. or a mirror FTP site. Images can also be created using Linux utilities such as mkisofs, dd, and the mount command.
To perform this installation, you will need to know the hard drive's device name (such as /dev/hdb), along with the partition number and the name of directory containing the images (such as /dev/hdb1 and /redhat/images; if you simply copy the images to the formatted DOS or Linux partition, you don't need the directory information).
Installing Using a Network
Red Hat Linux can be installed using a local network (or even over the Internet if you have broadband access). Boot your PC to the install, and then choose the type of installation. Installing Red Hat Linux using the File Transfer Protocol (FTP) will require access to an FTP server. You'll need to know the hostname or IP address of the server, along with the path (directory) holding the Red Hat Linux software. Installing Red Hat Linux using a remotely mounted Network File System (NFS) is similar to a hard drive installation, but requires access to an NFS server. You'll need access permission, a permitted IP address or hostname for your computer, the hostname or IP address of the NFS server, and the path to the Red Hat Linux software.
To install Red Hat Linux using HTTP, you will need the hostname or IP address of the remote Web server, along with the directory containing Red Hat Linux. Other installation methods might be variations on network installation or the installation and subsequent use of an alternative Linux distribution (such as a floppy based distribution) to bootstrap to an install.