LPI 101 Ch04 Install a Linux System
Transcript of LPI 101 Ch04 Install a Linux System
-
8/9/2019 LPI 101 Ch04 Install a Linux System
1/38
OS
Course
SAIGONLAB
LinuxLev
el1
Chapter4
Install a Linux System
-
8/9/2019 LPI 101 Ch04 Install a Linux System
2/38
OS
Course
SAIGONLAB
LinuxLev
el1
ObjectivesObjectives
Identify the types of system, hardware, and network
setting necessary for Linux installation
Describe the need for pre-installation procedures
Describe the different types of file system: ext2, ext3,
ReiserFS, XFS and JFS
Describe the procedures for CDROM or network
installation
List and describe different types of boot loaders
List and describe system initialization, boot sequences,
and boot files
-
8/9/2019 LPI 101 Ch04 Install a Linux System
3/38
OS
Course
SAIGONLAB
LinuxLev
el1
Installation OptionsInstallation Options
You can install from local CD-ROMor across a
network
Networkinstallation will allow you to install
from a volume on a network server, a shared
CD-ROM on a remote host, or directly off
Internet using ftp or http protocols
-
8/9/2019 LPI 101 Ch04 Install a Linux System
4/38
OS
Course
SAIGONLAB
LinuxLev
el1
Type of Servers and WorkstationsType of Servers and Workstations
Application server :allows applications to be stored on
one system. Workstations can can access and run
applications remotely
Character-mode workstation : a system without a
graphical environment.
Development workstation : provides a complete set of
compilers, programming languages,
-
8/9/2019 LPI 101 Ch04 Install a Linux System
5/38
OS
Course
SAIGONLA
B
LinuxLev
el1
Type of Servers and WorkstationsType of Servers and Workstations
Internet gateway : often use by small bussinesses to get
on the Internet and host mail, web services.
LAN and Intranet server : office file and print server.
Personal workstation : a graphical environment with
multimedia capabilities.
Real-time system : provides a functionality forimplementing a real-time system.
Thin client : a system that maintains all programs on a
central server, accessible to all users
-
8/9/2019 LPI 101 Ch04 Install a Linux System
6/38
OS
Course
SAIGONLA
B
LinuxLev
el1
Identify Your HardwareIdentify Your Hardware
You will be required to identify your hardware
during the installation process. The easiest
method is to gather your system/component
documentation
-
8/9/2019 LPI 101 Ch04 Install a Linux System
7/38
OS
Course
SAIGONLA
B
LinuxLev
el1
Determine Network SettingsDetermine Network Settings
If you will be connecting to a network without DHCP, ask these
information from administrator :
IP address
Network
Gateway IP address
Name server IP address
Domain name
Hostname
If you have DHCP, these information will be provided to the
client system automatically
-
8/9/2019 LPI 101 Ch04 Install a Linux System
8/38
OS
Course
SAIGONLA
B
LinuxLev
el1
InstallingInstallingFromFromaaCD-ROMCD-ROM
Its commonly used to install Linux. Be sure to
create a boot floppy if the distribution or your
system is NOT capable of booting from a CD-
ROM
Creating a boot floppy : On Linux : use dd command
On Windows : use rawrite.exe program
-
8/9/2019 LPI 101 Ch04 Install a Linux System
9/38
OS
Course
SAIGONLA
B
LinuxLev
el1
InstallingInstallingFromFromaa NetworkNetwork
FTP: You can download a Linux distribution from the
Internet if you have network access.
NFSserver: Mount the distribution's CD-ROM on a
machine that supports ISO-9660 file systems with Rock
Ridge extensions or copy all of the CD-ROM's files into a
subdirectory tree on the NFS server.
SMBs shared volume: Mount the CD-ROM on a Windows
server that supports shared volumes.
-
8/9/2019 LPI 101 Ch04 Install a Linux System
10/38
OS
Course
SAIGONLA
B
LinuxLev
el1
GENERALGENERALINSTALLATIONINSTALLATIONSTEPSSTEPS
Install or Upgrade
Disk Partitioning
Software Choices
Hardware Configuration
System Settings
X Windows System Installation
-
8/9/2019 LPI 101 Ch04 Install a Linux System
11/38
OS
Course
SAIGONLA
B
LinuxLev
el1
Disk PartitioningDisk Partitioning
The hard disk will need to be prepared for use with Linux :
partitioningandformattingwith the desired file system type.
Disk partitioning : divide disk into separate parts, sections. It
prevents unwanted changes affecting or jeopardizing to entire
disk. It protects user disk space, improves performance,
There are three kinds of partitions :primary, extendedand
logical. There can be up to fourprimary partitions on a drive. To
get more partitions, an extendedpartition can be used that acts as
a container forlogicalpartitions.Theres only one extended
partition per drive.
-
8/9/2019 LPI 101 Ch04 Install a Linux System
12/38
OS
Course
SAIGONLA
B
LinuxLev
el1
Disk Partitioning schemaDisk Partitioning schema
With a 10GB hard disk, you can partition as follow :
/boot 50MB (Linux RedHat 7.x)
swap 256MB
/ 2GB
/home 2GB
/usr 2GB
/opt 1.5GB
/var 2GB
-
8/9/2019 LPI 101 Ch04 Install a Linux System
13/38
-
8/9/2019 LPI 101 Ch04 Install a Linux System
14/38
OS
Course
SAIGONLA
B
LinuxLev
el1
File System TypesFile System Types
Linux has the capability to support a variety of
file systems, the most popular are the ext2fs,ext3fs,ReiserFS,JFS,XFS, file systems
ext2fs : was implemented in the 2.2 kernel and
isfound on most Linux machines. While simple
and efficient, ext2fs lacks journaling features
-
8/9/2019 LPI 101 Ch04 Install a Linux System
15/38
OS
Course
SAIGONLA
B
LinuxLev
el1
File System TypesFile System Types
ext3fs : allowing files names up to 256
characters and file system sizes up to 4
terabytes, ext3fs is very similar to ext2fs
structurally: in fact, changing a ext2fs file
system to an ext3fs is not difficult. The major
addition to ext2fs in ext3fs isjournaling.Journaling reduces the disk check time to a
minimum after a crash and helps reduce the risk
of lost data
-
8/9/2019 LPI 101 Ch04 Install a Linux System
16/38
OS
Course
SAIGONLA
B
LinuxLev
el1
File System TypesFile System Types
ReiserFS: is another journaling file system as well as
a "balanced tree system. For more information, visit
website:
http://www.namesys.com/
XFS: is also a journaling file system, designed by SGI
(Silicon Graphics). It can support very large file size :
8,129 petabytes, about 8,129,000,000 gigabytes
JFS: Journaling File System, designed by IBM
-
8/9/2019 LPI 101 Ch04 Install a Linux System
17/38
OS
Course
SAIGONLA
B
LinuxLev
el1
Partitioning the Drive withPartitioning the Drive with fdiskfdisk
Its used to partition a hard disk in preparation
for a Linux installation
You must have a plan before partitioning :
number of partitions , what they will be used for,and thespace required for each partition
-
8/9/2019 LPI 101 Ch04 Install a Linux System
18/38
OS
Course
SAIGONLA
B
LinuxLev
el1
DriveDriveandandPartitionPartitionNamesNames
Drive name:
IDE : /dev/hdx(x = a,b,c,d)
SCSI : /dev/sdx(x= a,b,c,b)
Partition name :
IDE : /dev/hdxn(n=1,2,..)
SCSI : /dev/sdxn(n=1,2,..)
-
8/9/2019 LPI 101 Ch04 Install a Linux System
19/38
OS
Course
SAIGONLA
B
LinuxLev
el1
fdiskfdiskCommandsCommands
a toggle a bootable flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty MS-DOS partition table
p print the partition table
q quit without saving changes
t change a partition's system id
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
-
8/9/2019 LPI 101 Ch04 Install a Linux System
20/38
OS
Course
SAIGONLA
B
LinuxLev
el1
Partition AttributesPartition Attributes
Primary orextendedpartition (specify one as extended if
you want to add logical partitions)
Partitionnumber(begin at one, unless you are keeping an
existing partition)
General category:
Specify thefirst cylinderto be used
The last cylinderto be used, or specify the total space required by
entering the following :+nKor+nM where + is the plus symbol, n
is the number of Kilobytes or Megabytes, KisKilobytes, M is
Megabytes
-
8/9/2019 LPI 101 Ch04 Install a Linux System
21/38
OS
Course
SAIGONLA
B
LinuxLev
el1
Partition ID TypePartition ID Type
Use the t command to assign a partition ID
type to each partition that youre going to
create ext2fs : 83
swap : 82
Use l command to list all known partition ID
types
-
8/9/2019 LPI 101 Ch04 Install a Linux System
22/38
OS
Course
SAIGONLA
B
LinuxLev
el1
Other Partitioning MethodsOther Partitioning Methods
There are other disk partitioning methodsavailable such as cfdisk (which uses
interactive text menus instead of commands),
Partition Magic, and Disk Druid
-
8/9/2019 LPI 101 Ch04 Install a Linux System
23/38
OS
Course
SAIGONLA
B
LinuxLev
el1
Software ChoicesSoftware Choices
Once the disk is prepared, the desired software,or packages, must be decided on and installed.
During this point, the operating system itself is
installed on the disk as well
-
8/9/2019 LPI 101 Ch04 Install a Linux System
24/38
OS
Course
SAIGONLA
B
LinuxLev
el1
Hardware ConfigurationHardware Configuration
Basic hardware is usually configured after the
OS and the software has been installed, such as
the mouse, video card, and network card
-
8/9/2019 LPI 101 Ch04 Install a Linux System
25/38
OS
Course
SAIGONLA
B
LinuxLev
el1
X Windows System InstallationX Windows System Installation
The GUI environment, X Window System, can
be installed and configured during installation
by most distributions
-
8/9/2019 LPI 101 Ch04 Install a Linux System
26/38
OS
Course
SAIGONLA
B
LinuxLev
el1
LINUX BOOT LOADERSLINUX BOOT LOADERS
A boot loader generally allows an interface for the user to
choose OS to work between various Linux versions or other
operating systems
Boot loaders include: LILO (the Linux LOader)
GRUB (GRand Unified Bootloader)
LOADLIN (an MS-DOS boot loader)
Choose-OS (a menu-based, fully-configurable modular boot loader for
Linux)
System Commander (allows multiple OSs to be booted)
-
8/9/2019 LPI 101 Ch04 Install a Linux System
27/38
OS
Course
SAIGONLA
B
LinuxLev
el1
The 1024 Cylinder LimitThe 1024 Cylinder Limit
The boot loader uses BIOS functions to load the kernel into
memory. Some BIOS can NOT boot from a partition
containing the kernel using cylinders numbered over 1023.Abootable partition must be contained entirely within the first
1024 cylinders
If you haveLBA (Logical Block Addressing) supportenabled on both your BIOS as well as the hard drive, then
boot loaders such as GRUB and LILO can boot Linux if you
have the kernel after the 1024 cylinders
-
8/9/2019 LPI 101 Ch04 Install a Linux System
28/38
OS
Course
SAIGONLA
B
LinuxLev
el1
LILO (Linux Loader)LILO (Linux Loader)
LILO is a boot loader, only used on x86 systems,SPARC systems use SILO and Alpha systems use
MILO
How to install ?- Install LILO manually from the packet
- Let your Linux automatically install LILO
Where to install ? first 1024 logical cylinders- On a diskette
- In the boot sectorof a primary or logical Linuxpartition on thefirstharddisk
- In the Master Boot Record
-
8/9/2019 LPI 101 Ch04 Install a Linux System
29/38
OS
Course
SAIGONLA
B
LinuxLev
el1
LILO Configuration FileLILO Configuration File
[root@lpi linux-2.4]# more/etc/lilo.conftimeout=50
default=linux
boot=/dev/hda
root=/dev/hda1
message=/boot/message
image=/boot/vmlinuz-2.4.7-10label=linux
read-only
root=/dev/hda5
...
-
8/9/2019 LPI 101 Ch04 Install a Linux System
30/38
OS
Course
SAIGONLA
B
LinuxLev
el1
Using LILO to Test a New KernelUsing LILO to Test a New Kernel
Make new entry in /etc/lilo.conf for
your new kernel :
image=/boot/vmlinuz-2.4.19-16
label=My New Kernel
read-only
Run /sbin/lilo v command *
Boot with new kernel and observe
-
8/9/2019 LPI 101 Ch04 Install a Linux System
31/38
OS
Course
SAIGONLA
B
LinuxLev
el1
LILO Commands OptionsLILO Commands Options
LILO command options
/sbin/lilo -q: queries the LILO map
/sbin/lilo -R: sets default command line for next reboot
/sbin/lilo -I: reports the path name ofcurrent kernel
/sbin/lilo {-u | -U}: uninstalls LILO
See man lilo for more details
-
8/9/2019 LPI 101 Ch04 Install a Linux System
32/38
-
8/9/2019 LPI 101 Ch04 Install a Linux System
33/38
OS
Course
SAIGONLA
B
LinuxLev
el1
GRUB (GRUB (GRGRandand UUnifiednified BBootloader)ootloader)
GRUB can boot multiple OS and quickly gainingpopularity, may soon replace LILO
How to install ?
- Install GRUB manually
- Let your Linux automatically install GRUB
Where to install ? first 1024 logical cylinders
- On a diskette
- In the boot sector of a primary or logical Linuxpartition on the first harddisk
- In the Master Boot Record
You DONT need to run /sbin/grub to update theconfiguration in file /etc/grub.conf
-
8/9/2019 LPI 101 Ch04 Install a Linux System
34/38
OS
Course
SAIGONLA
B
LinuxLev
el1
LOADLINLOADLIN
Its a MS-DOS program that can launch aLinux kernel from DOS prompt.This is very
useful if you have hardware that relies on MS-
DOS driver.
-
8/9/2019 LPI 101 Ch04 Install a Linux System
35/38
OS
Course
SAIGONLA
B
LinuxLev
el1
SYSTEM INITIALIZATIONSYSTEM INITIALIZATION
1. BIOS/POST
2. MBR(LILO or GRUB)
3. Kernel+initd
4. /linuxrc on initrd (optional)5. mount root file system
6. find and execute /sbin/init (or execute init= program)
7. /etc/inittab
8. /etc/rc.d/ scritps
- rc.sysinit (Red Hat)
- the rc script
9. getty & display manager (xdm, k(3m, gdm, etc.)
-
8/9/2019 LPI 101 Ch04 Install a Linux System
36/38
OS
Course
SAIGONLA
B
LinuxLev
el1
SYSTEM INITIALIZATIONSYSTEM INITIALIZATION
Other Linux distributions do things differrently,
with particular boot sequence
The boot messages move very fast. To view
these messages after the system is up, use
dmesg command for review hardwareinitialization or view /var/log/messages
file
-
8/9/2019 LPI 101 Ch04 Install a Linux System
37/38
OS
Course
SAIGONLA
B
LinuxLev
el1
SummarySummary
Identify the types of system, hardware, and networksetting necessary for Linux installation
Describe the need for pre-installation procedures
Describe the different types of file system: ext2, ext3,
ReiserFS, XFS and JFS
Describe the procedures for CDROM or network
installation
List and describe different types of boot loaders
List and describe system initialization, boot sequences,
and boot files
-
8/9/2019 LPI 101 Ch04 Install a Linux System
38/38
OS
Course
SAIGONLA
B
LinuxLev
el1
INSTALLTIONINSTALLTION
Redhat 7.1Swap = ram x2
/boot 50MB
/ available free
Redhat AS 4 Update 3
Swap = ram x2/boot 50MB
/ available free