Presentation is loading. Please wait.

Presentation is loading. Please wait.

Booting the Linux Kernel Dr. Michael L. Collard 1.

Similar presentations


Presentation on theme: "Booting the Linux Kernel Dr. Michael L. Collard 1."— Presentation transcript:

1 Booting the Linux Kernel Dr. Michael L. Collard www.sdml.info/collard www.sdml.info/collard/linux collard@cs.kent.edu 1

2 Architecture Core kernel – Possibly with some device support built in Modules – LKM (Loadable Kernel Module) – can be added/removed/replaced at run time – Provide device support: file system, usb, etc. Note: LKM considered “derivative works” of the kernel. Binary-only modules “taint” the kernel 2

3 initrd Modular kernel – modules added without rebooting Problem: root filesystem is on a device whose driver is a module? initrd – two stage kernel boot process – Mount temporary root filesystem (RAM disk) of essential modules, e.g., ext3, SCSI – Mount real file system 3

4 Boot Methods Single boot – Boot directly into an operating system Dual booting – Choose from 2 (or more) operating systems – Share hardware with multiple operating systems – Boot different versions of the same o.s. – Boot for specific purposes, i.e., memtest 4

5 Booting Direct boot – Hard drive, CD ROM, USB loadlin – MS-DOS program to boot Linux from DOS LILO – LInux Loader – Simple boot into multiple operating systems GRUB – GRand Unified Bootloader – GNU graphical boot loader 5

6 x86 Boot Process Boot sector – 512 byte, first sector of a hard disk – Contains partition table – May contain code to boot the o.s. MBR (Master Boot Record) – BIOS transfers control to boot loader code to start o.s. Secondary boot loader – MBR transfers to boot loader on another partition 6

7 LILO (LInux LOader) Text-based menu to select image to boot Installed in MBR (or run as secondary boot loader) Consists of: – configuration: /etc/lilo.conf – map file: /boot/map – MBR: code to choose image – lilo command: run to setup map and MBR 7

8 LILO (cont) Partitions and devices: – /dev/hda, /dev/hda1, /dev/hdb, /dev/hdb2, /dev/sda, /dev/sda1 After changing configuration file lilo.conf, must rerun lilo command (!) 8

9 GRUB GRand Unified Boot Loader GNU Project, Multiboot Specification Graphical menu Edit an entry Command interface for recovery and manual booting No need to reinstall MBR after a configuration change 9

10 GRUB Process Stage 1: MBR – Transfers control to Stage 1.5 or Stage 2 Stage 1.5: filesystem-specific code – E.g, e2fs_stage1_5, fat_stage1_5 Stage 2: main part of code – Menu, selection, start 10

11 GRUB (cont) Consists of: – GRUB directory: /boot/grub – Configuration: grub.conf, menu.lst (typically symbolic link) Partitions and Devices – hd0, (hd0, 0), (hd1, 1) – No differences between IDE and SCSI 11

12 GRUB Menu Countdown timer Keys: – Enter – to boot – e – edit command line – a – modify kernel arguments – c – command line – esc – to get back 12

13 ELILO Standard boot loader for EFI hardware EFI – replacement for BIOS – Originally developed by Intel, now managed by United EFI – UEFI version 2.1 release January, 2007 EFI is on Itanium 2, Intel motherboards (but may be in BIOS legacy mode), and Intel-based Macs 13


Download ppt "Booting the Linux Kernel Dr. Michael L. Collard 1."

Similar presentations


Ads by Google