Friday 27 April 2007

Installation tutorial: Red hat Enterprise Linux 4, introduction - part 1



1. Introduction
Regularly during our classes, especially with a more 'advanced' audience, over the last few years we have had to explain in quite some detail the basics about installing Red Hat Enterprise Linux manually from the CDs (this link points to version 5 now, RHEL version 5 will be covered in the future). Happily nowadays the process is quite straightforward, as long as the underlying hardware is properly supported.

The following tutorial assumes you have a "clean system" with an empty hard drive, i.e. even the boot sector containing the partition table amongs other things is empty. This is not so likely to happen with a normal installation as you will probably be installing on a drive with an existing system. The screenshots and the examples are produced using VMWare server and the Gimp (the GNU Image Manipulation Program), the host was an existing RHEL 4 system.

2. Initial boot menus
Let's start with the installation. First of all insert CD1 of the RHEL installation disk and make sure the system boots from the CD. When it finishes booting you willl see a menu (in text as the system is still in pre-GUI mode) not unlike:



At this menu you have the opportunity to start the installation (as you will do later). The installation process accepts many boot options that can be used to change or adjust the installation process. The installer provides a few help menus that cover some of those options. Here it shows the "text" option that starts the installer in text mode, in stead of it's default full GUI mode.
First let's explore the other options under the F2 key.
Press the F2 button on your keyboard, the following menu will appear:



The "Installer Boot Option" menu shows the additional options: "rescue" - to start the installer in rescue mode, this option can be used to gain access to a troublesome Red Hat Enterprise installation, "dd" - to allow the usage of driver software disks during the installation (to allow installation on hardware that was not supported at the time of release of RHEL 4, e.g. Buslogic SCSI controllers used by VMWare), "updates" - to update the actual installer (called Anaconda) itself. In addition on this menu you can run a memory test program in case you suspect hardware problems with your system.
Under F3 you will find the following menu, press F3:



The "General Boot Help" menu provides several options to assist you in succesfully installing the system on problematic hardware. In a matter of fact you should not need any of these options as RHEL 4 is only really supported on specific hardware, so you would think it always installs ;-)
There are two more menus (F4-Kernel and F5-Rescue) showing options related to the Linux kernel and running a rescue system. During this tutorial you will now start the installation process "proper".
At this stage press "enter" to start the installation, the system stays in text mode for a few more menus and first displays the CD media test menu:



At this menu you have the option to check the CD media on errors. At gha.com we believe it as a bit of a waste of time: if the CD doesn't work you'll find out anyway during the installation. The symptoms of a bad CD show up during the installation as very high system response times. You can check on I/O errors by checking out any of the additional consoles if the system slows down unexpectedly.

3. Graphical installation
Now move on to the next menu by using the key and select "Skip". The installer will switch to graphical mode and displays the next menu:



From now on you can use your mouse to navigate the menus, even better within most menus you can navigate backwards. We recommend, if this is your first installation, to read the left menu pane. It provides additional information about how to navigate around and what the system is about to do at this stage.
If you want to know more about known issues with RHEL available at the time of release you can find out more under the Release Notes button.
Continue with the installation by clicking to move on to the language selection menu:



Here you can select the language used in the different menus during the installation. During this tutorial I have used the English language, but please select here whichever language you prefer. And press the Next button:



Choose the correct keyboard for your locale and navigate to the next menu by clicking .

3.1 Graphical installation: partitioning
Arguably the part of the installation that is next is the most complicated of the installation procedure: disk partitioning.



Here you have the option to let the system choose the partitioning scheme for you (Automatic partition) (Server, Workstation etc.) or choose you own (Manually) for a particular installation type. This is not the right place to go into any details about a personal computer's (the same mechanism counts for servers also) particular disk partitioning quirks. Suffice to say is that a PC will not function properly without a partition table on each disk or disk array it needs to use.
A PC needs to have at least one primary partition set for each hard disk attached, this even counts for external USB or Firewire storage devices, it is kind of universal now. The partition table "lives" on the very first sector of the hard disk (or other storage device). It covers and it describes the "geometry", i.e. the physical layout, of the hard disk storage space.
For the purpose of this tutorial I am going to show you a partitioning scheme that is quite useful for a server installation. I have used a relatively small disk (8 Gbytes), so in your case you will have to adjust the actual values for the different partition sizes. The partitioning scheme allows for easy maintenance, removal, extensions and moving of the different file systems commonly used on a Linux system setup as a server. I propose to setup the following filesystems on different partitions:
  • /boot
  • /usr
  • /
  • /var
  • /tmp
  • /home
  • swap
What each of these are and how they relate to the operation of a Linux system is going to be the subject of another tutorial in the future.
Make sure to select the option "Manually partition with Disk Druid" and click "Next". As I am running the installer on a totally "virgin" hard drive, the system will display the following message. Be aware that in your case this might not be so (the message is self explanatory):



If you see this message (and heed it's warning!), click "Yes" and you will be taken to the following step:



Please take some time studying this menu, it is quite complicated and the next steps have to be taken with care as the correct setup of the partition table is crucial for a succesful installation and operation. If you do see a partitioning scheme at this menu, the hard disk you are installing on already has a partition table available. In that case you might want to delete the existing partitions (beware it will make the data in those partitions unavailable to whatever system was running previously). This can be done by selection the appropriate partition and clicking the "Delete" menu item.
The installer allows you to configure the Logical Volume Manager (LVM) as well as linux kernel based Redundant Arrays of Inexpensive Disks (sofware RAID). These will be subjects of further tutorials in the future.
Let's create a new partition by clicking on the "New" menu button, this will open the "Add Partition" dialogue box:



As you can see in the screenshot, the fields are already filled in with the following data:
  • this partition will hold the /boot file system (containing the /boot directory structure)
  • it will be formatted with the ext3 file system (this is the default for RHEL 4)
  • it will be (about) 100Mbytes in size
  • it's size is fixed
  • it is forced as a primary partition
For the /boot partition there is a kind of oldish tradition, which stems from limitations in the original Linux boot loaders (mainly a loader called LILO - the Linux Loader). This tradition will have the /boot partition towards the "beginning" (i.e. lowest cylinder numbers) of the hard drive.
Fill in the field as shown above (you might want to adjust the size to what you desire, normally 100 Mbytes for the boot environment and the Linux kernel is more than sufficient) and click "OK". The system will now show you the previous menu "Disk Setup" with the new partition displayed. Please note that at this stage no changes have been made to the partition table on the disk itself. All we do overhere is to create a new partition table to be written later, when we're done, to the hard disk.
Create another partition, now for /usr (click the "New" button once more):



This partition needs to be considerable larger than /boot as the main system binaries and supporting files are stored in /usr. Fill in the appropriate fields and click "OK" (don't forget to set your own value for the size).
Create the other partitions in a similar fashion, now the "/" partition:



And next the /home partition:



Followed by /var:



And /tmp:



Last but not least the virtual memory, swap partition:



The swap partition type can be set by clicking on the "File System Type" drop down menu and selecting "swap" from the list.
Click for the last time "OK" and you will see your work summarised in the following menu (only still in the systems memory, no changes have been made to the disk itself you can still bail out here):



At this stage it is advisable to double check your work. Red Hat's Disk Druid software is quite flexible and has evolved to a really very capable disk administrator at this stage it is easy to make any changes. When you click "Next" the system will write the changes to the partition table on the corresponding disk.
Click
The partition table has been updated and now it is time to configure the boot loader program that is loaded first before the Linux kernel. RHEL 4 uses by default Grub (the Grand Unified Boot Loader), this can be done from the following menu:



If you want you can change the bootloader here, the old Linux Loader (Lilo) is still available for RHEL 4, but I wouldn't recommend it. Future versions of Red Hat Linux systems will use GRUB and GRUB is a superior quality boot loader than Lilo.
There are several configuration options here that allow you to fine tune the behaviour of GRUB. The system has chosen a default Linux kernel image to load and gave it a label (in this case Red Hat Enterprise Linux ES). If you want the label name can be adjusted.
This menu provides a simple dialogue to adjust the boot loader password. I would recommended using a boot password in places where (console) security is very important. But it has to be used with care as it might become more difficult to fix a broken system in case the password is lost or unknown. More complex GRUB configuration parameters can be set in the advanced boot loader dialogue, available if you check the "Configure advanced boot loader options".
Leave the defaults and click "Next". GRUB will now be installed as the default boot loader.

This is the end of the first part of this installation tutorial. The second part of this tutorial you can find here.

Powered by ScribeFire.

Friday 20 April 2007

Next step, installation tutorials.

We will try to put something down at least once a week, a tutorial or a how-to. we have started with some How-To's and now we've enabled labels so the blog can also be viewed per subject area.

We are thinking of introducing the following next subject (label): "Tutorial: installations" in the next few days. At meetings with our customers and during the actual courses we teach we regularly need installation tutorials and examples (we start with RHEL 4 as an example as we are using that Linux distribution the most) The tutorials will be of three kinds (levels if you like): introductory, intermediate and advanced.

The introductory level will be describing graphical installations, with text around screenshots for the different steps. For the intermediate tutorials the plan is to write about how to create an automated installation setup using Kickstart. Advanced tutorial on installation will most likely cover un-attended installation from boot.

Sunday 15 April 2007

How to use Knoppix as an X terminal service into a RedHat system

Quite regularly during our Linux courses and other work we have had the need to quickly demonstrate X-Windows' ability to provide full graphical logins into a "central" Linux (e.g. Red Hat Fedora or RHEL) system. Every time we try to do this it is a struggle to remember how to do so, as the security of the central host prohibit us or some misunderstood behaviour of the XDMCP protocol plays up while the whole class is watching this struggle.
So it's time to document how we managed to get this to work.

The last time we tried this was in April 2007 while teaching a Linux Introduction workshop in sunny Staines, England. We used the following configuration:
  • Client systems HP Compaq DC7100 running Knoppix 5.1.1 from CD
  • Central application server (serving login and xclients) HP Compaq DC7100 running Windows XP (host), VMWare Server version (1.0.1 29996) and Fedora Core 5 (guest)
  • 100Mbits local switched lan
This configuration was necessary, while working for this client we are not really supposed to change the configuration of the Windows XP system (the installation of VMWare server was permitted). Installing Linux was out of the question so the solution was: bootable CD with Knoppix for the XServer and VMWare running Red Hat Fedora for the "central" system running the XClients. Performance is not optimal of course, but for this project (an intermediate level Linux Introduction course) it worked very well with up to 6 workstations.

What is XDMCP ?

The X Display Manager Control Protocol (here is an HOW-TO). is a networked, application level, protocol that allows an XServer to remotely display a graphical login screen from a "central" Unix/Linux system. By logging into this screen the user gains access to the resources (XClient programs) on the "central" Unix/Linux system. In our setup we used the Knoppix CD to create a (rather sophisticated) XServer from a standard PC. From this Knoppix system we started another X server that listens to the XDMCP broadcasts or directly connects to the XDMCP enabled display manager.

What follows is a little tutorial on how to set this up quickly and reliably:

First of all the Fedora Core 5 system needs to make it's presence known using XDMCP broadcasts (or multicasts if you prefer). This can be done by (assuming access as root) changing settings in the
System --> Administration --> Login 
application:

This brings up the
Login Window Preferences
menu, choose the
Remote
tab:

This tab configures the "look and feel" of the login program (the X display manager) used by Red Hat to provide remote graphical logins into the host system. It also enables or disables the ability of the login program used by Fedora to make it's presence known over the network using XDMCP broadcasts and/or multicasts in the "Configure XDMCP" tab:

Make sure the settings are as above and click on "Close". Now the XServer needs restarting (logout and press simultaneously or if you don't mind reboot the system).

To be able to access the Red Hat login menu you must start a new X-server on your Knoppix system from the shell prompt using the following command:
sudo X :1 -query [hostname or ip-address]
or you can set the X-server to listen for broadcasts (it will then pick the first it receives) with the command:
sudo X :1 -broadcast
After a few seconds the default Fedora login menu will be displayed on your screen. Login to the system and you're done.

Powered by ScribeFire.