Thursday 31 May 2007

Using Hewlett Packard blade systems for iLO installation of RHEL 4.

Two weeks ago we had the opportunity to do some work for a customer in Brussels, Belgium and to use a Hewlett Packard blade system. The HP blade rack was stored in a separate computer room from the training room and we used full remote access to install Red Hat Enterprise Linux 4 from a USB key attached to a laptop running SuSE Linux. The USB key contained ISO images from the 4 RHEL 4 installation CDs.

A (not very good mobile phone) picture of the naked front of the blades:



Another picture of the front of the actual blade boards. You can see clearly the hard drives attached to the motherboards and the cable attaching the management and diagnostics console to the system:



The management console sits in a sliding tray, nicely tucked in at the top of the rack. It can be pulled out, the screen lifted and a keyboard becomes available from underneath (in this picture it shows running a non-open source operating environment, sorry):



A final image of a blade server "tray". The (very noisy) fans are clearly visible doing their job keeping the dual core CPUs at the right temparature:

b

The purpose of the exercise was to provide a classroom server, running RHEL 4 with Apache, LDAP and DNS and to install it without any interaction with the physical blade hardware.

The installation did take some time of course as the installation ISOs had to be accessed from the USB (2.0) key, over the network to the blade (it was part of the fun getting that to work). We used the HP's "Integrated Lights Out" iLO console to "mount" the USB key as if it was a locally attached CD/DVD drive. Click here for a Wikipedia link to find out what iLO really is.

First we needed to identify ourselves to the iLO console through login as the administrator:



After successful login the iLO console displays the status summary menu from where several tasks can be performed:



To access the ISO images on the memory stick click on "Virtual Devices" and in the dialogue point the virtual CD-Rom to the local image file (in our case it was on the memory stick on /media/ISO-STICK/:



We connected (virtually) the first RHEL4 ISO on the memory stick and now the system can boot from it.

To be able to see the installation process and answer the questions asked by Anaconda we enabled the "Remote Console" from the iLO main menu (see previous screenshot above). iLO will launch a Java application with a view on the virtual console:



The above screenshot shows the installation halfway during the Red Hat packages copy and install process. The reason the remaining time is high is caused by us "removing" the virtual CD-Rom at one point at the end of the day. Allowing the system to generate an error message (with a retry option to re-read the CD-Rom), leaving the building for the evening and night, returning back the next morning, remounting the ISO image to the virtual CD-Rom and allowing Anaconda to retry reading the CD-Rom. Amazingly enough it worked and the installation did continue where it had stopped although the timing was confused of course.

The following sceen shows the dialogue to insert another CD-Rom (disk 4), using the "Virtual Media" menu just umount the existing ISO image, point to the next ISO image and re-mount the file as a virtual CD-Rom:



The timing eventually manage to correct itself, 35 minutes left!

Eventually we were rewarded with RHEL4' login menu through the virtual console:



The power of the Integrated Lights Out technology is clearly demonstrated. We installed a complete Red Hat Enterprise 4 installation without touching the actual hardware at any time. The installation worked very well over the network, using a standard laptop running SuSE 10.0 with a USB memory stick containing the RHEL 4 ISO images mounted as a virtual CD-Rom. Not bad, not bad at all. Can we have 10 please ;-).

Powered by ScribeFire.

Sunday 6 May 2007

Installation tutorial: Red Hat Enterprise Linux 4, introduction - part 3 (final)



This is the third (and final) part of the RHEL 4 installation tutorial, You can find the first part here and the second part here.

4.1 First boot (setup agent)
When the system comes back up after you have asked it to reboot, login using the root account (remember the root password) and the system will present you with the "first boot" welcome menu:



Click "Next" to move on to the next menu where you will be asked to agree with Red Hat's licensing scheme:



It is important to notice here that this license in many cases refers to licenses included with the source code of each software component that has been shipped with the Red Hat media. Most of the components adhere to the GNU Public License version 2, click here to learn more about what that means.

If you agree tick the "Yes, I agree to the License Agreement" and click "Next".



Here you can set the date and time at your location or alternatively allow the system clock to be set using the Network Time Protocol (NTP) by referring to time servers scattered around the Internet (we won't cover this, if you want to know more about NTP click here).

Set the correct date and time for your system and click "Next". This will bring you to the graphics display configuration menu:



The system assumes a "safe" resolution setting (800x600) and will have attempted to detect the monitor you are using. We will configure the resolution to a more sensible setting, but before we can do that the system need to be made aware of the capabilities of your monitor. To set the monitor type click "Configure":



Depending on what you are using choose the monitor model closest matching your monitor type (if the monitor is not a latest model there is a chance the settings are correct and there won't be a need to change them).

Click "OK" and you will see a menu similar to (if you have chosen a different monitor model the values might differ):





The next menu will give you an opportunity to enable the additional Red Hat subscription service:





You can choose and existing subscription (you must provide a login and password), or at this point you can create a new Red Hat login id and you can skip the dialogue (but you willhave to go past a "why is this important" screen". In this tutorial we will choose the "Tell me why I need to register ....." option so if you have made another choice the next menu will be different:



As we won't be making a registration here make sure to tick the "I can not complete ...." option and click "Next" to continue to the next step:



Here you have an option to create an additional (system) user. It is strongly recommended not to use the system administrator user (root) for day to day tasks (such as surfing the Net, writing reports and so on). The sudo or su commands provide the possibility to run a command as root (once in the case of sudo) or from within a new root shell (with su). Many of the GUI administrative tools provided with RHEL will ask for the root password when invoked by a non-priviliged user.

Create a new user here by specifying a login name (the username field), an optional full name and a (secure) password (you need to confirm this in case of typos). When you're done click "Next" to continue:







If you have any additional software you desire to install here you can insert the extra CDs and install additional documentation, software and plugins. We will skip this step, click "Next":



You have reached the final menu after which you can use the system!

From here you can start exploring the system menus, administration tools, the shell and many other aspects of the installed system.

If you want to review the previous sections, click here for the first part and here for the second part of this tutorial.

Congratulations you have installed Red Hat Enterprise Linux version 4.

Powered by ScribeFire.

Tuesday 1 May 2007

Installation tutorial: Red Hat Enterprise Linux 4, introduction - part 2


This is the second part of the RHEL 4 installation tutorial. You can find the first part here

3.2 Graphical installation: network
The next menus you will encounter are designed to assist you installing the network card and network characteristics of the Red Hat system being build:



Here you can choose a dynamic TCP/IP configuration or a static. In the next part you will setup a static configuration, this allows a more thorough review of the installation menus. If your LAN network configuration allows for it, there is no reason to just leave the default settings.
For the purpose of this tutorial click the "Edit" button, this will bring up the "Edit Interface eth0" dialogue box:



If they don't conflict with your local network addressing scheme choose the settings as shown above and click "OK" to continue to the next menu:



Notice the menu has been updated to reflect your choice of manual (fixed) IP address configuration. Finalise the network configuration as shown above (using your own values) and move on to the next section by clicking

3.3 Graphical installation: firewall and security enhanced Linux
The next menu will ask if you want to have the firewall installed and what level of security enhanced Linux you want to deploy. If this is a standalone, server system within a protected privat network you probably won't need the firewall enabled. It is very likely the kernel filters (using iptables rules) might interfere with the services you are trying to deliver. For the purpose of this tutorial you will disable the firewall.
Security enhanced Linux (SELinux), the code originally added by the United States government National Security Agency, provides a mandatory security implementation to Linux. In addition to the traditional Linux (Unix) style security, based on ownership, SELinux adds mandatory access controls (rules based) to the Linux kernel. SELinux uses rule sets to control who and what can be done to any object within the system. For the purpose of this tutorial you will set the SELinux level to "warn" only. This provides a good way to learn about SELinux without it being in the way of your day to day operation of the system:



Make sure you switch off the firewall and select "Warn" for SELinux and click "Next" to continue.
A warning will be displayed making sure you really, really want the firewall to be switched off:



Click to continue

3.4 Languages, timezones and root password settings
The next few menus deal with the default system language, if you desire to do so, the installation of additional language support, what timezone your system is operating in and the system administrator, root, password. The menus are self explanatory, if you want to know more don't forget to scroll through and read the help window pane on the left side of the main menu.



Make sure you select the correct default language for your system. If you select any additional languages Anaconda, the installer, will add the appropriate dictionaries and language support files to your system but the default language is what you will use on a daily basis while interacting with the system. To continue click



As you can see overhere on this screenshot, London is the centre of the planet ...... not that we are biased overhere. You can use the map to "zoom" in on areas and select a city as close as possible to your location (make sure it is in the same time zone). You can also scroll down the list in the bottom window pane (that actually might be quicker and more accurate). When you're done click the "Next" button.



This menu asks you to provide the system "root" user password. As you undoubtedly are aware, the "root" user (on a non SELinux enhanced system) is able to access every file, process, system memory location, kernel driver and so on. A malicious non-priviliged user with bad intentions (even with good intentions) will try to elevate his/her privilege to the super user "root" as soon as possible (and then follows on to wipe out any traces of such an act). Choose the "root" user password with care. Strong passwords have a minimum length (8 characters), use upper and lower case characters, use punctuation characters and numbers but are relatively easy to remember and are not found in dictionaries. Some examples are (you can use normal words mixed with other characters): safe4Me+U, build2Strength!. Of course random characters are best but you might not be able to remember them. Whatever password you choose, type it into the appropriate menu field, make sure you remember, and click

3.5 Package selection
The following setup menu builds your final system to become a workstation or server or any other combination of software packages that Red Hat has included on the installation medium. Modern Linux distributions consist out of pre-selected and pre-configured package files that contain software, libraries, configuration and text files and many others together with the information where they need to be installed with what kind of security settings. If you have an opportunity when the system is running we suggest you have a look at the directory structure of one of the installation CDs and you will find within one of the directories a large amount of files with an ".rpm" file extention. These are the files that are used to create your system. Each ".rpm" file is a self contained unit and can be upgraded, removed or re-installed using simple command line or GUI tools.
To continue you need to decide what you want your system to be:



At this stage you will customise the installation by fine tuning what you want to have installed. Of course any selections you make overhere can be changed when the system is up and running. Choose the second option "Customize software packages to be installed" and click "Next".



The "Package Group Selection" menu shows the groups of packages, as selected by Red Hat, you can install on your system. You can further tune what you want to have installed by clicking the "Details" button, wherever available, to the right of the package selections. Red Hat for many years now has made this process very easy by using sensible package group names that are self explanatory (really!).
You can leave the defaults if you want or select your choice of packages. When you are done click "Next" which will bring you to the "About to Install" screen:



This menu as informational only and of course you have the option to return to the previous menus. Interesting is the mention of two files the system creates in the "/root" (i.e. the super user's home directory):
  • /root/install.log
  • /root/anaconda-ks.cfg
The first file contains a detailed log of the package installation process (the first view lines):
Installing 614 packages

Installing hwdata-0.146.10.EL-1.noarch.
Installing indexhtml-4-2.noarch.
Installing libgcc-3.4.3-22.1.i386.
Installing redhat-logos-1.1.25-1.noarch.
Installing rootfiles-8-1.noarch.
Installing setup-2.5.37-1.1.noarch.
Installing filesystem-2.3.0-1.i386.
Installing basesystem-8.0-4.noarch.
Installing termcap-5.4-3.noarch.
Installing tzdata-2005f-1.EL4.noarch.
Installing glibc-common-2.3.4-2.9.i386.
Installing glibc-2.3.4-2.9.i686.
Installing audit-0.5-1.i386.
Installing beecrypt-3.1.0-6.i386.
Installing bzip2-libs-1.0.2-13.i386.
Installing chkconfig-1.3.13.2-1.i386.
Installing device-mapper-1.01.01-1.RHEL4.i386.
Installing dmraid-1.0.0.rc6.1-3_RHEL4_U1.i386.
.....................

The second file contains, in simple text format, the choices you have made during the installation as interpreted by Anaconda, the Red Hat installer. In the more advanced installation tutorial you will learn how to use this file in unattended installations.
Continue with the installation, click
The system will let you know which installation media it requires:



Just click the "Continue" button and make sure you have the other media handy. The next information boxes will inform you about respectively the start of the installation process and the status of it (the behaviour of the progress bar is uncannily similar to the Microsoft version at installation time .....):




When done with the first CD the system will ask for the next (and so on):







When the system has asked for all the media it will perform some post installation tasks. You can see this in the final menu before the reboot:







Click the "Reboot" button and this part of the installation is complete.
After the reboot (don't forget to remove the last CD) the system will run a first boot script that will ask you for some final questions in configuring the system. This third and final part will be a subject of the next post, which you can find here.

Powered by ScribeFire.

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.