EXPLORING LINUX KERNEL: THE EASY WAY!



Similar documents
HTTP-FUSE PS3 Linux: an internet boot framework with kboot

NI Real-Time Hypervisor for Windows

Professional Xen Visualization

Table of Contents Introduction and System Requirements 9 Installing VMware Server 35

LSN 10 Linux Overview

Virtualization and Other Tricks.

Oracle VM Server Recovery Guide. Version 8.2

Using VMware Player. VMware Player. What Is VMware Player?

PARALLELS SERVER BARE METAL 5.0 README

System administration basics

Installing VMware Tools on Clearswift v4 Gateways

How to Install Windows on Xen TM 3.0

Computer Virtualization in Practice

Managed Backup Service - Agent for Linux Release Notes

Virtualization. Pradipta De

Virtualization. Michael Tsai 2015/06/08

BrightStor ARCserve Backup for Linux

Chapter 14 Virtual Machines

PARALLELS SERVER 4 BARE METAL README

Virtualization for Cloud Computing

II. Installing Debian Linux:

How to Restore a Linux Server Using Bare Metal Restore

Uses for Virtual Machines. Virtual Machines. There are several uses for virtual machines:

VMware Server 2.0 Essentials. Virtualization Deployment and Management

Citrix XenServer 5.6 OpenSource Xen 2.6 on RHEL 5 OpenSource Xen 3.2 on Debian 5.0(Lenny)

Date: December 2009 Version: 1.0. How Does Xen Work?

A+ Guide to Software: Managing, Maintaining, and Troubleshooting, 5e. Chapter 3 Installing Windows

Hypervisor Software and Virtual Machines. Professor Howard Burpee SMCC Computer Technology Dept.

Virtualization in Linux KVM + QEMU

Quick Deployment Step-by-step instructions to deploy Oracle Big Data Lite Virtual Machine

Load Balancing - Single Multipath Route HOWTO

Linux Overview. The Senator Patrick Leahy Center for Digital Investigation. Champlain College. Written by: Josh Lowery

ThinkServer RD540 and RD640 Operating System Installation Guide

Week Overview. Installing Linux Linux on your Desktop Virtualization Basic Linux system administration

RH033 Red Hat Linux Essentials or equivalent experience with Red Hat Linux..

Q N X S O F T W A R E D E V E L O P M E N T P L A T F O R M v Steps to Developing a QNX Program Quickstart Guide

LOCKSS on LINUX. CentOS6 Installation Manual 08/22/2013

Operating System Installation Guidelines

Virtual Computing and VMWare. Module 4

LOCKSS on LINUX. Installation Manual and the OpenBSD Transition 02/17/2011

Virtualization Technologies

Intelligent Power Protector User manual extension for Microsoft Virtual architectures: Hyper-V 6.0 Manager Hyper-V Server (R1&R2)

Module I-7410 Advanced Linux FS-11 Part1: Virtualization with KVM

Dell UPS Local Node Manager USER'S GUIDE EXTENSION FOR MICROSOFT VIRTUAL ARCHITECTURES Dellups.com

Acronis Backup & Recovery 10 Server for Linux. Update 5. Installation Guide

Accessing RCS IBM Console in Windows Using Linux Virtual Machine

Retrospect 7.7 User s Guide Addendum

Configuring Virtual Blades

Configure NFS Staging for ACS 5.x Backup on Windows and Linux

Advanced Server Virtualization: Vmware and Microsoft Platforms in the Virtual Data Center

MODULE 3 VIRTUALIZED DATA CENTER COMPUTE

Virtual Hosting & Virtual Machines

Hardware Based Virtualization Technologies. Elsie Wahlig Platform Software Architect

Embedded Linux development training 4 days session

Linux Embedded devices with PicoDebian Martin Noha

Installing the Operating System or Hypervisor

NETWORK EMULATION AND NETKIT

Example of Standard API

10 STEPS TO YOUR FIRST QNX PROGRAM. QUICKSTART GUIDE Second Edition

Hypervisors. Introduction. Introduction. Introduction. Introduction. Introduction. Credits:

USB 2.0 Flash Drive User Manual

Acronis Backup & Recovery 10 Server for Linux. Installation Guide

"EZHACK" POPULAR SMART TV DONGLE REMOTE CODE EXECUTION

Acronis Backup & Recovery 10 Server for Linux. Installation Guide

Virtualization System Vulnerability Discovery Framework. Speaker: Qinghao Tang Title:360 Marvel Team Leader

Customizing Boot Media for Linux* Direct Boot

Acronis Backup & Recovery 10 Server for Windows. Installation Guide

Virtualization. Types of Interfaces

Linux Disaster Recovery best practices with rear

Distributed Systems. Virtualization. Paul Krzyzanowski

UNIX - FILE SYSTEM BASICS

Introduction to Virtualization & KVM

TimeIPS Server. IPS256T Virtual Machine. Installation Guide

Linux Template Creation Guide. How to build your own Linux VM templates for deployment in Cloudturk.

Parallels Virtuozzo Containers 4.7 for Linux Readme

HARFORD COMMUNITY COLLEGE 401 Thomas Run Road Bel Air, MD Course Outline CIS INTRODUCTION TO UNIX

How do Users and Processes interact with the Operating System? Services for Processes. OS Structure with Services. Services for the OS Itself

PARA-VIRTUALIZATION IMPLEMENTATION IN UBUNTU WITH XEN HYPERVISOR Bachelor Thesis by: Gabriel IRO & Mehmet Batuhan ÖZCAN

Virtualization. Dr. Yingwu Zhu

A candidate following a programme of learning leading to this unit will be able to:

Deploying Windows Streaming Media Servers NLB Cluster and metasan

Acronis Backup & Recovery 10 Workstation. Installation Guide

Quick Start Guide. VYATTA, INC. Vyatta System. Title

Abstract. Microsoft Corporation Published: November 2011

Acronis Backup & Recovery 10 Server for Linux. Quick Start Guide

Embedded Software Development

Parallels Cloud Server 6.0 Readme

Outline. Outline. Why virtualization? Why not virtualize? Today s data center. Cloud computing. Virtual resource pool

Acronis Backup & Recovery 11.5

Acronis Backup & Recovery 10 Server for Windows. Installation Guide

Installation Guide. McAfee VirusScan Enterprise for Linux Software

Introduction to the NI Real-Time Hypervisor

How To Install Acronis Backup & Recovery 11.5 On A Linux Computer

Parallels Cloud Server 6.0

Installing the Operating System with Express Setup

How To Install Openstack On Ubuntu (Amd64)

How To Install Storegrid Server On Linux On A Microsoft Ubuntu 7.5 (Amd64) Or Ubuntu (Amd86) (Amd77) (Orchestra) (For Ubuntu) (Permanent) (Powerpoint

README.TXT

Virtual Systems with qemu

Transcription:

EXPLORING LINUX KERNEL: THE EASY WAY! By: Ahmed Bilal Numan 1

PROBLEM Explore linux kernel TCP/IP stack Solution Try to understand relative kernel code Available text Run kernel in virtualized environment Selected solution Develop a virtual machine using QEMU Build Linux kernel as Eclipse project Interconnect Eclipse with QEMU Run Linux kernel in debug mode to see path followed by network packet 2

Virtualization What is QEMU Linux IN THIS PRESENTATION Root File System Linux kernel Linux under QEMU Debugging Linux kernel How to do that 3

VIRTUALIZATION Separation of resources from underlying physical resources Examples Memory virtualization Partitioning the hard disk Server virtualization Hardware virtualization 4

VIRTUALIZATION Perceived from "Virtualization Overview" VMWARE white paper 5

WHY VIRTUALIZATION Resource utility optimization Testing and Development Exploration Dynamic load balancing Etc. 6

WHY VIRTUALIZATION Resource utility optimization Testing and Development Exploration Dynamic load balancing Etc. 7

HOW TO GET VIRTUALIZATION Xen Baremetal hypervisor Open source virtualization VMWare A number of virtualization products QEMU VMWare player Ware workstation 8

QEMU QEMU CPU Emulator Open source Emulation of various architectures x86, x86_64 ARM MIPS Supports large variety of devices Network cards CD-ROMs Sound cards 9

Networking features QEMU Connection to multiple virtualized instances Local host connection using NAT Use same network as the host Communication between host and guest system SMP system simulation Multiple CPUs can be virtualized to get an SMP machine Remote debugging 10

INTRODUCTION TO LINUX Robust, open source OS Applications range form servers to embedded systems Best option for research purpose Two major parts Root File system Linux kernel 11

ROOT FILE SYSTEM File system File system is hierarchy of directories Types of file system How data is organized on the disc Rules to handle the data Examples: ext2, ext3,ext4,ntfs etc. 12

ROOT FILE SYSTEM Linux file system Supports large number of file system types Everything starts from root directory Hierarchy may vary with Linux distribution or system requirement Custom file system can also be developed 13

File system hierarchy ROOT FILE SYSTEM /bin Contains binary executables Common linux commands used by all users Example: ls, ping, grep etc. 14

File system hierarchy ROOT FILE SYSTEM /boot Contains boot loader related files File system image file, grub etc. 15

File system hierarchy ROOT FILE SYSTEM /dev Contains device files It include all the devices attached to the system /dev/ram0, /dev/sda etc. 16

File system hierarchy ROOT FILE SYSTEM /home Contains directories of all the users registered to the system Two directories in this folder may not accessible to each other 17

File system hierarchy ROOT FILE SYSTEM /lib Contains libraries of binaries located in /bin or /sbin Example: libc.so.6, libasound.so.2 18

File system hierarchy ROOT FILE SYSTEM /media Contains directories for temporarily mounted removable devices Example: when USB is attached it is mounted to this directory 19

File system hierarchy LINUX FILE SYSTEM /etc Contains configuration files for all the programs Contains startup and shutdown scripts for programs 20

File system hierarchy LINUX FILE SYSTEM /sbin Named after system binaries Contains executable binaries especially for system administration Example: ifconfig, reboot, route 21

File system hierarchy ROOT FILE SYSTEM /sys It is utilized by sysfs Contains information about plugin devices such as USB 22

File system hierarchy ROOT FILE SYSTEM /tmp Contains temporary files generated by system and user File in this directory are deleted at reboot 23

File system hierarchy ROOT FILE SYSTEM /usr Contains files that can be shared across multiple machines. It is often a complete file system 24

File system hierarchy ROOT FILE SYSTEM /var Contains variable files File size varies with time Example: log files, tmp files 25

LINUX KERNEL Core of Linux Manages hardware Distributes the resources Basic components of kernel Scheduler Interrupt handler Memory management System services Network services & inter-process communication 26

User space All user level programs Limited privilege Kernel space Protected memory space LINUX KERNEL Communicates with user space using system calls and virtual file systems Has complete access to the resources Advantage Provide enhances security and stability 27

LINUX KERNEL Linux kernel development ISBN-10: 0-672-32946-8 28

Linux kernel source http://www.kernel.org/ LINUX KERNEL Linux kernel directory structure 29

LINUX KERNEL Distribution of Linux Debian SUSE Linux Gentoo Slackware Red Hat Enterprise Linux Fedore Project. 30

BOOTING THE LINUX KERNEL System startup BIOS Power on self test Checks the hardware Search for bootable device CD-ROM Disk partition USB Bootable kernel file vmlinuz 31

BOOTING THE LINUX KERNEL Booting procedure in vmlinuz Basic hardware startup Basic environment setup Kernel decompression decompress_kernel() Memory management Page tables and paging 32

BOOTING THE LINUX KERNEL Start_kernel() performs initialization of procedure Setup interrupts Load of initial-ram disk (initrd) in memory Initialization of first user space procedure(init) 33

BOOTING THE LINUX KERNEL Initial-RAM disc (initrd.img) Initial root file system 1 st step to load real file system Acts as a complete file system for embedded system Contains minimal set of directories and executable 34

LINUX UNDER QEMU Requirement to run Linux on QEMU Virtualized hardware Root file system (initrd.img) Linux kernel (bzimage of Linux kernel) Initialization of QEMU 35

LINUX UNDER QEMU BIOS in QEMU QEMU uses SeaBIOS SeaBIOS is a free BIOS implementation SeaBIOS can be used to boot emulator/hardware -kernel option allows to load bzimage of kernel -initrd option allows to load initial RAM disk 36

LINUX UNDER QEMU -append option specifies the device on which the file system is mounted root=/dev/ram rw rw gives read/write permission Flags are added to support debuging Example: -s and S -s: start servergdb -S: stops the emulator till project startup 37

LINUX KERNEL DEBUGGING Procedure of linux debugging Setup kernel source code as Eclipse project Build the project Setup emulator to run virtualized machine Connect Eclipse with emulator Setup break points in kernel source Run debug configuration. Run debug to debug the linux kernel 38

LINUX KERNEL DEBUGGING Video Demonstration 39