1 / 13

Booting the Linux Kernel

Booting the Linux Kernel. Dr. Michael L. Collard www.sdml.info/collard www.sdml.info/collard/linux collard@cs.kent.edu. Architecture. Core kernel Possibly with some device support built in Modules LKM (Loadable Kernel Module) – can be added/removed/replaced at run time

salome
Download Presentation

Booting the Linux Kernel

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  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

  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

  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

  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

  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

  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

  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 (!)

  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

  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

  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

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

  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

More Related