SlideShare a Scribd company logo
The ABC of LinuxThe ABC of Linux
By Peter Larsen
plarsen@famlarsen.homelinux.com
May 26th 2012 The ABC of Linux 2
AgendaAgenda
● Linux Everywhere
● Upcoming subjects
● How Linux runs on a computer
May 26th 2012 The ABC of Linux 3
The ABC of LinuxThe ABC of Linux
May 26th 2012 The ABC of Linux 4
Proposed SubjectsProposed Subjects
●Boot process
● Bios
● Grub / lilo
● Kernel
● initrd / initramfs
● init script
●Basic Linux Commands
Storage
● File systems
● LVM
● NFS
● FUSE mounts
● Loop Devices – loopback mounts
●Security
● Security Applications (??)
● User Management
● LDAP
● Authentication
May 26th 2012 The ABC of Linux 5
Proposed SubjectsProposed Subjects
●Processes
●What is a process?
●What is a thread?
●Signals
●Priority
●setuid/setgid
●Software repositories
●Yum
●apt
●RPM / DEP
●How to create/setup your own yum
repo mirror
(Fedora/RHEL/Centos)
●Graphical Subsystem
●Networking
●Virtualization
– Libvirt
– KVM
– QEMU
– Virt Manager
– RHEV?
May 26th 2012 The ABC of Linux 6
Speakers / Ideas?Speakers / Ideas?
● Set schedule
● Speakers
● Other topics / changes
May 26th 2012 The ABC of Linux 7
Let's BeginLet's Begin
May 26th 2012 The ABC of Linux 8
What is a Computer?What is a Computer?
● Hardware
– CPU
– RAM
– Devices
● Software
– Operating System
– Applications
May 26th 2012 The ABC of Linux 9
Hardware - MainboardHardware - Mainboard
● Bus
● RAM
● PCI-e devices
● BIOS chip
● Embedded devices
● CPU sockets
May 26th 2012 The ABC of Linux 10
Hardware - CPUHardware - CPU
● Core
● ALU (Arithmatic Logic Unit)
● Registers
● Cache L1/L2
● Instruction Set
● Flags
● Pipelining
● Microcode
May 26th 2012 The ABC of Linux 11
MemoryMemory
● ROM (Read Only)
– Flash (EEPROM)
● RAM (Random Access)
– Static RAM (SRAM)
– Dynamic RAM (DRAM)
– Sync DRAM (SDRAM)
– Double Data Rate SDRAM
– DDR2 RAM
May 26th 2012 The ABC of Linux 12
Putting it all togetherPutting it all together
May 26th 2012 The ABC of Linux 13
How to make it all workHow to make it all work
● Hardware by itself doesn't do anything
● CPU needs instructions
● Instructions = Software
● Programming Languages
– Assembler
– C / C++
– Java
– Perl, Python, Ruby .....
May 26th 2012 The ABC of Linux 14
Operating SystemsOperating Systems
● Layer between hardware and your software
● Contains instructions on how to manage
hardware
● Process definition
● Security
● Device definitions / interfaces
● Memory Management
May 26th 2012 The ABC of Linux 15
To the RESCUE - LinuxTo the RESCUE - Linux
● Linux is a Kernel and nothing but a kernel
● Some prefer to call it GNU/Linux
● Just a kernel isn't useful – GNU provides
the utilities (commands) that allow us to
use Linux
● Everything Open Source
● Many variants (distributions) of Linux
(Ubuntu, Fedora, Mint, ArchLinux etc.)
May 26th 2012 The ABC of Linux 16
How to Boot into LinuxHow to Boot into Linux
● Boot process
● Bios
● Master Boot Record
● Grub
● Loading the Kernel
● Initrd/initramfs
● Init-script
● runlevels
May 26th 2012 The ABC of Linux 17
Boot ProcessBoot Process
May 26th 2012 The ABC of Linux 18
The BIOSThe BIOS
1. Executes a series of tests on the computer hardware, in order to
establish which devices are present and whether they are working
properly. This phase is often called POST (Power-On Self-Test).
2. Initializes the hardware devices. This phase is crucial in modern PCI-
based architectures, since it guarantees that all hardware devices
operate without conflicts on the IRQ lines and I/O ports.
3. Searches for an operating system to boot. Actually, depending on the
BIOS setting, the procedure may try to access (in a predefined,
customizable order) the first sector (boot sector) of any floppy disk, any
hard disk, and any CD-ROM in the system.
4. As soon as a valid device is found, copies the contents of its first
sector into RAM, starting from physical address 0x7c00, then jumps into
that address and executes the code just loaded.
May 26th 2012 The ABC of Linux 19
Master Boot Record (MBR)Master Boot Record (MBR)
● The master boot record is always located at cylinder 0,
head 0, and sector 1, the first sector on the disk.
The master boot record contains the following structures:
● Partition Table: This small table contains the descriptions
of the partitions that are contained on the hard disk. There
is only room in the partition table for the information
describing four partitions.
● Master Boot Code: The master boot record contains the
small initial boot program that the BIOS loads and
executes to start the boot process. This program
eventually transfers control to the boot program stored on
whichever partition is used for booting the PC.
May 26th 2012 The ABC of Linux 20
GRUBGRUB
● A Boot Loader comes after the BIOS. It is the code,
which sits in the MBR & is responsible for loading
and transferring control to an operating system
kernel.
● Rather than consisting of a single program which
loads the operating system directly, multi-stage boot
loaders divide their functionality into a number of
smaller programs that each successively load one
another. This architecture allows a fairly primitive
boot loader, located in the MBR, to load and execute
the next stage of the boot loader, a larger and more
sophisticated boot loader.
May 26th 2012 The ABC of Linux 21
The KernelThe Kernel
● Challenge: How to
fit a several MB
kernel into a 1MB
space
● Load enough kernel
to switch to
protected mode,
then load the rest
May 26th 2012 The ABC of Linux 22
Initrd / initramfsInitrd / initramfs
● To avoid having custom kernel compiles for
every machine, initramfs contains specific
modules needed for the particular
hardware used.
● Mkinitfs / dracut creates initramfs based on
detected hardware.
May 26th 2012 The ABC of Linux 23
Init ScriptInit Script
● The program /sbin/init is the parent of all
user processes, process with the PID as 1.
Init’s job is to create other user processes
by following the instructions found in the
file /etc/inittab.
May 26th 2012 The ABC of Linux 24
RunlevelsRunlevels
● 0 = Halt
● 6 = Reboot
● 5 = Start X
● 1 = Single user mode
● 2 = Full system without X and network
● 3 = Full system without X
● 4 = Not used
May 26th 2012 The ABC of Linux 25
File systemsFile systems
● Persistent storage where kernel and other
code is loaded from during boot
● Can be on many devices: SCSI, IDE,
USB ...
● Partitions, LVM, Software Raid
● Popular file systems: ext4, xfs, bttrfs
● i-nodes and other file system internals
May 26th 2012 The ABC of Linux 26
Questions?Questions?
May 26th 2012 The ABC of Linux 27
FredLUGFredLUG
● Find us here: http://fredlug.info
● Meeting Schedule (Google Calendar):
http://tinyurl.com/c5cx7ku
● Mainling List:
http://calypso.tux.org/mailman/listinfo/fredlug
● MeetUp: http://www.meetup.com/fredlug/
● Meetings: Every Last Saturday of the
month – 9am to 11am
● COME JOIN US!

More Related Content

What's hot

Angelo Compagnucci - Upgrading buildroot based devices with swupdate
Angelo Compagnucci - Upgrading buildroot based devices with swupdateAngelo Compagnucci - Upgrading buildroot based devices with swupdate
Angelo Compagnucci - Upgrading buildroot based devices with swupdate
linuxlab_conf
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
Dhaval Kaneria
 
Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequence
Houcheng Lin
 

What's hot (20)

Linux admin course
Linux admin courseLinux admin course
Linux admin course
 
Path to Surfdroid
Path to SurfdroidPath to Surfdroid
Path to Surfdroid
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
 
Fedora 12 Introduction
Fedora 12 IntroductionFedora 12 Introduction
Fedora 12 Introduction
 
LinuxTag2012 Rear
LinuxTag2012 RearLinuxTag2012 Rear
LinuxTag2012 Rear
 
Linux installation and booting process
Linux installation and booting processLinux installation and booting process
Linux installation and booting process
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
Installing Software, Part 3: Command Line
Installing Software, Part 3: Command LineInstalling Software, Part 3: Command Line
Installing Software, Part 3: Command Line
 
Installing Software, Part 1 - Repositories
Installing Software, Part 1 - RepositoriesInstalling Software, Part 1 - Repositories
Installing Software, Part 1 - Repositories
 
Android for Embedded Linux Developers
Android for Embedded Linux DevelopersAndroid for Embedded Linux Developers
Android for Embedded Linux Developers
 
Jagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratchJagan Teki - U-boot from scratch
Jagan Teki - U-boot from scratch
 
Hacking the Linux Kernel - An Introduction
Hacking the Linux Kernel - An IntroductionHacking the Linux Kernel - An Introduction
Hacking the Linux Kernel - An Introduction
 
Trojan linux
Trojan linuxTrojan linux
Trojan linux
 
Angelo Compagnucci - Upgrading buildroot based devices with swupdate
Angelo Compagnucci - Upgrading buildroot based devices with swupdateAngelo Compagnucci - Upgrading buildroot based devices with swupdate
Angelo Compagnucci - Upgrading buildroot based devices with swupdate
 
Upgrade ux-fosdem-2015-gdhaese
Upgrade ux-fosdem-2015-gdhaeseUpgrade ux-fosdem-2015-gdhaese
Upgrade ux-fosdem-2015-gdhaese
 
Linux booting procedure
Linux booting procedureLinux booting procedure
Linux booting procedure
 
Uboot startup sequence
Uboot startup sequenceUboot startup sequence
Uboot startup sequence
 
Linux 开源操作系统发展新趋势
Linux 开源操作系统发展新趋势Linux 开源操作系统发展新趋势
Linux 开源操作系统发展新趋势
 
Disk forensics for the lazy and the smart
Disk forensics for the lazy and the smartDisk forensics for the lazy and the smart
Disk forensics for the lazy and the smart
 
Android Variants, Hacks, Tricks and Resources
Android Variants, Hacks, Tricks and ResourcesAndroid Variants, Hacks, Tricks and Resources
Android Variants, Hacks, Tricks and Resources
 

Similar to The ABC of Linux (Linux for Beginners)

01 linux-quick-start
01 linux-quick-start01 linux-quick-start
01 linux-quick-start
Nguyen Vinh
 
Android Variants, Hacks, Tricks and Resources presented at AnDevConII
Android Variants, Hacks, Tricks and Resources presented at AnDevConIIAndroid Variants, Hacks, Tricks and Resources presented at AnDevConII
Android Variants, Hacks, Tricks and Resources presented at AnDevConII
Opersys inc.
 
Leveraging Android's Linux Heritage at AnDevCon VI
Leveraging Android's Linux Heritage at AnDevCon VILeveraging Android's Linux Heritage at AnDevCon VI
Leveraging Android's Linux Heritage at AnDevCon VI
Opersys inc.
 
Leveraging Android's Linux Heritage at AnDevCon V
Leveraging Android's Linux Heritage at AnDevCon VLeveraging Android's Linux Heritage at AnDevCon V
Leveraging Android's Linux Heritage at AnDevCon V
Opersys inc.
 
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Opersys inc.
 
Leveraging Android's Linux Heritage at AnDevCon IV
Leveraging Android's Linux Heritage at AnDevCon IVLeveraging Android's Linux Heritage at AnDevCon IV
Leveraging Android's Linux Heritage at AnDevCon IV
Opersys inc.
 
Is Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VIIs Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VI
Opersys inc.
 

Similar to The ABC of Linux (Linux for Beginners) (20)

Understanding The Boot Process
Understanding The Boot ProcessUnderstanding The Boot Process
Understanding The Boot Process
 
Linux Booting Process
Linux Booting ProcessLinux Booting Process
Linux Booting Process
 
01 linux-quick-start
01 linux-quick-start01 linux-quick-start
01 linux-quick-start
 
Android Variants, Hacks, Tricks and Resources presented at AnDevConII
Android Variants, Hacks, Tricks and Resources presented at AnDevConIIAndroid Variants, Hacks, Tricks and Resources presented at AnDevConII
Android Variants, Hacks, Tricks and Resources presented at AnDevConII
 
embedded-linux-120203.pdf
embedded-linux-120203.pdfembedded-linux-120203.pdf
embedded-linux-120203.pdf
 
Linux kernel modules
Linux kernel modulesLinux kernel modules
Linux kernel modules
 
Embedded platform choices
Embedded platform choicesEmbedded platform choices
Embedded platform choices
 
Embedded Linux Basics
Embedded Linux BasicsEmbedded Linux Basics
Embedded Linux Basics
 
Leveraging Android's Linux Heritage at AnDevCon VI
Leveraging Android's Linux Heritage at AnDevCon VILeveraging Android's Linux Heritage at AnDevCon VI
Leveraging Android's Linux Heritage at AnDevCon VI
 
Leveraging Android's Linux Heritage at AnDevCon V
Leveraging Android's Linux Heritage at AnDevCon VLeveraging Android's Linux Heritage at AnDevCon V
Leveraging Android's Linux Heritage at AnDevCon V
 
Lt2013 uefisb.talk
Lt2013 uefisb.talkLt2013 uefisb.talk
Lt2013 uefisb.talk
 
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
Native Android Userspace part of the Embedded Android Workshop at Linaro Conn...
 
Linux: the first second
Linux: the first secondLinux: the first second
Linux: the first second
 
Linux Kernel Platform Development: Challenges and Insights
 Linux Kernel Platform Development: Challenges and Insights Linux Kernel Platform Development: Challenges and Insights
Linux Kernel Platform Development: Challenges and Insights
 
Up and Running with Freebsd
Up and Running with FreebsdUp and Running with Freebsd
Up and Running with Freebsd
 
An Introduction To Linux
An Introduction To LinuxAn Introduction To Linux
An Introduction To Linux
 
Leveraging Android's Linux Heritage at AnDevCon IV
Leveraging Android's Linux Heritage at AnDevCon IVLeveraging Android's Linux Heritage at AnDevCon IV
Leveraging Android's Linux Heritage at AnDevCon IV
 
Linux booting process - Linux System Administration
Linux booting process - Linux System AdministrationLinux booting process - Linux System Administration
Linux booting process - Linux System Administration
 
Android Hacks, Variants, Tricks and Resources ESC SV 2012
Android Hacks, Variants, Tricks and Resources ESC SV 2012Android Hacks, Variants, Tricks and Resources ESC SV 2012
Android Hacks, Variants, Tricks and Resources ESC SV 2012
 
Is Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VIIs Android the New Embedded Linux? at AnDevCon VI
Is Android the New Embedded Linux? at AnDevCon VI
 

More from plarsen67

Disks and-filesystems
Disks and-filesystemsDisks and-filesystems
Disks and-filesystems
plarsen67
 
Intro fredlug
Intro fredlugIntro fredlug
Intro fredlug
plarsen67
 

More from plarsen67 (17)

Containers in a Kubernetes World
Containers in a Kubernetes WorldContainers in a Kubernetes World
Containers in a Kubernetes World
 
FREDLUG - Open Broadcast Studio - OBS
FREDLUG - Open Broadcast Studio - OBSFREDLUG - Open Broadcast Studio - OBS
FREDLUG - Open Broadcast Studio - OBS
 
Bash and regular expressions
Bash and regular expressionsBash and regular expressions
Bash and regular expressions
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
Open Source - NOVALUG January 2019
Open Source  - NOVALUG January 2019Open Source  - NOVALUG January 2019
Open Source - NOVALUG January 2019
 
3d printing
3d printing3d printing
3d printing
 
Kvm and libvirt
Kvm and libvirtKvm and libvirt
Kvm and libvirt
 
JBoss Enterprise Data Services (Data Virtualization)
JBoss Enterprise Data Services (Data Virtualization)JBoss Enterprise Data Services (Data Virtualization)
JBoss Enterprise Data Services (Data Virtualization)
 
Open shift 2.x and MongoDB
Open shift 2.x and MongoDBOpen shift 2.x and MongoDB
Open shift 2.x and MongoDB
 
Fredlug networking
Fredlug networkingFredlug networking
Fredlug networking
 
Disks and-filesystems
Disks and-filesystemsDisks and-filesystems
Disks and-filesystems
 
Introduction to linux
Introduction to linuxIntroduction to linux
Introduction to linux
 
Disks and-filesystems
Disks and-filesystemsDisks and-filesystems
Disks and-filesystems
 
Intro fredlug
Intro fredlugIntro fredlug
Intro fredlug
 
Lvm and gang 2015
Lvm and gang 2015Lvm and gang 2015
Lvm and gang 2015
 
Bash and regular expressions
Bash and regular expressionsBash and regular expressions
Bash and regular expressions
 
Speed Up Development With OpenShift
Speed Up Development With OpenShiftSpeed Up Development With OpenShift
Speed Up Development With OpenShift
 

Recently uploaded

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 

Recently uploaded (20)

Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
Introduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG EvaluationIntroduction to Open Source RAG and RAG Evaluation
Introduction to Open Source RAG and RAG Evaluation
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya HalderCustom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
Custom Approval Process: A New Perspective, Pavel Hrbacek & Anindya Halder
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2UiPath Test Automation using UiPath Test Suite series, part 2
UiPath Test Automation using UiPath Test Suite series, part 2
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1UiPath Test Automation using UiPath Test Suite series, part 1
UiPath Test Automation using UiPath Test Suite series, part 1
 
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 

The ABC of Linux (Linux for Beginners)

  • 1. The ABC of LinuxThe ABC of Linux By Peter Larsen plarsen@famlarsen.homelinux.com
  • 2. May 26th 2012 The ABC of Linux 2 AgendaAgenda ● Linux Everywhere ● Upcoming subjects ● How Linux runs on a computer
  • 3. May 26th 2012 The ABC of Linux 3 The ABC of LinuxThe ABC of Linux
  • 4. May 26th 2012 The ABC of Linux 4 Proposed SubjectsProposed Subjects ●Boot process ● Bios ● Grub / lilo ● Kernel ● initrd / initramfs ● init script ●Basic Linux Commands Storage ● File systems ● LVM ● NFS ● FUSE mounts ● Loop Devices – loopback mounts ●Security ● Security Applications (??) ● User Management ● LDAP ● Authentication
  • 5. May 26th 2012 The ABC of Linux 5 Proposed SubjectsProposed Subjects ●Processes ●What is a process? ●What is a thread? ●Signals ●Priority ●setuid/setgid ●Software repositories ●Yum ●apt ●RPM / DEP ●How to create/setup your own yum repo mirror (Fedora/RHEL/Centos) ●Graphical Subsystem ●Networking ●Virtualization – Libvirt – KVM – QEMU – Virt Manager – RHEV?
  • 6. May 26th 2012 The ABC of Linux 6 Speakers / Ideas?Speakers / Ideas? ● Set schedule ● Speakers ● Other topics / changes
  • 7. May 26th 2012 The ABC of Linux 7 Let's BeginLet's Begin
  • 8. May 26th 2012 The ABC of Linux 8 What is a Computer?What is a Computer? ● Hardware – CPU – RAM – Devices ● Software – Operating System – Applications
  • 9. May 26th 2012 The ABC of Linux 9 Hardware - MainboardHardware - Mainboard ● Bus ● RAM ● PCI-e devices ● BIOS chip ● Embedded devices ● CPU sockets
  • 10. May 26th 2012 The ABC of Linux 10 Hardware - CPUHardware - CPU ● Core ● ALU (Arithmatic Logic Unit) ● Registers ● Cache L1/L2 ● Instruction Set ● Flags ● Pipelining ● Microcode
  • 11. May 26th 2012 The ABC of Linux 11 MemoryMemory ● ROM (Read Only) – Flash (EEPROM) ● RAM (Random Access) – Static RAM (SRAM) – Dynamic RAM (DRAM) – Sync DRAM (SDRAM) – Double Data Rate SDRAM – DDR2 RAM
  • 12. May 26th 2012 The ABC of Linux 12 Putting it all togetherPutting it all together
  • 13. May 26th 2012 The ABC of Linux 13 How to make it all workHow to make it all work ● Hardware by itself doesn't do anything ● CPU needs instructions ● Instructions = Software ● Programming Languages – Assembler – C / C++ – Java – Perl, Python, Ruby .....
  • 14. May 26th 2012 The ABC of Linux 14 Operating SystemsOperating Systems ● Layer between hardware and your software ● Contains instructions on how to manage hardware ● Process definition ● Security ● Device definitions / interfaces ● Memory Management
  • 15. May 26th 2012 The ABC of Linux 15 To the RESCUE - LinuxTo the RESCUE - Linux ● Linux is a Kernel and nothing but a kernel ● Some prefer to call it GNU/Linux ● Just a kernel isn't useful – GNU provides the utilities (commands) that allow us to use Linux ● Everything Open Source ● Many variants (distributions) of Linux (Ubuntu, Fedora, Mint, ArchLinux etc.)
  • 16. May 26th 2012 The ABC of Linux 16 How to Boot into LinuxHow to Boot into Linux ● Boot process ● Bios ● Master Boot Record ● Grub ● Loading the Kernel ● Initrd/initramfs ● Init-script ● runlevels
  • 17. May 26th 2012 The ABC of Linux 17 Boot ProcessBoot Process
  • 18. May 26th 2012 The ABC of Linux 18 The BIOSThe BIOS 1. Executes a series of tests on the computer hardware, in order to establish which devices are present and whether they are working properly. This phase is often called POST (Power-On Self-Test). 2. Initializes the hardware devices. This phase is crucial in modern PCI- based architectures, since it guarantees that all hardware devices operate without conflicts on the IRQ lines and I/O ports. 3. Searches for an operating system to boot. Actually, depending on the BIOS setting, the procedure may try to access (in a predefined, customizable order) the first sector (boot sector) of any floppy disk, any hard disk, and any CD-ROM in the system. 4. As soon as a valid device is found, copies the contents of its first sector into RAM, starting from physical address 0x7c00, then jumps into that address and executes the code just loaded.
  • 19. May 26th 2012 The ABC of Linux 19 Master Boot Record (MBR)Master Boot Record (MBR) ● The master boot record is always located at cylinder 0, head 0, and sector 1, the first sector on the disk. The master boot record contains the following structures: ● Partition Table: This small table contains the descriptions of the partitions that are contained on the hard disk. There is only room in the partition table for the information describing four partitions. ● Master Boot Code: The master boot record contains the small initial boot program that the BIOS loads and executes to start the boot process. This program eventually transfers control to the boot program stored on whichever partition is used for booting the PC.
  • 20. May 26th 2012 The ABC of Linux 20 GRUBGRUB ● A Boot Loader comes after the BIOS. It is the code, which sits in the MBR & is responsible for loading and transferring control to an operating system kernel. ● Rather than consisting of a single program which loads the operating system directly, multi-stage boot loaders divide their functionality into a number of smaller programs that each successively load one another. This architecture allows a fairly primitive boot loader, located in the MBR, to load and execute the next stage of the boot loader, a larger and more sophisticated boot loader.
  • 21. May 26th 2012 The ABC of Linux 21 The KernelThe Kernel ● Challenge: How to fit a several MB kernel into a 1MB space ● Load enough kernel to switch to protected mode, then load the rest
  • 22. May 26th 2012 The ABC of Linux 22 Initrd / initramfsInitrd / initramfs ● To avoid having custom kernel compiles for every machine, initramfs contains specific modules needed for the particular hardware used. ● Mkinitfs / dracut creates initramfs based on detected hardware.
  • 23. May 26th 2012 The ABC of Linux 23 Init ScriptInit Script ● The program /sbin/init is the parent of all user processes, process with the PID as 1. Init’s job is to create other user processes by following the instructions found in the file /etc/inittab.
  • 24. May 26th 2012 The ABC of Linux 24 RunlevelsRunlevels ● 0 = Halt ● 6 = Reboot ● 5 = Start X ● 1 = Single user mode ● 2 = Full system without X and network ● 3 = Full system without X ● 4 = Not used
  • 25. May 26th 2012 The ABC of Linux 25 File systemsFile systems ● Persistent storage where kernel and other code is loaded from during boot ● Can be on many devices: SCSI, IDE, USB ... ● Partitions, LVM, Software Raid ● Popular file systems: ext4, xfs, bttrfs ● i-nodes and other file system internals
  • 26. May 26th 2012 The ABC of Linux 26 Questions?Questions?
  • 27. May 26th 2012 The ABC of Linux 27 FredLUGFredLUG ● Find us here: http://fredlug.info ● Meeting Schedule (Google Calendar): http://tinyurl.com/c5cx7ku ● Mainling List: http://calypso.tux.org/mailman/listinfo/fredlug ● MeetUp: http://www.meetup.com/fredlug/ ● Meetings: Every Last Saturday of the month – 9am to 11am ● COME JOIN US!

Editor's Notes

  1. The address [0xFFFFFFF0] is mapped by the hardware to some read-only, persistent memory chip[ROM/FLASH]. The set of programs stored in ROM is traditionally called BIOS (Basic Input/Output System), since it includes several interrupt-driven low-level procedures used by some operating systems, including Microsoft’s MS-DOS, to handle the hardware devices that make up the computer. Once initialized, Linux does not make any use of BIOS but provides its own device driver for every hardware device on the computer. The BIOS plays an important role in system boot up process.