Bootloader / multi-boot

Slides:



Advertisements
Similar presentations
Linux Boot Loaders. ♦ Overview A boot loader is a small program that exists in the system and loads the operating system into the system’s memory at system.
Advertisements

Booting and Shuting Down WeeSan Lee. Roadmap Bootstrapping Boot Loaders Startup/Init Scripts Reboot & Shutdown Q&A.
Genesis: from raw hardware to processes System booting sequence: how does a machine come into life.
Week 8 System Initialization and X Windows. Objectives  Summarize the major steps necessary to boot a Linux system  Configure the LILO and GRUB boot.
Linux+ Guide to Linux Certification Chapter Nine System Initialization.
Linux Booting Procedure
Linux+ Guide to Linux Certification, Second Edition
Linux can be generally divided into four major components: 1. KERNEL – OS, ultimate boss The kernel is the core program that runs programs and manages.
Booting the Linux Kernel Dr. Michael L. Collard 1.
Linux+ Guide to Linux Certification, Third Edition
Hard-Disk Partitions Ref: Wikipedia. What and Why Disk partitioning –The creation of logical divisions upon a hard disk that allows one to apply operating.
Linux Installation LINUX INSTALLATION. Download LINUX Linux Installation To install Red Hat, you will need to download the ISO images (CD Images) of the.
Linux+ Guide to Linux Certification, Second Edition
CIS238/DL1 Chapter 15 Rebuilding the Linux Kernel Preparing the Source Code Locating the Source Code Installing the Source Code Read the Documentation.
Booting And Shutting Down. Bootstrapping  Bootstrapping is standard term for “starting up a computer”  During bootstrapping the kernel is loaded into.
Chapter 3 Understanding the Boot Process and Command Line.
5-9/12/2005 CPE How to format your computer and re-install Windows XP.
Managing Your Hard Disk and Operating System 23,26 March :30pm - 4:00pm.
Linux+ Guide to Linux Certification, Second Edition Chapter 3 Linux Installation and Usage.
Linux Installation Chapter II. Linux Distributions Pre-packaged, installable Linux Anyone can compile a distribution, have to inculde GPL Available for.
S.Ha.R.K. Workshop28/02/05 S.Ha.R.K. Installation HowTo Tullio Facchinetti University of Pavia - Italy.
1 Web Server Administration Chapter 3 Installing the Server.
Installing Windows XP and Windows Installing two different versions of Windows on the same machine. In this example, Windows 2000 and Windows XP.
Lesson 4-Installing Network Operating Systems. Overview Installing and configuring Novell NetWare 6.0. Installing and configuring Windows 2000 Server.
Partitioning Hard Drives. Disk Organization MBR tells layout of the disk Primary PartitionExtended Partition Logical Drives.
Linux Install. Resources Guide to Linux Installation and Administration, Nicholas Wells, Course Technology, 2000.
Installing Linux Redhat: A how to guide in installing and configuring Redhat 6.2.
Windows XP, Vista (?), 8.1 The lucky ones have an install disk. Bootable floppy from earlier Windows have limited usefulness.
CIS Lesson 3 Booting Up Systems Skills Needed The following skills are really important for getting through this lesson: Walking through a system.
NETW-240 Linux Installation Last Update Copyright Kenneth M. Chipps Ph.D. 1.
Linux+ Guide to Linux Certification, Third Edition
CompTIA Linux+ Certification
Linux+ Guide to Linux Certification Chapter Three Linux Installation and Usage.
1 Web Server Administration Chapter 3 Installing the Server.
Unix File System Internal Structures By C. Shing ITEC Dept Radford University.
Linux Booting Procedure
CIS 228 Grub Basics and Boot Security How we get there.
ULSTER COUNTY COMMUNITY COLLEGE CIS 116Linux (Part 1) Karl Wick.
Guide to Linux Installation and Administration, 2e1 Chapter 3 Installing Linux.
Guide to Linux Installation and Administration, 2e1 Chapter 8 Basic Administration Tasks.
Gene Perkins, Lassen High School Networking Academy
1 Web Server Administration Chapter 3 Installing the Server.
COSC 4750 Customizing and maintenance. Installing software Redhat/Fedora (and linux in general) has a package installer, called rpm Many programs will.
CHAPTER 8 TROUBLESHOOT LINUX SYSTEM. 8.1 Troubleshoot methodology The maintenance cycle.
Hp education services education.hp.com hp education services education.hp.com 1 HP World/Interex 2002 Linux Partitions and Boot Loaders Chris Cooper (734)
Chapter 6: Linux Filesystem Administration
Partitioning and Formatting drives The easy way, using Knoppix live CD By Carl Weisheit.
Installation Overview Lab#2 1Hanin Abdulrahman. Installing Ubuntu Linux is the process of copying operating system files from a CD, DVD, or USB flash.
Multiboot System under Windows XP – Ubuntu – Windows 7 Qiong LIN - 28 April 2012.
CIS Lesson 5 Lesson 5 New Skills Boot time GRUB edits (review) Changing BIOS boot order on a VM (review) Mounting CD ISO and floppy Image files on.
The Linux Operating System R.Bigelow. What is an Operating System An operating system is a collection of programs that manage a computer's resources.
Redhat Linux 9.0 Installation Guide Institute of Electronic Governance.
System initialization Unit objectives A.Outline steps necessary to boot a Linux system, configure LILO and GRUB boot loaders, and dual boot Linux with.
Linux Introduction Linux was developed in the early 1990’s by Linus Torvald computer science student at the University of Helsinki Linux is distributed.
Chap- 2 BOOTING & SHUTDOWN LINUX SYSTEM Created by: Asst. Prof. Ashish Shah, J.M.PATEL COLLEGE, GOREGOAN W 1.
1 COP 4343 Unix System Administration Unit 1: –Linux OS structure –Distributions –Hardware inventory –Disks and partitions –Installation steps –Boot loader.
1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com The GRUB bootloader Michael.
Day 1 Tasks How do you backup the MBR (Master Boot Record) of a hard disk? How do you backup the primary partition table of an MBR type hard disk? How.
The GRUB bootloader Michael Opdenacker Thomas Petazzoni Free Electrons
Chapter 8 Unix & Linux.
Create Rescue Disk? Windows XP, (Vista) Windows 7, 8 Windows 8.1
GRUB 2 Dave Soergel.
Guide to Linux Installation and Administration, 2e
Chapter 3 Installing Red Hat Linux
Partitioning a Hard Drive
CONFIGURING HARDWARE DEVICE & START UP PROCESS
CIS 228 Grub Basics and Boot Security
Operating System Module 1: Linux Installation
SUSE Linux Enterprise Desktop Administration
Presentation transcript:

Bootloader / multi-boot

Bootloaders Grand Unified Bootloader (GRUB) Linux Load (LILO)

GRUB Discovers boot images, kernels, and root filesystems from GRUB command shell Stores boot info in a filesystems (not the MBR) Reads filesystems and kernel executables Does not restrict user to disk geometry OS independent Store GRUB in a separate boot partition Remove and reinstall OS’s w/o having to reinstall the bootloader

GRUB and LILO Can boot non-Linux systems Chain loading Windows, OS/2, BSD, etc Chain loading Points to OS’s bootloader (ie, Windows)

MBR First 512 bytes of the first sector of the first partition on a drive Contains partition table and 1st stage bootloader 1st stage is first 445 bytes Point to 2nd stage loader Stored in /boot directory Remaining 66 bytes Partition table

Linux Limited to 63 total partitions per IDE drive SCSI drives 3 primary 4th: contains up to 60 logical partitions in a single extended partition SCSI drives Limited to 15 partitions 3 primaries 12 logicals

Scenario LILO installed, you wish to install GRUB Determine the version of grub $grub –version grub (GNU GRUB 0.94) Hard copy your partition table fdisk –l | lpr Hard copy lilo.conf Back up data Keep rescue disk handy LILO boot or Knoppix Leave LILO intact… in case Create GRUB boot diskette Install GRUB to MBR Boot the system Edit GRUB configuration file menu.lst

Scenario Create GRUB boot diskette /grub/i386-pc (can vary) could be in /usr/lib or /usr/share or… Copy stage1 and stage2 to diskette with dd command $ dd if=stage1 of=/dev/fd0 bs=512 count=1 Reboot the system (you get the GRUB screen) Find the root device grub> find /boot/grub/stage1 (hd0,0) Set the root device grub> root (hd0,0) Install GRUB to MBR grub> setup (hd0) Set the root device (again) Enter the path to the kernel and the root filesystem (in lilo.conf) MAKE SURE YOU APPEND “ro” (read only) grub> kernel /boot/vmlinuz-2.4.21 root=/dev/hda1 ro Now, boot the system grub> boot

Gotchas Linux refers to drives as hd1, hd2, etc… GRUB starts with “0” (h0, h1, etc) Both SCSI and IDEs are hd, floppies are fd Linux primary partitions 1-4 5 and up.. Extended partitions GRUB 0-3 primary 4 and up extended Identifying the root filesystem does not use GRUB’s numbering sytem grub> kernel /boot/vmlinuz-2.4.21 root=/dev/hda1 ro

Install GRUB w/o floppy Start a grub shell # grub Find the stage1 loader grub> find /boot/grub/stage1 (hd0,0) Run grub> root (hd0,0) grub> setup (hd0) grub> quit Reboot

Multi-booting Linux Standalone /boot partition Shared /home and /swap partitions Standard Fedora install (on 20Gb IDE) /dev/hda1 primary 100Mb /boot /dev/hda2 primary 2,500Mb / /dev/hda3 primary 3,000 Mb /home /dev/hda4 extended /dev/hda5 256Mb /swap Free space 14,144

Disk Druid Used to partition Delete any existing partitions Highlight ‘free space’ Click ‘new’ Mountpoint is /boot ext2, 100Mb Select ‘free space’ again ‘new’ Mountpoint is “/” ext3, 2500Mb Next /home ext3, 3000Mb Find “swap” no mountpoint, 256Mb When done, save changes using Disk Druid Continue install, using GRUB (not LILO)

QTPared Create, delete, move and resize partitions /swap /home Included on Knoppix Can be used to set up partitions even before new Linux install Can be used to make changes to partitions even if data on them /swap Performance issues, put in its own partition Shared on multiboot system /home Own partition Share between different Linux systems Not forced to restore data from backup when installing or removing systems

Adding another Linux Add additional Linux systems into logical partitions Create a GRUB boot menu entry for each After 1st Linux installed Boot install of the new Linux Partition and drive layouts Highlight “free” and select “new” 2500Mb for size (mountpoint is “/”) Select filesystem type and initialize it (/dev/hda6) Select /dev/hda3 to “Modify” Select /home and ext3, do not initialize it When done, write the partition info to disk When prompted, you should only be formatting or initialing the “/” partition Do NOT overwrite the MBR Do you want Linux to handle booting system? “NO” You want boot files installed to first sector of the root partition (/dev/hda6) Use GRUB grub> root (hd0,0) grub> kernel / boot/vmlinuz-2,4,21 root=/dev/hda6 ro grub> boot

Finding the boot parameters using GRUB As grub is booting up, hit “c” Get to the GRUB command shell grub>root (hd0, <tab> [tab completion] possible partitions identifies along with filesystem type and partition type Try them if needed… grub> root (hd0,0) Search for kernel image grub> kernel /boot/vmlinuz<tab> May report file not found grub> root (hd0,1) possible files are: vmlinuz vmlinuz-2.4.2 grub> kernel / boot/vmlinuz-2,4,21 root=/dev/hda2 ro grub> boot

Miscellaneous grub> cat /etc/shadow grub> root(hd<tab> Possible disks are: hd0 hd1 Grub can be password protected Documentation www.gnu.org/software/grub/manual/grub.html

GRUB boot menu /boot/grub/menu.lst “stanza” GRUB boot entry title Fedora 1 core root (hd0,0) kernel /boot/vmlinuz-2.4.22-1 root=/dev/hda1 ro initrd /boot/initrd-2.4.22-1.img Title: required, can be anything Each OS requires a stanza entry Initrd: ramdisk (not all Linux implementations require a ramdisk)

GRUB boot menu menu.lst (or grub.conf) Default entry Timeout entry Number of the stanza (sequential) Timeout entry How long to wait for default entry to boot splashimage defaultsaved Last image used to boot is saved as the next default

Adding Windows to a Linux system Different considerations for 95 thru ME as opposed to NT/2000/XP XP Make sure there’s enough free space and unused primary partition Hard copy the partition table Note what’s installed on each partition Install from CD Install complete Restore the GRUB to the MBR Load GRUB boot floppy grub> root (hd0,0) grub> setup (hd0) grub> reboot Boot to Linux, and make an entry for the Windows system title WindowsXP on /dev/hda4 rootnoverify (hd0,3) makeactive chainloader +1

Restore GRUB to MBR w/Knoppix If installation of Windows overwrote the MBR and GRUB with the Windows Boot Menu you can no longer boot to Linux Boot the Knoppix CD su to root and run GRUB Put GRUB onto the MBR grub> Root (hd0,0) grub> setup (hd0) grub> quit Reboot and GRUB menu appears

Password protecting GRUB # grub-md5-crypt Copy and paste the encrypted password into menu.lst before the boot stanzas password –md5 $1$riAfJ0$QTuA1S/BGqlkYHQADZejs1 Or… plaintext password can be used… password mypasswordisthis Chmod the menu.lst file if needed (root only) When booting GRUB, hit “p” and enter the password to unlock the command shell Users can still select.. Just can use command shell (**** if you forget the GRUB password, anyone can simply boot with rescue disk and edit menu.lst *****)

Assignment: Install Red Hat on box w/GRUB Install Mandriva as second Linux Install Windows XP as third system