Linux Setup: Installation

Installing Red Hat Linux 9, Red Hat Advanced Server 2.1/3.0 and UnitedLinux is very similar. They each involve eight principal areas for planning and consideration. The areas are noted below.

 Hardware Compatibility
Review of Linux hardware compatibility issues.

 Network Setup
Verify & update network settings.

 Disk Partitions
Quick course on UNIX disk partitions.

 Firewall Selection
Overview of firewall options.

 Installation Steps
Step-by-step installation guide.

 Account Management
Overview on account management.

 Boot Loader
Quick course on Linux boot loaders.

 Package Selection
Quick course on package selection.


Hardware compatibility is critical for any operating system. The Red Hat Linux 9 and Red Hat Advanced Server 2.1 installations may fail without constructive or meaningful errors when a computer has unsupported components.

Careful consideration of hardware components should be done when building or determining a suitable Red Hat Linux platform. Failure to verify components at Red Hat's hardware compatiblity web site may prevent a successful Red Hat Linux installation. Components that should be considered are:

  • Processor
  • Bus
  • Memory
  • Video card
  • Video monitor
  • Hard drive
  • Floppy disk drive
  • SCSI controller
  • CD-ROM drive
  • Sound card
  • Network interface card


The installation of Red Hat Linux 9 or Red Hat Linux Advanced Server 2.1 will provide the opportunity to use the fdisk or a GUI Disk Druid utility. Those who are inexperienced with disk partitioning or fdisk, may elect to use the GUI Disk Druid tool.

When configuring disk partitions, there are some key items to consider about partitions or file systems. They are noted below.

While Disk Druid is a good utility, there are a few tricks to using it. When setting the parameters for a partition, the target disk drive should be selected. If a target disk drive is not selected, Disk Druid makes an independent choice that may fragment contiguous space. Only the last partition on a given disk drive should be chosen to use the remaining disk space.

The following is an example of configuring two 120 GB disk drives through the Disk Druid utility. It generously ensures that typical installations will not encounter problems and maximizes the contiguous file space in /u01 and /u02.

Disk #1
Device Start End Size
(MB)
Type Mount
Point
Format
/dev/hda            
  /dev/hda1 1 13 102  ext3  /boot  Yes
  /dev/hda2 14 267 1992  swap    Yes
  /dev/hda3 268 1542 10001  ext3  /tmp  Yes
  /dev/hda4 1543 14946 105144  ext3  Extended  
    /dev/hda5 1543 2179 4997  ext3  /  Yes
    /dev/hda6 2180 14946 100147  ext3  /u02  Yes

Disk #2
Device Start End Size
(MB)
Type Mount
Point
Format
/dev/hdb            
  /dev/hdb1 1 765 6001  ext3  /home  Yes
  /dev/hdb2 766 1275 4001  ext3  /var  Yes
  /dev/hdb3 1276 1785 4001  ext3  /usr  Yes
  /dev/hdb4 1786 14593 100469  ext3  Extended  
    /dev/hdb5 1786 14593 100469  ext3  /u01  Yes


Red Hat Linux UnitedLinux 1.0
AS 2.1 AS 3.0
 Install Step-by-step  Install Step-by-step  Install Step-by-step
 Post-install Oracle9i  Post-install Oracle9i  Post-install Oracle9i
 Post-install Apps 11i  Post-install Apps 11i  Post-install Apps 11i


 The GRUB boot loader (default Red Had Linux)

 The LILO boot loader

  • The GRUB boot loader (default Red Had Linux Advanced Server 2.1)
The GRand Unified Boot (GRUB) loader provides an opportunity to have multiple boot options on Linux. GRUB manages the startup or bootstrapping of the Linux operating system. GRUB manages the three stages of the x86 (Intel) boot process.
 How does GRUB boot?

 How is GRUB enabled?

 How is GRUB configured?

Stage 1.0
Read the primary boot loader from the MBR sector into memory.
Stage 1.5
Only read into memory on exception basis to manage hardware configuration issues.
Stage 2.0
Loads itself into memory. Reads the kernel image file that enables selection between kernels. Passes control to the operating system.
GRUB uses the /boot/grub/grub.conf file to determine it's boot sequence. Below is an example of the grub.conf file after an initial installation.

/boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda2
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux Advanced Server (2.4.9-e.3)
        root (hd0,0)
        kernel /vmlinuz-2.4.9-e.3 ro root=/dev/hda2
        initrd /initrd-2.4.9-e.3.img

The grub.conf file contains a minimum of four components. Three are unique within the grub.conf file. They are the default, timeout and splashimage.

The fourth component is a kernel definition. The grub.conf file may contain one to many kernel defintions. A GRUB kernel definition contains a title, root partition, bootable kernel and initrd inital RAM disk image. All references to files are made relative to the /boot partition.

Component Definition
title Contains the text that will be displayed on the console screen during a system boot strap.
root Is the disk slice containing the boot partition. For example, the value of (hd0,0) translates to partition one on the first disk drive.
kernel References the bootable kernel, which by default is found in the /boot partition. Three items are found on the kernel line. Listed first is the bootable kernel (/boot/vmlinuz-2.4.9-e.3). Second is a read-only setting for the /boot file system. Lastly, root is assigned to the disk and partition where the Linux root file system is found.
initrd References the initial RAM disk boot image that is loaded (/boot/initrd-2.4.9-e.3.img).


If LInux LOader (LILO) is the current boot loader, GRUB may be configured by taking the following steps.
  1. Configure the /boot/grub/grub.conf file as described above.
  2. GRUB needs to be installed on the master boot record of the first disk. The command syntax is the following:
    # grub-install /dev/hda
  3. Reboot the computer.

The GRand Unified Boot (GRUB) loader is configurable. Each time a new kernel is installed, the /boot/grub/grub.conf file is modified to include the new kernel definition component.

The grub.conf file can be modified manually for a number of reasons. The most common reasons for manually editing the grub.conf file are noted below.

  • Change the default kernel. The default kernel is the one that the system chooses unless a console operated overrides the choice. The number value starts at zero and maps to the list of kernel components in the grub.conf file starting from the top most entry, which is the zero element.

  • Change the timeout value. The timeout value sets the delay interval before boot strapping with the default kernel.

  • Changing any of the elements with a kernel defintion should generally be avoided. The one exception has to do with a loss of the root partition. If the root partition is moved from a failed disk, it may be edited to point to a new disk and or disk and partition.
The image below highlights the values that may be changed in the grub.conf file. The image is what will be found after installing the Red Hat Linux Advanced Server 2.1 and installing a new kernel. While it is unlikely that machines encounter problems with production kernels, the recommended process is to install a new kernel, select it for booting and test it before removing the prior kernel. The grub.conf file is updated whenever a new kernel is installed or an old kernel removed.

Rebooting the machine remotely does not provide the ability to select a kernel from the list of installed kernels. Therefore, changing the default kernel, requires editing the default kernel value.

In the example below, the value of 1 defines the booting kernel as the Red Hat Linux Advanced Server (2.4.9-e.3). Change the 1 to a 0 (zero) and the Red Hat Linux (2.4.9-e.16) kernel will be the default kernel.

Remote booting does not benefit from a 10 second delay waiting for a change to the kernel. Change the timeout from 10 seconds to 0 seconds.

/boot/grub/grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/hda2
# initrd /initrd-version.img
#boot=/dev/hda
default=1
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.9-e.16)
        root (hd0,0)
        kernel /vmlinuz-2.4.9-e.16 ro root=/dev/hda2
        initrd /initrd-2.4.9-e.16.img
title Red Hat Linux Advanced Server (2.4.9-e.3)
        root (hd0,0)
        kernel /vmlinuz-2.4.9-e.3 ro root=/dev/hda2
        initrd /initrd-2.4.9-e.3.img


  • The LILO boot loader
The LInux LOader (LILO) loader has generally been replaced by the GRand Unified Boot (GRUB) loader. LILO manages the startup or bootstrapping of the Linux operating system. LILO manages the three stages of the x86 (Intel) boot process.
 How does LILO boot?

 How is LILO enabled?

 How is LILO configured?

Stage 1.0
Read the primary boot loader from the MBR sector into memory.
Stage 1.5
Only read into memory on exception basis to manage hardware configuration issues.
Stage 2.0
Loads itself into memory. Reads the kernel image file that enables selection between kernels. Passes control to the operating system.
LILO uses the /etc/lilo.conf file to determine the boot sequence. Below is an example of the lilo.conf for an initial installation of Red Hat Linux Advanced Server 2.1.

/etc/lilo.conf
prompt
timeout=50
default=linux
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
message=/boot/message
linear

image=/boot/vmlinuz-2.4.9-e.3
        label=linux
        initrd=/boot/initrd-2.4.9-e.3.img
        read-only
        root=/dev/hda2

The lilo.conf file contains a nine components. Eight are unique within the lilo.conf file. They are the prompt, timeout, default, boot, map, install, message, linear.

The nineth component is a kernel definition. The lilo.conf file may contain one to many kernel defintions. A LILO image (kernel) definition contains a bootable image, label, initrd, read-only designation and root partition.

Component Definition
prompt The prompt key word in a lilo.conf file enables the prompt and displays to console the value for the lilo.conf message field.
timeout The timeout value is measured in decaseconds. The example above shows the default of 50 decaseconds or 5 seconds.
default The default value points to the type of default operating system. In the example above, it points to a Linux operating system default.
boot The boot value points to the bootable disk and partition.
map The map value points to the map file location, which has a default value of /boot/map. It contains the name and location of bootable kernel images.
install The install value points to the /boot/boot.b file, which is used as the new boot sector.
message The message value points to the binary message file that is shown when prompt is in the lilo.conf file.
linear The linear value acts as a flag. When present in the lilo.conf file, it causes generation of linear sector addresses. The default behavior without the keyword is to use sector/head/cylinder addresses.
image References the bootable kernel, which by default is found in the /boot partition (/boot/vmlinuz-2.4.9-e.3).
label The label value names the operating system option in the LILO screen.
initrd References the initial RAM disk boot image that is loaded (/boot/initrd-2.4.9-e.3.img).
read-only The read-only flag ensures that the root file system is read-only during the boot process.
root Is the disk slice containing the boot partition. For example, the value of (hd0,0) translates to partition one on the first disk drive.


If GRand Unified Boot (GRUB) is the current boot loader, LILO may be configured by taking the following steps.
  1. Configure the /etc/lilo.conf file as described above.
  2. As the superuser, type the following to build the new Master Boot Record and it will update the /etc/lilo.conf file.
    # lilo
  3. Reboot the computer.

LILO uses the /etc/lilo.conf file to determine the boot sequence. Below is an example of the lilo.conf for an initial installation of Red Hat Linux Advanced Server 2.1.

The lilo.conf file can be modified manually for a number of reasons. The most common reasons for manually editing the grub.conf file are noted below.

  • Change the default kernel.

  • Change the timeout value. The timeout value sets the delay interval before boot strapping with the default kernel.

  • Changing any of the elements with a kernel defintion should generally be avoided. The one exception has to do with a loss of the root partition. If the root partition is moved from a failed disk, it may be edited to point to a new disk and or disk and partition.
The image below highlights the values that may be changed in the lilo.conf file. The /etc/lilo.conf file is not modified when adding or removing kernels. The file may be manually updated as follows:

  • The timeout value may be changed to a longer or shorter duration. Default timeout is 50 decaseconds or 10 seconds.
  • After installing a new kernel, an image and initrd file for that kernel will be installed in the /boot partition. Manually edit the /etc/lilo.conf to point to the new image and initrd files.
  • If a disk failure damages the partition containing the root file system, repoint the root variable to the new file system.
/etc/lilo.conf
prompt
timeout=50
default=linux
boot=/dev/hda
map=/boot/map
install=/boot/boot.b
message=/boot/message
linear

image=/boot/vmlinuz-2.4.9-e.3
        label=linux
        initrd=/boot/initrd-2.4.9-e.3.img
        read-only
        root=/dev/hda2


 Red Hat Linux AS 2.1

 Red Hat Linux AS 3.0

 UnitedLinux 1.0

If an error was made during the installation of Red Hat Linux Advanced Server 2.1, there is no GUI utility to fix the network setup. Editing the individual files is the only alternative available.

  1. Verify and edit the following files using the table below.
  • /etc/sysconfig/network-scripts/ifcfg-eth0
  • /etc/sysconfig/networking/devices/ifcfg-eth0
  • /etc/sysconfig/networking/profiles/default/ifcfg-eth0

Name Description Value
DEVICE Network Device Network device is typically eth0, which stands for the primary ethernet device. This sets the lowest level in the Open System Interconnection (OSI) networking framework.
BOOTPROTO Boot Protocol The boot protocol for a system determines whether it is using a static IP address, Dynamic Host Configuration Protocol (DHCP) or Bootstrap Protocol (BOOTP) method for identifying itself on the network.
BROADCAST Broadcast The Broadcast value is the highest point for addresses within the bit range. The value is calculated by using the maximum or 255 node of the gateway. If the gateway is 144.1.154.1 and the netmask is 255.255.252.0, then the network value is 144.1.157.255. A four bit network provides 1,022 hosts within a subnet.
IPADDR IP Address Enter the IP address, which is four numbers separated by periods. The numbering sequence is called dotted quad format. Each number has a valid range between 1 and 254. When the IP address is entered, it will automatically populate the Netmask value with a default value of 255.255.0.0. This is an incorrect value that will change as qualified below.
NETMASK Netmask The default netmask is used for a Class B Internet addressing schema. If installing in a contained test network, use a value of 255.255.255.0. If installing on the Oracle network use a value of 255.255.252.0, which is a four-bit network value.
NETWORK Network The Network value is the lowest point for addresses within the network's bit range. The value is calculated by using the zero node of the gateway. Gateways are determined from the first three values of the dotted quad. If the gateway is 144.1.154.1, then the network value is 144.1.154.0.
ONBOOT On System Boot The ONBOOT parameter has two valid values, yes and no. If the value is set to yes, the network device is initialized at system wakeup to support the networking frameworks.
GATEWAY Gateway The gateway is the bridge point for the subnet network to the wide area network.
TYPE Frame Type The frame type determines broadest level encapsulation for data transmitted across the network. The default is "Ethernet".
USERCTL User Controls User controls should be set to "no".
PEERDNS Peer DNS The Peer DNS should be no for a static IP address and yes for DHCP.

  1. Verify and edit the host name in the following files.
  • /etc/sysconfig/network
  • /etc/hosts

Name Description Value
HOSTNAME Host Name The hostname should be registered with the DNS servers.

  1. Verify and edit the name server and domain in the /etc/resolv.conf file.

It should be noted that the /etc/resolv.conf file only requires a domain and name server to work on the network. However, it works slightly more effectively when at least one search reference points to the primary domain. If there is no search reference found, it then uses the domain as the search path.

Name Description Value
domain Domain Name The domain name is a network identifier, like us.oracle.com or oraclecorp.com. It identifies the primary domain for the server and the environment where the machine operates.
search Search Domain Name The search domain name is a network identifier, like us.oracle.com or oraclecorp.com. It identifies the secondary, ternary et cetera domains that a machine searches for peer machines.
nameserver Name Server The name server is a Domain Names Server (DNS) that translates hostnames into IP addresses necessary for routing.


Under development .....


UnitedLinux manages GUI access to network configuration with the YaST utility. It can be accessed by setting up the X-windows display and typing yast2 at the command-line prompt. If started by other than the root user, the following input dialog box will appear to advise the user that they lack rights and permissions.

Attempting to manually edit some networking files in UnitedLinux may result in corruption of the encrypted keys. So, one should edit network files through the YaST utility.

If started by the root user, the utility will display in an X-window. The utility will be displayed as shown below.


Verify & edit network files.

After clicking on the Network Basic menu selection and the Netword Card configuration icon, the Network Card Setup screen will appear. There are two options available, configuring a second network card or changing the configuration of an existing card. The latter enables verification and changes to network setup values. Click the Change button to continue. There are seven steps to verify and modify network settings. They are shown below.

  1. Configure or change a configured device.
  Configure a device.

  • Click the configure button to start the process.

Change a configured device.

  • Click the change button to start the process.

  1. Select a network card to verify and change.
  Select a network card.

  • If more than one card appears, click on the card to edit.
  • Click the edit button to verify or change network configuration values.

  1. Network address setup.
  Choose automatic DCHP configuration.

  • Click automatic address setup.
  • Click the next button to proceed.
Choose static IP configuration.

  • Click static address setup.
  • Enter the IP address in dotted quad format.
  • Enter the subnet mask in dotted quad format.
  • In the details section, click the host name and name server button (Step #4) or routing button (Step #5) for additional configuration.
  • Click the next button to proceed.
  1. Enter host name and name server configuration.
  Enter host and domain name.

  • Enter the host name.
  • Enter the domain name.
Enter the name server IP addresses and domain search lists.

  • Enter the IP addresses in dotted quad format.
  • Enter the search domain names.
Return to network address setup.

  • Click the next button to proceed.
  1. Enter routing configuration.
  Enter routing IP address.

  • Enter the routing IP addresses in dotted quad format.
  • Enter data in the routing table if configuring a firewall.
  1. Enter routing configuration.
  Enter routing IP address.

  • If complete with host name and name server configuration, click the next button to proceed.
  1. Complete network configuration.
  Enter routing IP address.

  • Click the finish button to proceed.


  • Firewall Selection
There are three levels of firewalls on Red Hat Linux Advanced Server (AS) 2.1. They are high, medium and none. For test machines internal to a trusted network, like our internal network at Oracle, choosing no firewall simplifies the installation of Oracle products. Setting up a firewall is an advanced topic not covered here.

It is recommended to select no firewall during the installation. If necessary to implement security, a firewall can be implemented after the installation. The following general rules apply to Red Hat Linux AS 2.1, while the UnitedLinux requires specific setup steps.

  • No Firewall
If no firewall is selected, the system provides complete access and does no security checking. Additional setup will be required to enable incoming telnet and FTP.
  • Medium Firewall
If a medium firewall is selected, remote machines will not have access to some resources on the machine. The default is to disallow ports below 1023, the NFS port (2049), local X Window System display for remote X clients and the X Font server.
  • High Firewall
If a high firewall is selected, only DNS replies and DHCP services are available without overriding setup by the superuser. DNS replies and DHCP services are Domain Name Server (DNS) utilities and DNS servers are often configured as high firewalls. Also, a high firewall will disallow active mode FTP, IRC DCC file transfers, RealAudio and Remote X Window System clients.


  • Account Management
Account management is exactly like any UNIX system. Processes to manage users and groups are available through the links below.

Installation of Oracle9i, requires one configuration step before running the Oracle Installer. The apache user must be in the ORAINVENTORY group during the installation. This is required because of security reasons linked to the HTTP server. Reset the apache user to the apache group after the installation.

 Command-line syntax.
   Add a user.
   Modify a user.
   Delete a user.
   Add a group.
   Modify a group.
   Delete a group.
 Red Hat GUI.
   Add a user.
   Modify a user.
   Delete a user.
   Add a group.
   Modify a group.
   Delete a group.
 UnitedLinux GUI.
   Add a user.
   Modify a user.
   Delete a user.
   Add a group.
   Modify a group.
   Delete a group.


  • Package Selection
The Red Hat Package Management (RPM) utility is covered at the links below.

 What is the RPM tool?

 How to verify Red Hat Linux packages?

 How to verify UnitedLinux packages?

 How to install packages?

 How to upgrade packages?

 How to remove packages?.