Add

Thursday, 10 October 2013

Linux GRub bootloader GRub Legacy and GNU GRub

GNU GRUB 2.0 booting up and let`s beat old Legacy GRUB


I
 was thinking about next topic to put in Blog!! Recent developments in bootloader motivated to study and put in as simple as so that every Linux/non-Linux users can be able to understand without scratching/missing something.


Let’s get it from scratch! What happens when you power on your computer, BIOS (Basic Input/output system) kicks off the POST (Power-on Self-Test) performs various tests, any hardware failure during POST causes the BIOS to halt and emit beeps!!! Next step of BIOS is to check the first sector i.e 512-byte (sector zero) of your hard disk (Master Boot Record) and transferring control to hard disk, two things:  bootstrapping program (OS-specific) at the start of the MBR followed by a partition table (high level design of division of disk).




BIOS - POST operations (Detecting hardware attached b and performing Basic Checks )







Okay! GRUB - (GRand Unified Bootloader)


HISTORY: Bootloader is the most important software of all, GRUB Legacy had been successful multiboot boot loader since 1999 had become default bootloader in almost  GNU/Linux, BSD flavors with powerful graphical interface providing customized boot menu/options, boots FreeBSD, NetBSD, OpenBSD, GNU/Linux and many Proprietary OS's such as most current Windows releases and OS/2 though chain-loading concept.


GRUB2: PUPA (Preliminary Universal Programming Architecture for GNU GRUB) started aiming to rewrite the core of GRUB to make it cleaner, safer, more robust, and more powerful, later PUPA renamed in 2007 as GRUB2 is still under beta, Ubuntu supporting since version 9.10, Fedora 16 onwards and many major distributions are now installing it as default bootloader.





Understanding GRUB Legacy working first before move to GRUB2?


G
RUB Legacy gives you the options of select among multiple operating systems installed on your computer.  RUB displays a splash screen, waits for few seconds for user inputs (you can do customs here), if you don’t enter anything; it loads the default kernel image as specified in the grub configuration file.

Grub Legacy configuration file will be present in /boot/grub/grub.conf or /boot/grub/menu.lst (depending on flavor this one is from CentOS).


boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-194.el5PAE)
          root (hd0,0)
          kernel /boot/vmlinuz-2.6.18-194.el5PAE ro root=LABEL=/
          initrd /boot/initrd-2.6.18-194.el5PAE.img


kernel:  path to kernel file and with options, i.e /boot/vmlinuz-2.6.18-194.el5PAE.

initrd: Initial RAM disk (initrd is a transient file system. Its lifetime is too short, purpose to only serve as a bridge to the real root file system, prior of mounting real root file system initrd will be mounted in a RAM disk by kernel and it’s a part boot procedure, second phase modules loads real file systems available and get at the real root file system.

timeout waiting time period for user inputs before selecting default, splashimage is display image, title group-title — name title to be used for a particular group.






                                                                                      Continued…..


Thanks for reading, C&C are welcome.


2 comments: