You are on page 1of 3

GRUB in a nutshell

When the server is powered on, the server’s BIOS finds the primary bootable device and loads the initial
bootstrap program from the master boot record (MBR), then transfers control to Grub Stage 1. Stage 1
resides in the MBR and because it is very small code, it basically loads the next Stage from a defined
location on the disk within the first 1024 cylinders.

Stage 1 can load Stage 2 directly, but it’s normally set up to load Stage 1.5. Grub Stage 1.5 is located in
the first 30 kilobytes of hard disk immediately following the MBR and before the first partition. Stage 1.5
can contain any drivers needed and it then loads Stage 2. Stage 2 will then load the default configuration
file and any other modules needed. These files are located on a SLES server in the /boot/grub/ directory.

Once Grub has loaded, it normally presents a graphical interface where you can select which kernel to
load. There are other options that can be configured, but we’ll stick with the SLES defaults here.

Grub then loads the kernel into memory and passes control to that kernel.

Command to find grub

Update GRUB

Finding kernel version

Downloading latest stable Kernel code from kernel.org

Navigate to directory where you download the kernel

Now extract source code


Install required packages

The command we used above installs the following packages:

Package Package description

git
Tracks and makes a record of all changes during development in the
source code. It also allows reverting the changes.

fakeroot Packaging tool that makes the fake root environment.

build-essential Installs development tools such as C, C++, gcc, and g++.

ncurses-dev Programming library that provides API for the text-based terminals.

xz-utils Provides fast file compression and decompression.

libssl-dev
Supports SSL and TSL that encrypt data and make the internet
connection secure.

A mathematical scripting language that supports the interactive


bc (Basic Calculator)
execution of statements.

flex (Fast Lexical


Generates lexical analyzers that convert characters into tokens.
Analyzer Generator)

libelf-dev
Issues a shared library for managing ELF files (executable files, core
dumps and object code)
bison
GNU parser generator that converts grammar description to a C
program.

Copy the existing configuration file using the cp command

Compile

Restart

New version

You might also like