Intricacies of GRUB Boot Loader

IDevice Icon Working with GRUB (Grand Unified Boot Loader)

 

 

 

 

3.1 GRUB Installation

 

If GRUB is not installed:

tar -xzvf grub-.tar.gz

cd grub-

./configure

make

make install

 


 

3.2 GRUB single user mode

To hack the root password, we need to enter into single user mode:

Press ‘e’ to the grub table

Press ‘e’ again in the middle of the line

enter ‘1’ or single at last for example

….ro root=LABEL=/ 1

Then press ‘b’

3.3 GRUB Password

To set password to GRUB bootloader

To enable grub, type $grub-install /dev/sda : grub-install will load grub as a default boot loader

$grub-md5-crypt >> /etc/grub.conf

Then type and retype the password

Edit vi/etc/grub.conf

Enter password - -md5

Remove password and retype - at the end of the file.

3.4 Rescue Floppy

mkbootdisk

This will create boot disk, which we can use it as a rescue floppy. boot.msg, initrd.img, ldlinux.sys, syslinux.cfg and vmlinux files are copied into the floppy.

This floppy is useful, If we have problem in the

MBR

boot loader password

3.5 Hands-on:

Change the root password through a single user mode in GRUB

Set password for the

Grub boot loader

overcome the password and enter into a single user mode through rescue floppy

3.6 Reference:

  1. http://www.troubleshooters.com/linux/grub/grub.htm
  2. http://www.linuxjournal.com/article/4622
  3. http://www.dedoimedo.com/computers/grub.html