0% found this document useful (0 votes)
20 views

Lesson 1-1 Installing Linux

Uploaded by

SAM DAS
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Lesson 1-1 Installing Linux

Uploaded by

SAM DAS
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Lesson 1: Installing Linux

INTRODUCTION
In this lesson, you will gain an understanding of the preparation needed and the methods
used to install Linux.

LESSON OBJECTIVES
By the end of this lesson, you will be able to:

1. Create a plan for installation.


2. Identify methods of installation.
3. Install Linux.

LEARNING SEQUENCE

Required Reading Read the following:

Installing Linux

 Preparing for Installation


 Methods of Installation

Resources View the following:

 Ubuntu Installation (5:25)


 Fedora Installation (5:53)

INSTRUCTION

Preparing for Installation


Before starting an installation of Linux, it is important that you begin with project
management. You have to meet with numerous people and ask lots of questions. Here are
some important questions that you should prepare to ask:

 What tasks will be performed on this host?


 What distribution of Linux do I need to install?
 Will the hardware I have now run the selected version?
 What type of hard drives am I going to use?
 How am I going to partition those hard drives?
 Which bootloader will be used to load the OS?
 What filesystem am I going to install?
 What information do I need to connect the host to a network?
 What method of installation will be used?

You can see there are lots of things that have to be determined before you should start an
installation. This section will cover each of the steps in more detail.
Step 1: Talk to Key People
The first thing you need to do in planning for your installation is to talk to all of the key
players. Talk to management and especially the end-users. What management envisions
may not be what works for the end-users. The end-users are the people on the front line;
they know exactly what they need. It is important to determine the tasks the host will need
to perform or what problem will be satisfied with this installation. Does the host need to be
a server or a desktop? Make sure everyone is in agreement as to what the host is expected
to do before you move to the next step.

Step 2: Distributions
Picking the distribution, or distro, that will be used can be a challenge. The first step to
determine is whether the host should be a server or a desktop; this should be identified
during preliminary discussions with key people. The answer to this question can determine
which distribution will be used. For example, Community Enterprise Operating System
(CentOS) is a Linux distribution that acts more as a server than as a desktop. Fedora and
Ubuntu are operating systems that act more like desktops. Fedora and Ubuntu can act as
servers, but usually do not. Here are some important points to consider:

 Will the end-users be comfortable with this distribution or will modifications be


required?
 Will the software the end-users need run on the selected distribution?
 Will there be adequate support for the selected distribution?

Distributions (distros) used in this course will include:

Common Distributions

Distribution Provider Function


CentOS Red Hat Enterprise Linux (RHEL) Used as a server
Fedora 13 Red Hat Used as a desktop
Ubuntu 12.04 Debian Linux Used as a desktop

Resource Requirements for Ubuntu and Fedora


It is important to know the resource requirements for Ubuntu and Fedora. The minimum
requirements are listed below.

Ubuntu - Recommended Minimum System Requirements


 CPU – 1 GHz Pentium 4
 RAM – 512 MB
 Hard disk size – 5 GB
 101 keyboard and 2-button mouse
 Monitor
 Network card
 CD/DVD ROM or USB flash drive

Fedora - Recommended Minimum System Requirements


 CPU – 400 MHz or faster
 RAM – 512 GB
 Hard disk size – 20 GB
 101 keyboard and 2-button mouse
 Monitor
 Network card
 CD/DVD ROM or USB flash drive

In addition to the minimum requirements, there are three important things that you need to
take into consideration as well.

1. Check the distribution's hardware compatibility list (HCL). You can Google the
distribution’s HCL and find several places to help in that area.

2. Use the correct version of the distribution that is based on the host's CPU
architecture, such as understanding if you are using 32-bit or 64-bit. Itanium, Alpha,
and PowerPC are also considered the CPU architecture.

3. Make sure you have the hardware you need to run the operating system you want to
install and the software that is going to be used to perform the required task.

Step 3: Naming Conventions


Before you can determine how you are going to partition your hard drives, you need to
determine what type of hard drives you are going to use. As a quick review, there are
Parallel ATA hard drives (PATA) and Serial ATA (SATA), or the Small Computer System
Interface (SCSI). The ATA in these two acronyms stands for Advanced Technology
Attachment.

Parallel AT Attachment (PATA) or Integrated Drive Electronics (IDE)


With PATA or IDE, you have a primary channel and a secondary channel, and each can have
a slave. You can only have four physical hard drives when using PATA/IDE drives. Notice
their naming convention. The /dev directory is where the information about the interface
will be located.

 Primary Master (/dev/hda)


 Primary Slave (/dev/hdb)
 Secondary Master (/dev/hdc)
 Secondary Master (/dev/hdd)

Serial AT Attachment (SATA) and Small Computer System Interface (SCSI)


SATA or SCSI information is also located in the /dev directory, but they have a slightly
different naming convention. You are not limited to four physical devices with these
interfaces.

 First SATA/SCSI drive (/dev/sda)


 Second SATA/SCSI drive (/dev/sdb)
 Third SATA/SCSI drive (/dev/sdc)
 Fourth SATA/SCSI drive (/dev/sdd)

Step 4: Partitioning
When using MBR format rather than GPT to set up your drives, it is important to know that
you can only have four primary partitions or three primaries and one extended partition that
can hold multiple logical partitions. When you are working with a single hard drive, it is
known as hda or sda. Each partition you create on that drive gets a number starting with 1.
The extended or logical partition starts with 5. It does not matter which primary partition
you select to extend.

For example – the first partition on your first PATA (or IDE) drive would be /dev/hda1. The
next three will be /dev/hda2, /dev/hda3, and /dev/hda4. You can then select any of these
four partitions to “extend”. To compare this to Windows, hda1 would normally be C:, hda2,
D:, hda3, E:, and hda4, F:. When you extend a partition (create multiple virtual partitions),
they start with /dev/hda5 and continue with /dev/hda6, /dev/hda7, etc. Normally, you the
4th partition is the one that is extended.

If your drives are SATA or SCSI, the “h” in hda is replaced with “s” to make them
/dev/sda1, /dev/sda2, /dev/sda3, /dev/sda4, etc.

Linux Partitioning
Now that you have an understanding of how hard drives are partitioned, you can look at
some of the Linux partitions that are located on most Linux systems.

The following are recommendations about directories that should be on their own individual
partition and their recommended size.

 / - +4 GB
 /boot - 200 MB
 /opt - +1 GB
 /tmp - +1 GB
 /usr - 5-16 GB
 /var - 3-10 GB
 /home - 5-10 GB
 Swap - 1-1.5 times installed RAM

Examining Points:

 / - the root directory or top of the directory tree.

 /boot - where all boot related files are located.

 /opt - stores all software and add-on packages that are installed after the default
installation.

 /tmp - where information that is only needed for a short time is kept. Do not store
data here, because it is automatically cleared out periodically.

 /usr - where all user applications are stored. This usually ends up being a very large
directory, so provide a lot of space here.

 /var - where the system writes data while it is operational - cache, logs, spool,
locks, etc. Data in this directory is specific to each computer and is never shared with
other hosts on a network.
 /home - where all users' home directories are placed. Give it lots of space.

 swap - space used the same in Linux as in Windows. It holds information that had
been stored in RAM until it is needed and is placed back in RAM. This is also called
virtual memory. This area should be 1 to 1 1/2 times the size of the installed RAM.

The following directories are required to be on the same partition in order for Linux to work
properly.

Examining Points:

 /etc - contains all the configuration files for your Linux system.

 /bin - is where binary files are located - images, sound, executable programs, and
compressed data.

 /sbin - contains programs most commonly run as the root user - sysadmin tools.

 /lib - holds kernel modules and shared library images. Library files usually end in .so
and are very similar to the Windows .dll files.

 /dev - contains device drivers for all devices used by your system.

 /proc - is a virtual directory where information about the current state of the kernel
can be located.

 /mnt - holds mount points. Any physical device, like a hard drive or a CD/DVD ROM
drive, has an empty directory under /mnt where the contents of the device can be
seen and used by the OS. Before a CD/DVD can be read, it has to be mounted into
its mount point or /mnt directory.

Step 5: Default Bootloader


Before proceeding with your installation, you have to decide whether to select the default
bootloader for your system or pick another one. A bootloader is a program that starts when
you boot your system, which loads the OS Kernal into RAM. You may have set up your
home PC where you can boot into Windows or another operating system. The bootloader
allows you to control what operating system is loaded. The most common ones are:

Linux Loader (LILO) (/etc/lilo.conf)

 First Linux boot loader

Grand Unified Bootloader (GRUB) (/boot/grub/grub.conf)

 Most commonly used boot loader today

File System
You have more choices in Linux than in Windows for the file system you want to use. A file
system is the format of a hard drive that holds files and directories. The four that you could
see in Linux are ext2, ext3, ext4, and reiser.
Ext2
Ext2 is the first file system that had a way of recovering if the host went down
unexpectedly. It uses a lost-and-found directory where information is saved that could help
put the system back to a steady state. The problem in this version is that even though it
can recover data, it will go through everything before it actually boots. It can take a long
time before your system will come back up. That amount of downtime is often not
acceptable.

Ext3
Ext3 is an enhancement over the ext2 and is backward compatible, but instead of the lost-
and-found directory, it uses what is called journaling. This is a technique commonly used in
databases. Every transaction is recorded, and it is marked as complete after it has been
written to the hard drive. So if a system goes down, it looks in this journal, or log, to see
what transactions were not committed to a hard drive. This saves the time of reviewing the
entire system.

Ext4
Ext4 is also an enhancement on ext3 and includes several new features, such as allowing up
to 1 exabyte of data to be stored on the partition.

Reiser
Reiser is also based on journaling, but it has a totally different file structure and provides
some different features.

Windows and Linux File Systems


It is important to take a look at the file systems currently used by Windows and Linux.

Windows
The Windows default is NTFS, and all drives must use that same file system.

Linux
With Linux, each partition can have a different file system. This is helpful when you have a
program that will not run on a newer file system. The default for Ubuntu and Fedora is
ext4.

 Ubuntu 12.10: ext4


 Fedora 13 – 17: ext4

Step 6: Additional Installation Needs


There is additional information needed to put the host on a network. You will need to know
the following:

 A host name
 An IP address and subnet mask
 A gateway IP address which is actually the router's address
 The DNS server's IP address
 Whether you have a DHCP server on your network; if you do, the previously listed
information can be dynamically assigned when the system boots, but you must know
the IP address of that server
One final consideration: What software will you need to install during installation? You will
be provided with a list of software that can be installed, but recommendations say to only
install what you know you are going to use. You can always install additional software later.

Methods of Installation
Now that you have reviewed the steps for preparing for an installation, it is time to learn
how to install Linux. The most common way to install Linux is from a CD/DVD ROM disk.
There are alternative locations from which you can install. You can have a package that is
loaded directly onto your local hard drive, you can install from an FTP server, an NSF
server, or even an HTTP web server. It depends on the configuration selected by your
company or what you have available from home.

This section of the lesson includes videos that will show you an installation of Ubuntu and of
Fedora into a virtual machine using Virtual Box by Oracle. This is a free program that allows
you to install virtual machines on Windows, Linux, and Macintosh. Additional virtual machine
software is available such as Virtual PC, Hypervisor, and VMware.

In preparation for viewing the Ubuntu installation, it is important to note that the first part
of the Ubuntu installation demonstrates how you can actually create a virtual machine. It
then continues to the installation. Just to clarify, most of the installations are done from an
.ISO, which includes all the software needed to install Linux in a compressed format. There
are several tools available (some are free) that will expand the .ISO. There is a tool called
WinISO that can be purchased for about $25 that will expand or create an .ISO. It will also
mount an .ISO as a drive on your machine. In the Ubuntu installation video, you will see
the installation is done from the G: drive. Using WinISO, an .ISO file located on my C: drive
was mounted into what the system thought was the G: drive.

View the following videos: Ubuntu Installation (5:25) and Fedora Installation (5:53).
SUMMARY
In this lesson, you learned important concepts about relating to installing Linux. Keep the
following in mind:

 Be prepared to gather facts before starting an installation. You need to know which
distributions of Linux you will need, how it will be configured, and whether your
existing hardware can be used.
 All methods for installation should be evaluated to see which fits your needs the
best.
 It is important to be prepared and follow the installation steps correctly. This will
allow for an easy Linux installation experience.

You might also like