SlideShare a Scribd company logo
Linux Basics - 1/2
claudio@enealcubo.com
Jul 2013
Saturday, July 27, 13
Linux
Is a Unix-like operating system (OS) created
by Linus Torvalds. He developed Linux
because he wasn't happy with the currently
available options in Unix and felt he could
improve it. So he did what anybody else
would do, and created his own operating
system.
Saturday, July 27, 13
Linux
When Linus finished building a working
version of Linux, he freely distributed the
OS, which helped it gain popularity.Today,
Linux is used by millions of people around
the world. Many computer hobbyists (a.k.a.
nerds) like the operating system because it is
highly customizable. Programmers can even
modify the source code and create their own
unique version of the Linux operating system.
Saturday, July 27, 13
Kernel
In computing, the kernel is a computer program that
manages input/output requests from software, and
translates them into data processing instructions for the
central processing unit and other electronic components
of a computer.The kernel is a fundamental part of a
modern computer's operating system.
Saturday, July 27, 13
Linux Kernel
The Linux kernel is the operating system kernel used by
the Linux family of Unix-like operating systems. It is a
prominent example of free and open source software.
The Linux kernel is released under the GNU General
Public License version 2 (GPLv2)(plus some firmware
images with various non-free licenses), and is developed by
contributors worldwide.
https://www.kernel.org/
3.10.3 stable version
Saturday, July 27, 13
Linux Distros
A Linux distribution (often called distro for
short) is a member of the family of Unix-like
operating systems built on top of the Linux
kernel. Such distributions are operating
systems including a large collection of
software applications such as word
processors, spreadsheets, media players, and
database applications.
Saturday, July 27, 13
Linux Distros
Popular main distros
• Debian
• RedHat
• Suse
• Gentoo
• Slackware*
Saturday, July 27, 13
Linux Distros
Popular child distros
• Ubuntu (Debian based)
• Fedora (RedHat)
• Centos (RedHat)
http://upload.wikimedia.org/wikipedia/commons/1/1b/Linux_Distribution_Timeline.svg
Saturday, July 27, 13
Which Distro?
It depends on
• Software requirements
• Team or staff knowledge
• The one that makes you happy
Saturday, July 27, 13
Uses
• Desktop
• Phones
• Tablets
• TV’s
• Servers
Saturday, July 27, 13
How it works?
1. System startup - BIOS / BootMonitor
2. Stage #1 bootloader (master boot record)
3. Stage #2 bootloader (LILO GRUB)
4. Kernel
5. Init
6. Runlevel
Saturday, July 27, 13
How it works?
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
Saturday, July 27, 13
How it works?
2. 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.
Saturday, July 27, 13
How it works?
3. 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).
• So, in simple terms GRUB just loads and executes Kernel and initrd images.
Saturday, July 27, 13
How it works?
4. 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 | grep init’ 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.
Saturday, July 27, 13
How it works?
5. 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 ‘grep initdefault /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.
Saturday, July 27, 13
How it works?
6. Runlevel
• 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/
Saturday, July 27, 13
How it works?
6. Runlevel
• 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.
Saturday, July 27, 13
How it works?
Saturday, July 27, 13
Installation Methods
• CD or DVD
• Normal
• Live
• USB installer
• Network installation
• Virtual installation (iso file)
Saturday, July 27, 13
System Requirements
Desktop
• 700Mhz processor
• 512Mb RAM
• 5Gb hard-drive space
• VGA 1024x768
• CD/DVD or USB port for installer media
• Internet access (not required but helpful)
Saturday, July 27, 13
System Requirements
Server CLI
• 300Mhz processor
• 128Mb RAM
• 1Gb hard-drive space
• VGA 640x480
• CD
Saturday, July 27, 13
Workshop
1. Internet access required.
2. Create a new virtual machine on Oracle
VirtualBox with the following settings.
1. 512Mb RAM
2. 5Gb hard disk
3. Use debian iso image
3. Star the virtual machine
Saturday, July 27, 13
Workshop
4. Choose the installation language
5. Choose the country or territory
6. Choose the locale settings
7. Choose the keymap to use
8. Type the hostname (linux-#x)
9. Type the domain name
Saturday, July 27, 13
Workshop
10.Type the root password (twice)
11.Create a new user
• Name, username and password
12.Choose the timezone
13.Chose the partition method (Guided -
entire disk)
14.Select the hard disk to use
Saturday, July 27, 13
Workshop
15.Select partition scheme (all files in one partition)
16.Finish partitioning
17.Write changes to disk
18.Choose debian mirror (Mexico)
19.Choose archive mirror (ftp.mx.debian.org)
20.Use proxy? No
21.
Saturday, July 27, 13
Installation facts
• Language?
• Locale settings?
• Territory?
• Hostname and domainame?
• Root user?
• Hard disk to use?
• Partition scheme?
• Mirror?
• Packages?
Saturday, July 27, 13
root or superuser
In computing, the superuser is a special user account used for
system administration. Depending on the operating system,
the actual name of this account might be: root, administrator,
admin or supervisor. In some cases the actual name is not
significant, rather an authorization flag in the user's profile
determines if administrative functions can be performed.
In operating systems which have the concept of a superuser, it
is generally recommended that most application work be
done using an ordinary account which does not have the
ability to make system-wide changes.
Saturday, July 27, 13
hostname
A hostname is a label that is assigned to a device
connected to a computer network and that is used
to identify the device in various forms of electronic
communication such as the World Wide Web, e-
mail or Usenet. Hostnames may be simple names
consisting of a single word or phrase.
Saturday, July 27, 13
domainame
A domain name is an identification string that
defines a realm of administrative autonomy,
authority, or control on the Internet. Domain
names are formed by the rules and procedures of
the Domain Name System (DNS).
Saturday, July 27, 13
Hard disk
• Linux identified the hard disk with a OS
resource.Typically this are the resources.
• IDE
• SCCI
Saturday, July 27, 13
Partitions
Partitions are divisions in the formatting of the hard
disk.  It’s a logical – as opposed to a physical –
division, so you can edit and manipulate them for
various purposes.  Think breaking a disk into two
configuration parts.  Partitions are really handy
because they act as a sandbox. f you have a 1 TB hard
drive partitioned into a 250 GB partition and a 750
GB partition, what you have on the latter will not
affect the other, and vice versa. You can share one of
those partitions on the network and never worry
about people accessing information on the other.
Saturday, July 27, 13
Partition Schemes
It depends on the using of the SO and the size
of the hard disk
• Desktop
• All files in one partition
• Server
• Split the data in multiple partitions
Saturday, July 27, 13
Partition Schemes
Server partition scheme
Saturday, July 27, 13
Partition types
• Foreign partitions (other SO)
• Primary partitions
• The number of partitions on an Intel-based system was limited from the very
beginning:The original partition table was installed as part of the boot sector and
held space for only four partition entries.These partitions are now called primary
partitions.
• Logical partitions
• One primary partition of a hard drive may be subpartitioned.These are logical
partitions.This effectively allows us to skirt the historical four partition limitation.
• Swap partitions
• If you have too many processes running on a machine, the kernel will try to free up
RAM by writing pages to disk.This is what swap space is for. It effectively increases
the amount of memory you have available. However, disk I/O is about a hundred
times slower than reading from and writing to RAM. Consider this emergency
memory and not extra memory.
Saturday, July 27, 13
Partition - File Systems
/ - root partition
/var - This fs contains spool directories such as those for mail and printing. In
addition, it contains the error log directory. If your machine is a server and develops
a chronic error, those msgs can fill the partition. Server computers ought to have /var
in a different partition than /.
/usr - This is where most executable binaries go. In addition, the kernel source tree
goes here, and much documentation.
/tmp - Some programs write temporary data files here. Usually, they are quite small.
However, if you run computationally intensive jobs, like science or engineering
applications, hundreds of megabytes could be required for brief periods of time. In
this case, keep /tmp in a different partition than /.
/home - This is where users home directories go. If you do not impose quotas on
your users, this ought to be in its own partition.
/boot - This is where your kernel images go. See discussion above for placement on
old systems.
Saturday, July 27, 13

More Related Content

What's hot (19)

PDF
Introduction to Ubuntu
Czarli Evangelista
 
PPTX
Introduction to Linux basic
f114n
 
PPTX
Linux basics
suniljosekerala
 
ODP
Introduction to linux
plarsen67
 
PDF
Linux introduction Class 02
Adrian Mikeliunas
 
PPTX
Linux basics
suniljosekerala
 
PDF
Introduction to Linux for bioinformatics
BITS
 
PPTX
Unix operating system basics
Sankar Suriya
 
PPT
Linux conf-admin
badamisri
 
PPTX
Unix and shell programming | Unix File System | Unix File Permission | Blocks
LOKESH KUMAR
 
PPTX
Operating systems unix
Achu dhan
 
PDF
Get to know linux - First steps with Ubuntu
Maja Kraljič
 
PPTX
Linux ppt
lincy21
 
PDF
Ubuntu – Linux Useful Commands
University of Technology
 
PPT
Introduction to Ubantu
OpenSource Technologies Pvt. Ltd.
 
PDF
Linux Presentation
nishantsri
 
ODP
What is Ubuntu - presentation
Ahmed Mamdouh
 
PDF
Module 3 Using Linux Softwares.
Tushar B Kute
 
Introduction to Ubuntu
Czarli Evangelista
 
Introduction to Linux basic
f114n
 
Linux basics
suniljosekerala
 
Introduction to linux
plarsen67
 
Linux introduction Class 02
Adrian Mikeliunas
 
Linux basics
suniljosekerala
 
Introduction to Linux for bioinformatics
BITS
 
Unix operating system basics
Sankar Suriya
 
Linux conf-admin
badamisri
 
Unix and shell programming | Unix File System | Unix File Permission | Blocks
LOKESH KUMAR
 
Operating systems unix
Achu dhan
 
Get to know linux - First steps with Ubuntu
Maja Kraljič
 
Linux ppt
lincy21
 
Ubuntu – Linux Useful Commands
University of Technology
 
Introduction to Ubantu
OpenSource Technologies Pvt. Ltd.
 
Linux Presentation
nishantsri
 
What is Ubuntu - presentation
Ahmed Mamdouh
 
Module 3 Using Linux Softwares.
Tushar B Kute
 

Viewers also liked (20)

PPTX
Linux basics
Geeta Vinnakota
 
ODP
Deepa ppt about lamp technology
Deepa
 
ODP
Linux basics
Deepa
 
PPTX
Code4vn - Linux day - linux boot process
Cường Nguyễn
 
PPTX
Boot process -test
Hari Shankar
 
ODP
Basics of boot-loader
iamumr
 
PDF
BasicGraphsWithR
Aureliano Bombarely
 
PDF
U-Boot community analysis
xulioc
 
PDF
BasicLinux
Aureliano Bombarely
 
PPT
U Boot Presentation Final
ktrefz
 
PPT
U Boot or Universal Bootloader
Satpal Parmar
 
PPTX
Linux booting process
Prashant Hegde
 
PPT
U boot porting guide for SoC
Macpaul Lin
 
PPT
Linux booting procedure
Dhaval Kaneria
 
PPTX
Linux booting Process
Gaurav Sharma
 
PPT
Linux Booting Steps
Anando Kumar Paul
 
PPTX
U-Boot presentation 2013
Wave Digitech
 
PPT
Device tree support on arm linux
Chih-Min Chao
 
PDF
Building Embedded Linux Full Tutorial for ARM
Sherif Mousa
 
PDF
Linux Porting to a Custom Board
Patrick Bellasi
 
Linux basics
Geeta Vinnakota
 
Deepa ppt about lamp technology
Deepa
 
Linux basics
Deepa
 
Code4vn - Linux day - linux boot process
Cường Nguyễn
 
Boot process -test
Hari Shankar
 
Basics of boot-loader
iamumr
 
BasicGraphsWithR
Aureliano Bombarely
 
U-Boot community analysis
xulioc
 
U Boot Presentation Final
ktrefz
 
U Boot or Universal Bootloader
Satpal Parmar
 
Linux booting process
Prashant Hegde
 
U boot porting guide for SoC
Macpaul Lin
 
Linux booting procedure
Dhaval Kaneria
 
Linux booting Process
Gaurav Sharma
 
Linux Booting Steps
Anando Kumar Paul
 
U-Boot presentation 2013
Wave Digitech
 
Device tree support on arm linux
Chih-Min Chao
 
Building Embedded Linux Full Tutorial for ARM
Sherif Mousa
 
Linux Porting to a Custom Board
Patrick Bellasi
 
Ad

Similar to Linux basics 1/2 (20)

DOC
6 stages of linux boot process
sagarpdalvi
 
PPTX
Linux booting process - Linux System Administration
Sreenatha Reddy K R
 
DOCX
6 stages of linux boot process
Hari Shankar
 
PPT
Linux Booting Procedure system and networking.ppt
ubaidullah75790
 
PPT
Linux Booting Process
Rishabh5121993
 
PPTX
introduction to computer Linux essential.pptx
musomicatherine
 
DOCX
6 stages of linux boot process
Teja Bheemanapally
 
DOCX
6 stages of linux boot process
Teja Bheemanapally
 
PPT
Intro to linux systems administration
Padam Banthia
 
PPT
Unix Administration 2
Information Technology
 
PDF
OS_lab_file.pdf
KarthickS942388
 
PDF
Linux booting procedure
Dhaval Kaneria
 
PPTX
Linux booting process!!
sourav verma
 
PDF
An Introduction To Linux
Ishan A B Ambanwela
 
PPT
Ch1 linux basics
chandranath06
 
PPTX
Linux
Teja Babu
 
PPTX
Linux Systems Programming: Ubuntu Installation and Configuration
RashidFaridChishti
 
PPTX
Introduce to linux
Shamimul Alam
 
PPTX
Linux basics
Shagun Rathore
 
PPT
redhat_by_Cbitss.ppt
VikrantSChohaan
 
6 stages of linux boot process
sagarpdalvi
 
Linux booting process - Linux System Administration
Sreenatha Reddy K R
 
6 stages of linux boot process
Hari Shankar
 
Linux Booting Procedure system and networking.ppt
ubaidullah75790
 
Linux Booting Process
Rishabh5121993
 
introduction to computer Linux essential.pptx
musomicatherine
 
6 stages of linux boot process
Teja Bheemanapally
 
6 stages of linux boot process
Teja Bheemanapally
 
Intro to linux systems administration
Padam Banthia
 
Unix Administration 2
Information Technology
 
OS_lab_file.pdf
KarthickS942388
 
Linux booting procedure
Dhaval Kaneria
 
Linux booting process!!
sourav verma
 
An Introduction To Linux
Ishan A B Ambanwela
 
Ch1 linux basics
chandranath06
 
Linux
Teja Babu
 
Linux Systems Programming: Ubuntu Installation and Configuration
RashidFaridChishti
 
Introduce to linux
Shamimul Alam
 
Linux basics
Shagun Rathore
 
redhat_by_Cbitss.ppt
VikrantSChohaan
 
Ad

Recently uploaded (20)

PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
PPTX
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
PDF
Redefining Work in the Age of AI - What to expect? How to prepare? Why it mat...
Malinda Kapuruge
 
PDF
''Taming Explosive Growth: Building Resilience in a Hyper-Scaled Financial Pl...
Fwdays
 
PPTX
Smart Factory Monitoring IIoT in Machine and Production Operations.pptx
Rejig Digital
 
PDF
Dev Dives: Accelerating agentic automation with Autopilot for Everyone
UiPathCommunity
 
PDF
How to Visualize the ​Spatio-Temporal Data Using CesiumJS​
SANGHEE SHIN
 
PDF
GDG Cloud Southlake #44: Eyal Bukchin: Tightening the Kubernetes Feedback Loo...
James Anderson
 
PPTX
The birth and death of Stars - earth and life science
rizellemarieastrolo
 
PPTX
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
PDF
DoS Attack vs DDoS Attack_ The Silent Wars of the Internet.pdf
CyberPro Magazine
 
PPTX
Reimaginando la Ciberdefensa: De Copilots a Redes de Agentes
Cristian Garcia G.
 
PDF
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
DOCX
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
PDF
Pipeline Industry IoT - Real Time Data Monitoring
Safe Software
 
PDF
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
PPTX
2025 HackRedCon Cyber Career Paths.pptx Scott Stanton
Scott Stanton
 
PDF
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
 
PDF
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
PDF
Plugging AI into everything: Model Context Protocol Simplified.pdf
Abati Adewale
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Poster...
Michele Kryston
 
New ThousandEyes Product Innovations: Cisco Live June 2025
ThousandEyes
 
Redefining Work in the Age of AI - What to expect? How to prepare? Why it mat...
Malinda Kapuruge
 
''Taming Explosive Growth: Building Resilience in a Hyper-Scaled Financial Pl...
Fwdays
 
Smart Factory Monitoring IIoT in Machine and Production Operations.pptx
Rejig Digital
 
Dev Dives: Accelerating agentic automation with Autopilot for Everyone
UiPathCommunity
 
How to Visualize the ​Spatio-Temporal Data Using CesiumJS​
SANGHEE SHIN
 
GDG Cloud Southlake #44: Eyal Bukchin: Tightening the Kubernetes Feedback Loo...
James Anderson
 
The birth and death of Stars - earth and life science
rizellemarieastrolo
 
MARTSIA: A Tool for Confidential Data Exchange via Public Blockchain - Pitch ...
Michele Kryston
 
DoS Attack vs DDoS Attack_ The Silent Wars of the Internet.pdf
CyberPro Magazine
 
Reimaginando la Ciberdefensa: De Copilots a Redes de Agentes
Cristian Garcia G.
 
Darley - FIRST Copenhagen Lightning Talk (2025-06-26) Epochalypse 2038 - Time...
treyka
 
Daily Lesson Log MATATAG ICT TEchnology 8
LOIDAALMAZAN3
 
Pipeline Industry IoT - Real Time Data Monitoring
Safe Software
 
Automating the Geo-Referencing of Historic Aerial Photography in Flanders
Safe Software
 
2025 HackRedCon Cyber Career Paths.pptx Scott Stanton
Scott Stanton
 
Java 25 and Beyond - A Roadmap of Innovations
Ana-Maria Mihalceanu
 
5 Things to Consider When Deploying AI in Your Enterprise
Safe Software
 
Plugging AI into everything: Model Context Protocol Simplified.pdf
Abati Adewale
 

Linux basics 1/2

  • 1. Linux Basics - 1/2 [email protected] Jul 2013 Saturday, July 27, 13
  • 2. Linux Is a Unix-like operating system (OS) created by Linus Torvalds. He developed Linux because he wasn't happy with the currently available options in Unix and felt he could improve it. So he did what anybody else would do, and created his own operating system. Saturday, July 27, 13
  • 3. Linux When Linus finished building a working version of Linux, he freely distributed the OS, which helped it gain popularity.Today, Linux is used by millions of people around the world. Many computer hobbyists (a.k.a. nerds) like the operating system because it is highly customizable. Programmers can even modify the source code and create their own unique version of the Linux operating system. Saturday, July 27, 13
  • 4. Kernel In computing, the kernel is a computer program that manages input/output requests from software, and translates them into data processing instructions for the central processing unit and other electronic components of a computer.The kernel is a fundamental part of a modern computer's operating system. Saturday, July 27, 13
  • 5. Linux Kernel The Linux kernel is the operating system kernel used by the Linux family of Unix-like operating systems. It is a prominent example of free and open source software. The Linux kernel is released under the GNU General Public License version 2 (GPLv2)(plus some firmware images with various non-free licenses), and is developed by contributors worldwide. https://www.kernel.org/ 3.10.3 stable version Saturday, July 27, 13
  • 6. Linux Distros A Linux distribution (often called distro for short) is a member of the family of Unix-like operating systems built on top of the Linux kernel. Such distributions are operating systems including a large collection of software applications such as word processors, spreadsheets, media players, and database applications. Saturday, July 27, 13
  • 7. Linux Distros Popular main distros • Debian • RedHat • Suse • Gentoo • Slackware* Saturday, July 27, 13
  • 8. Linux Distros Popular child distros • Ubuntu (Debian based) • Fedora (RedHat) • Centos (RedHat) http://upload.wikimedia.org/wikipedia/commons/1/1b/Linux_Distribution_Timeline.svg Saturday, July 27, 13
  • 9. Which Distro? It depends on • Software requirements • Team or staff knowledge • The one that makes you happy Saturday, July 27, 13
  • 10. Uses • Desktop • Phones • Tablets • TV’s • Servers Saturday, July 27, 13
  • 11. How it works? 1. System startup - BIOS / BootMonitor 2. Stage #1 bootloader (master boot record) 3. Stage #2 bootloader (LILO GRUB) 4. Kernel 5. Init 6. Runlevel Saturday, July 27, 13
  • 12. How it works? 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 Saturday, July 27, 13
  • 13. How it works? 2. 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. Saturday, July 27, 13
  • 14. How it works? 3. 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). • So, in simple terms GRUB just loads and executes Kernel and initrd images. Saturday, July 27, 13
  • 15. How it works? 4. 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 | grep init’ 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. Saturday, July 27, 13
  • 16. How it works? 5. 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 ‘grep initdefault /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. Saturday, July 27, 13
  • 17. How it works? 6. Runlevel • 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/ Saturday, July 27, 13
  • 18. How it works? 6. Runlevel • 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. Saturday, July 27, 13
  • 19. How it works? Saturday, July 27, 13
  • 20. Installation Methods • CD or DVD • Normal • Live • USB installer • Network installation • Virtual installation (iso file) Saturday, July 27, 13
  • 21. System Requirements Desktop • 700Mhz processor • 512Mb RAM • 5Gb hard-drive space • VGA 1024x768 • CD/DVD or USB port for installer media • Internet access (not required but helpful) Saturday, July 27, 13
  • 22. System Requirements Server CLI • 300Mhz processor • 128Mb RAM • 1Gb hard-drive space • VGA 640x480 • CD Saturday, July 27, 13
  • 23. Workshop 1. Internet access required. 2. Create a new virtual machine on Oracle VirtualBox with the following settings. 1. 512Mb RAM 2. 5Gb hard disk 3. Use debian iso image 3. Star the virtual machine Saturday, July 27, 13
  • 24. Workshop 4. Choose the installation language 5. Choose the country or territory 6. Choose the locale settings 7. Choose the keymap to use 8. Type the hostname (linux-#x) 9. Type the domain name Saturday, July 27, 13
  • 25. Workshop 10.Type the root password (twice) 11.Create a new user • Name, username and password 12.Choose the timezone 13.Chose the partition method (Guided - entire disk) 14.Select the hard disk to use Saturday, July 27, 13
  • 26. Workshop 15.Select partition scheme (all files in one partition) 16.Finish partitioning 17.Write changes to disk 18.Choose debian mirror (Mexico) 19.Choose archive mirror (ftp.mx.debian.org) 20.Use proxy? No 21. Saturday, July 27, 13
  • 27. Installation facts • Language? • Locale settings? • Territory? • Hostname and domainame? • Root user? • Hard disk to use? • Partition scheme? • Mirror? • Packages? Saturday, July 27, 13
  • 28. root or superuser In computing, the superuser is a special user account used for system administration. Depending on the operating system, the actual name of this account might be: root, administrator, admin or supervisor. In some cases the actual name is not significant, rather an authorization flag in the user's profile determines if administrative functions can be performed. In operating systems which have the concept of a superuser, it is generally recommended that most application work be done using an ordinary account which does not have the ability to make system-wide changes. Saturday, July 27, 13
  • 29. hostname A hostname is a label that is assigned to a device connected to a computer network and that is used to identify the device in various forms of electronic communication such as the World Wide Web, e- mail or Usenet. Hostnames may be simple names consisting of a single word or phrase. Saturday, July 27, 13
  • 30. domainame A domain name is an identification string that defines a realm of administrative autonomy, authority, or control on the Internet. Domain names are formed by the rules and procedures of the Domain Name System (DNS). Saturday, July 27, 13
  • 31. Hard disk • Linux identified the hard disk with a OS resource.Typically this are the resources. • IDE • SCCI Saturday, July 27, 13
  • 32. Partitions Partitions are divisions in the formatting of the hard disk.  It’s a logical – as opposed to a physical – division, so you can edit and manipulate them for various purposes.  Think breaking a disk into two configuration parts.  Partitions are really handy because they act as a sandbox. f you have a 1 TB hard drive partitioned into a 250 GB partition and a 750 GB partition, what you have on the latter will not affect the other, and vice versa. You can share one of those partitions on the network and never worry about people accessing information on the other. Saturday, July 27, 13
  • 33. Partition Schemes It depends on the using of the SO and the size of the hard disk • Desktop • All files in one partition • Server • Split the data in multiple partitions Saturday, July 27, 13
  • 34. Partition Schemes Server partition scheme Saturday, July 27, 13
  • 35. Partition types • Foreign partitions (other SO) • Primary partitions • The number of partitions on an Intel-based system was limited from the very beginning:The original partition table was installed as part of the boot sector and held space for only four partition entries.These partitions are now called primary partitions. • Logical partitions • One primary partition of a hard drive may be subpartitioned.These are logical partitions.This effectively allows us to skirt the historical four partition limitation. • Swap partitions • If you have too many processes running on a machine, the kernel will try to free up RAM by writing pages to disk.This is what swap space is for. It effectively increases the amount of memory you have available. However, disk I/O is about a hundred times slower than reading from and writing to RAM. Consider this emergency memory and not extra memory. Saturday, July 27, 13
  • 36. Partition - File Systems / - root partition /var - This fs contains spool directories such as those for mail and printing. In addition, it contains the error log directory. If your machine is a server and develops a chronic error, those msgs can fill the partition. Server computers ought to have /var in a different partition than /. /usr - This is where most executable binaries go. In addition, the kernel source tree goes here, and much documentation. /tmp - Some programs write temporary data files here. Usually, they are quite small. However, if you run computationally intensive jobs, like science or engineering applications, hundreds of megabytes could be required for brief periods of time. In this case, keep /tmp in a different partition than /. /home - This is where users home directories go. If you do not impose quotas on your users, this ought to be in its own partition. /boot - This is where your kernel images go. See discussion above for placement on old systems. Saturday, July 27, 13