You are on page 1of 25

Unit 2 Installation of Redhat Linux

Installation of Redhat Linux on Virtual Machine,


Red Hat is one of the most powerful commercial server Linux distributions available for physical, cloud, and virtual
platforms. We have created this post to introduce you to Red Hat Enterprise Linux and how to install Red Hat Enterprise
Linux on VMWare Workstation.
Table of Contents
What Is Red Hat Enterprise Linux?
Red Hat Enterprise Linux in short RHEL is basically a server operating system developed by Red Hat for commercial use.
Now Red Hat released RHEL for multiple platforms. RHEL is available for physical, cloud, and virtual environments. Red
Hat has a released operating system for desktops too. It’s one of the most powerful Linux distributions that come with
large package repositories to run commercial-grade server applications.
Red Hat has other subsidiary Linux distributions.

1. Red Hat Enterprise Linux (RHEL): This is a commercial distribution. It is a paid product comes wiht
official support.
2. CentOS: It is a open source community supported distribution. It shares the same source code of Red Hat
Enterprise Linux. This can be used as a substitution for RHEL.
3. Fedora: It is a open source community supported distribution supported by Red Hat and its communities. It
is developed for developers to provide innovative projects in Linux platform.

Prerequisites To Install Red Hat Enterprise Linux On


VMWare Workstation:
To install Red Hat Enterprise Linux on VMWare Workstation you just need a physical machine, VMWare Workstation
Pro or Player, and a Red Hat Enterprise ISO image.

1. A host system with minimum:


 8 GB of memory
 A quad core CPU
 500 GB of Hard Drive
2. VMWare Workstation Pro or Player application:0
 Download VMWare Workstation
3. Red Hat Enterprise Linux ISO image is to install on VMWare Workstation. Note: RHEL image is only
available for development use.
 Download RedHat Enterprise Linux

How To Install RedHat Enterprise Linux On VMWare


Workstation?

1. Fier up VMWare Workstation


Download the VMWare Workstation application for your host operating system and install it on your
machine. The installation procedure is pretty simple and straight. Read the documentation for more details.
Open the app after installation. Create a new Virtual Machine.

2. Select Custom Configuration Wizard


You can choose either Typical or Custom Wizard. We recommend selecting Custom if you want to install
with all the configurations. If you are okay with default configurations then go ahead with Typical
configurations.

3. Select Virtual Machine Hardware Compatibilityrkstation


Go with the default option if you don’t have the choice.

4. Select the Operating System Media


Select ‘I will install the operating system later’ for an interactive installation.

5. Select Guest Operating System


Select the guest operating system and its distribution with version information.

6. Name the Virtual Machine Name and location


Type a name and give the location details.

7. Allocate the Processors


Assign the processors, Calculate the processor required to run the host machine. Assign the leftover
resources to the virtual machine.
8. Allocate the Memory for Virtual Machine
Memory allocation calculation is the same as the processor allocation. Leave sufficient memory for the host
system and allocate the remaining memory for the virtual machine.

9. Choose the Network Configuration


Select any one of the network configurations as per your requirement.

10. Select the I/O Controller Type

11. Select Disk Type


12. Select Virtual Disk
Select the Virtual Disk if you have or create one.

13. Select Disk Capacity


Select the disk size. Selecting a single disk will increase the performance. However, selecting a split disk
will help in the disk transfer scenario.
14. Specify Virtual Disk File

15. Create Virtual Machine


16. Supply RHEL ISO Image to Virtual Machine
Download RHEL image. Edit the CD/DVD settings and import the downloaded Ubuntu image.

17. Install RHEL on VMWare Workstation


18. Power On the Virtual Machine
Press the Play button to power on the Virtual Machine.

19. Welcome RHEL Virtual Machine


After initiating the installation. You will be treated with a welcome screen on which you will see the option
to select the language. Select your language and click Continue.
20. Configure the required installation settings
Set the Keyboard, Language supports, Time and Date settings, Software package selections for installation,
root password, Installation media, and disk partition information to proceed with the installation of RHEL.

21. Partition the Disk


Select the Disk to erase for auto partition. Or Select the Advance option to create the custom partition.

22. Set root account password

23. Begin Installation after setting up all the required settings


24. Installation of CentOS is in Progress
This process would take 15 to 60 minutes depends on your network bandwidth and package selection. Wait
until it finishes.

25. Reboot Virtual Machine


Reboot the machine after installation.

26. Select License Information upon reboot and accept the license

27. Tick – I Accept The License Agreement – Done


28. Create a user account
Type Full Name, User Name (Tick Make This User Administrator & Require a Password to Use This
Account), Password and Cofirm Password – Done

29. This will finish the configuration wizard


Click Finish Configuration to continue.

30. Sign In with user account

31. Select Language


You will be treated with a screen to select the language. Select your language then click Next.

32. Select your keyboard then click Next

33. Toggle Location Services either to ON or OFF as per your requirement


34. You can connect this VM to your online accounts. However, this is an optional step. We have skipped
this in the demonstration

35. That’s all. Now, we are ready to go!!!


36. This completes the installation of RHEL on the VMWare Workstation

Boot Loader
A boot loader is a type of program that loads and starts the boot time tasks and processes of an
operating system or the computer system. It enables loading the operating system within the
computer memory when a computer is started or booted up.

A boot loader primarily manages and executes the boot sequence of a computer system. A boot
loader program is typically started after the computer or the BIOS have finished performing the
initial power and hardware device checks and tests. It fetches the OS kernel from the hard disk or
any specified boot device within the boot sequence, into the main memory. A boot loader is
associated with only a single operating system. An operating system can also have multiple boot
loader programs classified as primary and secondary boot loaders, where a secondary boot loader
might be larger and more capable than the primary boot loader.

GRUB BOOT LOADER:


GNU GRUB is a bootloader (can also be spelled boot loader) capable of loading a
variety of free and proprietary operating systems. GRUB will work well with
Linux, DOS, Windows, or BSD. GRUB stands for GRand Unified Bootloader.

GRUB is dynamically configurable. This means that the user can make changes
during the boot time, which include altering existing boot entries, adding new,
custom entries, selecting different kernels, or modifying initrd. GRUB also
supports Logical Block Address mode. 

GRUB can be run from or be installed to any device (floppy disk, hard disk, CD-
ROM, USB drive, network drive) and can load operating systems from just as
many locations, including network drives. It can also decompress operating system
images before booting them.

You can configure GRUB boot options by editing the /boot/grub/grub.cfg or in


some systems /etc/grub.conf file or using one of the graphical tools that make
doing this easier and safer. For most Linux users the grub configuration will be
automatically created, even including other operating systems you might have
installed.

LILO BOOT LOADER:


You may have heard about another Linux bootloader called LILO (stands
for LInux LOader). While a sensible option for many Linux users.

LILO (LInuxLOader) is a boot loader (a small program that manages a dual boot)
for use with the Linux operating system. Most new computers are shipped with
boot loaders for some version of Microsoft Windows or the Mac OS. If a computer
is to be used with Linux, a special boot loader must be installed. LILO is the most
popular boot loader among users who employ Linux as their main, or only,
operating system.
When a computer is powered-up or restarted with LILO installed in the usual
manner, the basic input/output system (BIOS) performs some initial tests and then
transfers control to the Master Boot Record (MBR) where LILO resides. The
primary advantage of LILO is the fact that it allows for fast boot up of Linux when
installed in the MBR. Its main limitation is the fact that not all computers tolerate
modification of the MBR. In these situations, there are alternative approaches for
using LILO, but it takes longer.

There are several boot loaders other than LILO that can be used to boot Linux into
a computer's memory, such as LOADLIN (LOAD LINux) and GRUB (GRand
Unified Bootloader).

What is difference between GRUB and LILO ?


All boot loaders work in a similar way to fulfill a common purpose. But LILO and
GRUB do have a number of differences:
* LILO has no interactive command interface, whereas GRUB does.
* LILO does not support booting from a network, whereas GRUB does.
* LILO stores information regarding the location of the operating systems it can to
load physically on the MBR. If you change your LILO config file, you have to
rewrite the LILO stage one boot loader to the MBR. Compared with GRUB, this is
a much more risky option since a misconfigured MBR could leave the system
unbootable. With GRUB, if the configuration file is configured incorrectly, it will
simply default to the GRUB command-line interface.
* LILO only loads linux and other boot loaders. and GRUB loads a large number
of OS

 LILO works by loading itself into a space that will fit on the MBR. Grub has two
stages (because it’s too overcomplicated to work as well, err I mean as easily
as lilo). It loads stage 1 off the MBR (usually) and stage 2 out of /boot.

BOOTSTRAPING:
In simple words, "bootstrapping" means starting up your computer. It involves all
those stages, from the moment you power on your machine till the system is ready
to log you in. 

The following are the 6 high level stages of a typical Linux boot process.

1. BIOS
 BIOS stands for Basic Input/Output System
 Performs some system integrity checks
 Searches, loads, and executes the boot loader program.
 It looks for boot loader in floppy, cd-rom, or hard drive. You can press a key
(typically F12 of F2, but it depends on your system) during the BIOS startup to
change the boot sequence.
 Once the boot loader program is detected and loaded into the memory, BIOS gives
the control to it.
 So, in simple terms BIOS loads and executes the MBR boot loader.

 MBR
 MBR stands for Master Boot Record.
 It is located in the 1st sector of the bootable disk. Typically /dev/hda, or /dev/sda
 MBR is less than 512 bytes in size. This has three components 1) primary boot loader
info in 1st 446 bytes 2) partition table info in next 64 bytes 3) mbr validation check
in last 2 bytes.
 It contains information about GRUB (or LILO in old systems).
 So, in simple terms MBR loads and executes the GRUB boot loader.

GRUB
 GRUB stands for Grand Unified Bootloader.
 If you have multiple kernel images installed on your system, you can choose which
one to be executed.
 GRUB displays a splash screen, waits for few seconds, if you don’t enter anything, it
loads the default kernel image as specified in the grub configuration file.
 GRUB has the knowledge of the filesystem (the older Linux loader LILO didn’t
understand filesystem).
 Grub configuration file is /boot/grub/grub.conf (/etc/grub.conf is a link to this). The
following is sample grub.conf of CentOS.
#boot=/dev/sda

default=0

timeout=5

splashimage=(hd0,0)/boot/grub/splash.xpm.gz

hiddenmenu

titleCentOS (2.6.18-194.el5PAE)

root (hd0,0)

kernel /boot/vmlinuz-2.6.18-194.el5PAE ro root=LABEL=/

initrd /boot/initrd-2.6.18-194.el5PAE.img

 As you notice from the above info, it contains kernel and initrd image.
 So, in simple terms GRUB just loads and executes Kernel and initrd images.

Kernel
 Mounts the root file system as specified in the “root=” in grub.conf
 Kernel executes the /sbin/init program
 Since init was the 1st program to be executed by Linux Kernel, it has the process id
(PID) of 1. Do a ‘ps -ef | grepinit’ and check the pid.
 initrd stands for Initial RAM Disk.
 initrd is used by kernel as temporary root file system until kernel is booted and the
real root file system is mounted. It also contains necessary drivers compiled inside,
which helps it to access the hard drive partitions, and other hardware.

 Init
 Looks at the /etc/inittab file to decide the Linux run level.
 Following are the available run levels
 0 – halt
 1 – Single user mode
 2 – Multiuser, without NFS
 3 – Full multiuser mode
 4 – unused
 5 – X11
 6 – reboot
 Init identifies the default initlevel from /etc/inittab and uses that to load all
appropriate program.
 Execute ‘grepinitdefault /etc/inittab’ on your system to identify the default run level
 If you want to get into trouble, you can set the default run level to 0 or 6. Since you
know what 0 and 6 means, probably you might not do that.
 Typically you would set the default run level to either 3 or 5.

6. Runlevel programs
 When the Linux system is booting up, you might see various services getting started.
For example, it might say “starting sendmail …. OK”. Those are the runlevel
programs, executed from the run level directory as defined by your run level.
 Depending on your default init level setting, the system will execute the programs
from one of the following directories.
 Run level 0 – /etc/rc.d/rc0.d/
 Run level 1 – /etc/rc.d/rc1.d/
 Run level 2 – /etc/rc.d/rc2.d/
 Run level 3 – /etc/rc.d/rc3.d/
 Run level 4 – /etc/rc.d/rc4.d/
 Run level 5 – /etc/rc.d/rc5.d/
 Run level 6 – /etc/rc.d/rc6.d/
 Please note that there are also symbolic links available for these
directory under /etc directly. So, /etc/rc0.d is linked to
/etc/rc.d/rc0.d.
 Under the /etc/rc.d/rc*.d/ directories, you would see programs that
start with S and K.
 Programs starts with S are used during startup. S for startup.
 Programs starts with K are used during shutdown. K for kill.
 There are numbers right next to S and K in the program names. Those
are the sequence number in which the programs should be started or
killed.
 For example, S12syslog is to start the syslog deamon, which has the
sequence number of 12. S80sendmail is to start the sendmail daemon,
which has the sequence number of 80. So, syslog program will be
started before sendmail.

You might also like