0% found this document useful (0 votes)
2 views35 pages

Introduction to Linux

The document provides an introduction to Linux, covering its history, features, and various kernel types, including monolithic and microkernels. It discusses embedded Linux, its advantages, and hardware requirements, as well as job profiles related to Linux. Additionally, it outlines the booting sequence, init processes, and the differences between System-D and System-V.

Uploaded by

yzaki1969
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views35 pages

Introduction to Linux

The document provides an introduction to Linux, covering its history, features, and various kernel types, including monolithic and microkernels. It discusses embedded Linux, its advantages, and hardware requirements, as well as job profiles related to Linux. Additionally, it outlines the booting sequence, init processes, and the differences between System-D and System-V.

Uploaded by

yzaki1969
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

INTRODUCTION TO LINUX

Mostafa Morgan & Abdelrahman Badawy


A G E NDA
1. History of Linux.

2. Features of Linux.

3. Why is Linux?

4. Embedded Linux.

5. Hardware For Embedded Linux.

6. Main Components to build Linux.

7. Job Profiles with Linux.

8. Booting Sequence.

9. Init Process.

11/20/2024 SEITech Solutions - Public Information 2


BACK IN TIME

• PDP Series (18-bit).


• VAX Series (32-bit).
• Intel i386 (32-bit).
• IBM os360.
• Monolithic kernel.
• Exokernel.
• Hybrid kernel.
• Microkernel.

SEITech Solutions - Confidential Information 3


KERNEL TYPES

• Monolithic kernel : the entire operating system runs in kernel space, meaning all system services share
the same memory space.
• Exokernel : Applications are given direct access to hardware resources, allowing them to manage
resources and make decisions that the kernel previously made.
• Hybrid kernel: runs some services in the kernel space to reduce the performance overhead of a
traditional microkernel, while still running kernel code as servers in the user space.
• Microkernel: only the most basic services run in kernel space, and other services run in user space

SEITech Solutions - Confidential Information 4


M U LT I C S

• Multiplexed Information and Computing Service.


• First release in 1960 by (Bell Labs-General Electric-MIT).
• Rings of protection.
• File Hierarchy.
• Dynamic Linking.
• Multi-processing.
• Online reconfiguration.
• Access control list (ACL).

SEITech Solutions - Confidential Information 5


RINGS OF PROTECTION

• user instructions and privileged instructions

• Confusion Instructions such as input/output


instructions can cause difficulties if executed directly
by the user. Consider output to a shared print device

• Security Instructions such as memory management


can cause severe security problems if executed by the
user.

SEITech Solutions - Confidential Information 6


UNIX

• By ken Thompson & Dennis Richie.


• Uni-plexed Information and Computing Service.
• First release 1973.
• Open source.
• Multiuser.
• Portability.
• Shell.

SEITech Solutions - Confidential Information 7


BSD

• Berkley Software Distribution.


• By Bill Joy in 1974.
• Vim.
• Virtual Address Extension
• Networking stacks Development.
• BSD-I.

SEITech Solutions - Confidential Information 8


GNU

• Not Unix.
• By Richard Stallman in 1983.
• Started by apps for Unix kernel.
• Written from scratch but used by all operating systems

SEITech Solutions - Confidential Information 9


MINI-X

• Mini Unix.
• Created by Andrew S. Tanenbaum.
• Based on microkernel
• It supports C, C++, FORTRAN, Modula-2, Pascal, Perl, and Python.
• Used for research and teaching in Amsterdam University.

SEITech Solutions - Confidential Information 10


LINUX

• Developed by: Linus Torvalds (initially in 1991).


• Monolithic kernel.
• Highly customizable and modular.
• Used in a wide range of devices.
• Large and active development community.

SEITech Solutions - Confidential Information 11


L I N U X H I STO RY

feature Multics Unix Minix Gnu Linux


Development MIT, Bell Labs , Bell labs (Ken Andrew Tanenbaum Richard Stallman Linus Torvalds
General Electric (1960) Thompson & Dennis (1987) (1983) (1991).
Ritchie)

Purpose Early time-sharing os Simpler, Portable OS Educational OS Free Unix like system Unix – like kernel

Kernel architecture Segmentation & Monolithic Micro kernel Monolithic Monolithic


Paging

Influence Influenced unix and os Basis for most modern Inspired Linux Provides free SW tools Widely used kernel
design os designs for Unix-like systems

Current relevance Historical interest Basis for modern os Educational Gnu tools widely used Powers most of the
microkernel study in linux internet

SEITech Solutions - Confidential Information 12


Features of Linux

• Open Source: Source code is freely available and can be modified.


• Portability: Runs on various hardware platforms.
• Multi-User and Multi-Tasking: Supports multiple users and processes.
• Networking: Excellent support for networking protocols.
• Security: Strong security features and access controls.

SEITech Solutions - Confidential Information 13


WHY LINUX ?

• Cost: No licensing fees, making it cost-effective.


• Customization: Highly customizable and adaptable to different needs.
• Stability: Known for stability and reliability.
• Community: Large and active community for support and collaboration.
• Development: Extensive development tools and libraries available.

SEITech Solutions - Confidential Information 14


EMBEDDED LINUX

• Embedded Linux is the customization of Linux on an Embedded target.

• Adapting the Linux kernel and customizing the user-land libraries and utilities
to Embedded applications.

YOCTO TOOLCHAIN Bitbake

SEITech Solutions - Confidential Information 15


EMBEDDED LINUX

• Customizable and Lightweight.


• Kernel Modifications.
• Real-Time Capabilities
• Minimal User Interface.
• Power Management and Efficiency
• Software Stacks.

SEITech Solutions - Confidential Information 16


POPULAR EMBEDDED LINUX
DISTRIBUTIONS

• Yocto Project: A flexible framework to create custom Linux distributions


for embedded systems.
• Build root: A simple tool to generate embedded Linux systems quickly.
• OpenWrt: An embedded Linux distribution often used in routers and
networking devices.
• Android (based on Linux): Used in many consumer devices like
smartphones and tablets, though heavily modified for the mobile
environment.

SEITech Solutions - Confidential Information 17


A D VA N TA G E S O F E M B E D D E D L I N U X

• Open Source: Provides flexibility, cost savings, and the ability to modify and optimize the OS to the
specific needs of the application.
• Large Community and Support: Benefit from the large Linux community, with extensive
documentation, tools, and libraries.
• Scalability and Flexibility: Can be tailored to a wide range of devices, from small microcontroller-based
systems to powerful embedded applications.

SEITech Solutions - Confidential Information 18


H A R D WA R E F O R E M B E D D E D L I N U X .

• Processor Architecture
The hardware target must use a processor architecture supported by the
Linux kernel.

Common architectures include ARM, x86, MIPS, PowerPC, etc.

• Memory & Storage


For minimal, you may need around 64MB to 128MB of RAM.
For a basic graphical user interface (GUI) environment, you may need at
least 256MB to 512MB of RAM.
MMU.

SEITech Solutions - Confidential Information 19


BASIC COMPONENTS FOR LINUX

• Tool chain.
• Bootloader.
• Kernel.
• Root file system.

SEITech Solutions - Confidential Information 20


JOB PROFILES

Application Board Support


Engineer Package
( C, C++ , python Engineer
,java) (Device Drivers)
(BSP)

System Integrated
Engineer
( Buildroot , Yocto ,
OpenEmbedded)

SEITech Solutions - Confidential Information 21


BOOTING SEQUENCE
Key Components
1.Kernel:
•The core of the operating system that manages hardware and system resources.
•Customize the kernel configuration using make menuconfig or similar tools.
2.Root Filesystem:
•Contains all necessary files and directories for the system to operate.
•You can use tools like Yocto, Buildroot, or OpenEmbedded to customize the root
filesystem.
3.Device Tree Blob (DTB):
•A data structure that describes the hardware components of the system.
•Modify or create a device tree file to match your hardware configuration.
4.Bootloader:
•Responsible for loading the kernel and initiating the boot process.
•Common bootloaders include U-Boot and GRUB. Customize boot parameters as
needed.
5.User Space Applications:
•Applications and services that run-in user space.
•Include or exclude applications based on your requirements.
6.Configuration Files:
•Modify system configuration files (e.g., /etc/fstab, /etc/network/interfaces) to suit your
needs.

SEITech Solutions - Confidential Information 22


BOOTING SEQUENCE

• BIOS: Basic Input/ Output System.


• UEFI: Unified Extensible Firmware Interface.

Raw Bootloader Functions :


• Initialize HW Drivers [screen, keyboard].
• Check HW Functionality.
• Check portable devices.
• Check short circuit.
• Load MBR/GPT.

SEITech Solutions - Confidential Information 23


MBR/GPT

MBR: Master Boot Record.


is the information in the first sector of a hard disk or a removable drive.

It contains :
• Master boot routine.
• Disk partition table (DPT).
• Identification code.

GPT: GUID Partitioning Table.


is a newer standard that's slowly replacing MBR.

• It uses LBA: Logical Block Addressing.

SEITech Solutions - Confidential Information 24


MBR/GPT

SEITech Solutions - Confidential Information 25


S E C O N D S TA G E B O O T L O A D E R

GNU GRUB, rEFInd, BOOTMGR, Syslinux, NTLDR or iBoot.


1- select between os.
2- load kernel

SEITech Solutions - Confidential Information 26


Initial RAM Filesystem

initramfs (initial RAM filesystem) is an initial root filesystem that is loaded into memory during the
boot process before the actual root filesystem is mounted.

The primary purpose of initramfs is to facilitate the needs for kernel when the kernel needs to perform
certain tasks before it can fully access and mount the root filesystem.

These tasks may include:


• Loading Necessary Kernel Modules
• Filesystem Repair and Maintenance
• Root Filesystem Mounting

SEITech Solutions - Confidential Information 27


SEITech Solutions - Confidential Information 28
Mount Root FileSystem

• All files in a Linux filesystem are arranged in form of a big tree rooted at ‘/‘.These files can be
spread out on various devices based on your partition table, initially your parent directory is
mounted to this tree at ‘/‘, others can be mounted manually using GUI interface(if available) or
using mount command.

• mount command is used to mount the filesystem found on a device to big tree structure(Linux
filesystem) rooted at ‘/‘. Conversely, another command unmount can be used to detach these
devices from the Tree.

SEITech Solutions - Confidential Information 29


26.09.2022 SEITech Solutions - Confidential Information 30
Init Process (SV , SD)

System-D and System-V are both init systems used


in Linux, but they differ in the way they manage
services and processes.

SystemV uses traditional init scripts and run levels.


SystemD use unit files and targets services.

SEITech Solutions - Confidential Information 31


SYSTEM-D

SEITech Solutions - Confidential Information 32


SYSTEM-V

SEITech Solutions - Confidential Information 33


LAST THING

SEITech Solutions - Confidential Information 34


THANK YOU
QUESTIONS!

You might also like