0% found this document useful (0 votes)
7 views

Linux Notes Written From Cybrary

The document outlines the Linux boot process, which consists of four phases: Bootstrap, Bootloader, Kernel, and Initialization. It details the roles of BIOS and UEFI in the boot process, including the use of PXE for remote booting and GRUB as the bootloader. Additionally, it explains how to configure and modify GRUB and GRUB2 settings for Linux systems.

Uploaded by

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

Linux Notes Written From Cybrary

The document outlines the Linux boot process, which consists of four phases: Bootstrap, Bootloader, Kernel, and Initialization. It details the roles of BIOS and UEFI in the boot process, including the use of PXE for remote booting and GRUB as the bootloader. Additionally, it explains how to configure and modify GRUB and GRUB2 settings for Linux systems.

Uploaded by

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

Linux Notes

Linux Boot Process

1. Bootstrap Phase
2. Bootloader Phase
3. Kernal Phase
4. Initialisation Phase

Bootstrap Phase

• It is the first phase of he linux boot process (Responsible for testing and bringing hardware
up)
• The bootstrap also finds the location of the bootloader

BIOS and POST

• Basic Input/Output System (BIOS) is the legacy bootstrap program; after power on
BIOS initialises a Power-On Self Test (POST) (If POST has errors, it will display an error
OR play a series of beeps depending on motherboard) http://biocentral.com/ provides a lot
of POST info.
• Next, BIOS looks through a list of devices for bootloader code (referred to as Boot or Boot
Order in BIOS the menu) BIOS looks for a master boot record (MBR) – MBR contains the
bootloader code (phase 2)

• BIOS was deprecated; could not keep up with advancements


• Could not boot drives larger than 2.1TB
• Limited to 16-bit addressing
• Could only access 1MB of memory
• BIOS could only manage a limited number of devices

• Unified Extensible Firmware Interface (UEFI) is the replacement for BIOS


• UEFI can boot drives 2.1TB and higher
• Can operate in 32-bit or 64-bit mode with access to all devices and memory
• Configure in linux with efibootmgr

• UEFI looks for a storage device with an EFI system partition (ESP)
• ESP is a FAT32 formatted partition generally mounted at /boot/efi
• Once the ESP is found you can load an OS or load a bootloader, like GRUB
• For heavy-duty UEFI detail, see the spec

Preboot Execution Environment (PXE)

• PXE (pronounced pixie) is used to boot a server remotely


• Two requirements for PXE booting:
1. System has a network interface card (NIC) that supports PXE
2. The system has PXE enabled as boot device

• When power is applied to the system, NIC tries to obtain an IP address, then:
• The Trivial Transfer Protocol (TFTP) server is used to transfer files to the system
• The system downloads the appropriate boot image from the TFTP server’s pxelinux.cfg
directory
Boot Options

ISO

• An ISO image is a file that holds the contents (exact copy) of an optical disk such as a CD
or DVD
• Having the data in a file format rather than a CD or DVD is a more effective way or
distributing the data.
• We can access the ISO file remotely to install an operating system on a computer

ISO – Access Methods

• Remote access to an ISO can be made via HTTP, FTP


• Using FTP allows the data to be transferred bit-by-bit, and you can use Secure FTP
(SFTP) across SSH port 22
• Hypertext Transfer Protocol (HTTP) allows for connections over port 80

NFS Boot

• Another remote booting method Network File System (NFS) server


• A computer boots with a kernal image, or gets one from a TFTP server (like PXE)
• Next the system will connect to the NFS server on the network and access a root file system

Bootloader Phase: GRUB

GRUB

• GRand Unified Bootloader (GRUB) is the legacy bootloader


• The purpose of GRUB and all bootloaders is to load the linux system kernel
• GRUB operates in stages

stored on the first partition;


presents a text menu
on-screen for selecting a
bootstrap finds GRUB on the MBR, kernel image
points to Stage 1.5 or Stage 2

Stage 1 Stage 1.5 Stage 2

right after the MBR, before


the first partition; contains
file system drivers (/boot/grub)
GRUB Menu

• The GRUB menu is configured from one of two files:


• grub.conf: /boot/grub/grub.conf
• menu.lst: /boot/grub/menu.lst

• The default configuration file is:


/boot/grub/menu.lst
• Some distributions actually use /boot/grub/grub.conf
• GRUB still thinks it’s using /boot/grub/menu.lst, in reality it’s linked to
grub.conf>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

GRUB Interactive Boot

• By pressing ESC once GRUB’s splash menu appears, you can modify the boot process or
issue GRUB commands
• Use arrow keys to move between lines
• Enter to select the current line
• E key to edit the current line
• A to append text to the current line
• D to delete the current line
• C execute a GRUB shell command
• B to boot the system
• P to enter the GRUB password

GRUB2 Bootloader

• GRand Unified Bootloader – version 2 (GRUB2) is the replacement for GRUB


• Any version newer than 1.98 is considered GRUB2

• Find out what version of GRUB you’re running using one of the following commands:

• grub-install -v
• grub2-install -v

GRUB2 Menu

• GRUB2 settings are configured in two places


• /etc/default/grub controls configuration variables
• The directory /etc/grub.d contains scripts that build the GRUB boot menu

Changing GRUB2

• To make changes to GRUB2, you can edit /etc/default/grub


• You can also create a custom script in /etc/grub.d
• Once a user makes changes to GRUB2, you must execute the command grub2-
mkconfig in order for the changes to be picked up
GRUB2 Interactive Boot

• Just as with GRUB, you can press the ESC key on the splash screen to enter into an
interactive boot process
• E key to edit the current menu entry
• CTRL+X to boot the system after editing a menu entry
• TAB to list avaliable GRUB commands
• CTRL+C to enter the GRUB shell
• ESC discard edits and return to the previous screen

You might also like