Compare and Contrast GRUB Legacy and GRUB 2 boot loaders


Grub is the boot loader which is using in Linux base operating systems. We can describe GRUB as some sort of software which is using in initial process met in the computer boot up. We are allowed install a new GRUB by neglecting our default boot loader. Normally Ubuntu is using GRUB as their boot loader. LILO is another boot loader which can use in Linux base operating systems. GRUB 2 is the latest version of the GRUB, and after then oldest version is named as Legacy GRUB. I describe few differences among these two versions under few topics.

• File locations
This is the main different between the Legacy GRUB and GRUB 2.

In legacy GRUB, GRUB files is located under /boot/grub/, and there is a menu.lst file that is reading during boot and which contents is displayed to the user in the GRUB menu.

But in GRUB 2 it is distributed through three core locations. There is a file grub.cfg in privies location (/boot/grub/) which replaces the menu.lst file and this is the main configuration file. Beyond that another two files are there located in two different places.

  • /etc/grub.d/GRUB scripts are contained here and those scripts create grub.cfg file when the relevant grub command is execute.
  • /etc/grub.d/ Here is the place contains grub settings. Grub scripts are looking here before create the grub.cfg file when the relevant grub command is execute.

Install/re-install GRUB

In Legacy GRUB we are opening GRUB shell by typing sudo grub as a super user. Then we can use it to install or reinstall to MBL (master boot loader) or a particular partition boot sector. But at GRUB 2 this is partially different. In this case the command is sudo grub-install. We can use this command at the BASH (SHELL) as a supper user to do the same process.


Partition numbering has been changed

So, In GRUB 2, first hard driver and first partition instance is numbering as (hd0, 1).


Replaces the geometry command.

In Legacy GRUB, there is command called geometry, is used for list down the devices as GRUB sees them on our PC. But in GRUB 2 introduce ls command for the same purpose.


GRUB Legacy uses stages is replaced

In GRUB 2 uses boot.img and core.img files for instead stage 1 and stage 2 which are using legacy GRUB. Normally Legacy GRUB has three stages, stage 1, stage 1.5 and stage 2. Stage 1.5 has been neglected here or stage 1.5 and stage 2 both are replaced with stage 2 by core.img file.


And those are some of differences which are found out by me in this session. Finally I have to say GRUB 2 is more efficient, powerful in many ways than Legacy GRUB.



Comments

Post a Comment