April 23, 2009

How to install grub and password on grub

* GRUB is a multiboot boot loader.

* It was derived from GRUB{GRand Unified Bootloader}, which was originally designed and implemented by Erich Stefan Boleyn.

* Briefly, boot loader is the first software program that runs when a computer starts.

* Grub is responsible for loading and transferring control to the operating system kernel software

* Grub contain six enteries:-

defaults : which os

timeout: time to display welcome screen

title: title of os

root : booting address

kernel: Os name, mode,location/address

initrd: Initial RAM drive name

> Suppose your linux box's grub got currupted or deleted, then you can install it again by follow this procedure

> Go to rescure mode

> After having shell,do:-

# chroot /mnt/sysimage <-To create MBR and enteries of grub

# grub-install /dev/sda <-- To run bootloader

# exit

# exit

>Now after reboot, if you wanna set grub password ,do as written above:--

>Login as root user

>Enter grub mode:

# grub

> Use md5crypt to encrypt password:
grub> md5crypt
Password: ******
Encrypted: $1$jxcdN0$hVHViq1aiPf8FziuGJGZp0

Copy down encrypted password:
$1$jxcdN0$hVHViq1aiPf8FziuGJGZp0

> Exit grub mode:


grub> quit

>Modify file /etc/grub.conf:

# vim /etc/grub.conf

Insert encrypted password in between "splashimage..." and "title...":
...
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
password --md5 $1$jxcdN0$hVHViq1aiPf8FziuGJGZp0
title BIZ DESK (2.4.20-8elx)

> Save edited file

No comments:

Post a Comment