Showing posts with label boot manager. Show all posts
Showing posts with label boot manager. Show all posts

Tuesday, May 28, 2013

GRUB ( The Grub bootloader )

GRUB stands for GRand Unified Bootloader. It's meant as a alternative to the widely-used LILO (LInux LOader). In many ways, it is superior to LILO. One such advantage of GRUB is that if the configuration file is incorrect or corrupted, you may still be able to boot your system. It does require a basic familiarity with using GRUB in Interactive mode.



Few methods to deal with GRUB Issues :


To restore Grub to the MBR:

$ su
< password >
# grub-install /dev/hda

To setup Grub or add new entries:

Note:

Grub uses its own naming structure for drives and partitions, in the form of (hdn,m), where n is the hard drive number, and m the partition number, both starting from zero. This means, for instance, that partition hda1 is (hd0,0) to Grub, and hdb2 is (hd1,1). Grub doesn't consider CD-ROM drives to be hard drives, so if you have a CD on hdb, for example, and a second hard drive on hdc, that second hard drive would still be (hd1).

Note that GRUB does _not_ distinguish IDE from SCSI - it simply counts the drive numbers from zero, regardless of their type. Normally, any IDE drive number is less than any SCSI drive number, although that is not true if you change the boot sequence by swapping IDE and SCSI drives in your BIOS.


Setup Grub:

# grub

First, tell Grub where to find the 'stage files' -- you can use Tab to show the alternatives: ( in this example hda4 )

root (hd0,3)

Now tell Grub to install into the MBR of hda:

setup (hd0)

And close with:

quit

Make or adapt the menu.lst: ( And new entries )

# vi /boot/grub/menu.lst

# Begin /boot/grub/menu.lst

# By default boot the first menu entry.

default 0

# Allow 30 seconds before booting the default.

timeout 30

# Use prettier colors.

color green/black light-green/black

# The first entry is for Linux.

title Linux
root (hd0,3)
kernel /boot/vmlinuz root=/dev/hda4 ro

# If you want, a second entry for RedHat

title RedHat
root (hd0,2)
kernel /boot/kernel-2.4.20 root=/dev/hda3 ro
initrd /boot/initrd-2.4.20

# You wish to include Windows ?

title Windows
rootnoverify (hd0,0)
chainloader +1

Emergency

If things go really wrong and you get only a grub prompt you can still boot . . . .

For Windows:

grub> root noverify (hd0,0)
grub> chainloader +1
grub> boot

For Linux ( on hda4 like in example above ):

grub> root (hd0,3)
grub> kernel /boot/vmlinuz root=/dev/hda4 ro
grub> boot



Sunday, February 27, 2011

Older computers that can't boot from usb - The howto guide

Before the actual technique, some details...

Most of the older computers cant boot from usb (pen drives or memory cards, ext hdd) because of the bios (basic input output system) limitations. This is because the older bios do not contain the usb drivers. So at the time of booting the usb drives are not recognized.

Generally, drivers are automatically loaded during boot process from 4 sources -
From bios itself
From addon cards or daughter cards (if additional bios is present)
From system disk or hard disk where we additionally install it after os installation
From os itself (win 7 itself has most of drivers)

If any device attached to computer requires driver, which is not present, will not work properly
So in this case the usb device do not get drivers from old bios and if you have to boot it then you have to provide it all the required usb drivers from some other source.

The easy and simple method to do this is to use the plop boot cd which contains required usb drivers for boot process to complete.

The technique -
Download plpbt-5.0.11-2.zip  from http://www.plop.at/en/bootmanager.html

Extract it to get the iso file plpbt.iso (can extract using 7zip http://www.7-zip.org/download.html )
Then burn iso file using any cd/dvd burning software like nero. This will be a bootable cd.

Now attach the usb device (containing any kind of  os for installation purpose or live environment) to the usb port of the computer (that doesn't support usb booting) and then boot it  from cd you just created.

Nearly every older pc bios contains cd drivers so cd booting in older pc is not a problem.

After booting from cd you will get a screen that shows the plop boot manager.
Then you will get a menu that has some options to choose from. There you have to choose the usb option.
When you select the usb option there, the usb drivers will be automatically loaded for bios and the usb device will get detected by bios. After that the usb device will start booting. then you can eject the tray and take out the cd. This will not effect the usb boot process.

The plop boot manager do not permanently change or modify the bios. It is a temporary process. That means in future if you have to boot from usb  device again then you have to repeat the whole process.

If the usb device do not boot with this process the check the device itself. May be the pendrive itself is not bootable or there something wrong in the os that is inside the usb.
In that case again prepare your pendrive properly and try again.

You can mail me to abhi.82@aol.in

Please  post any  suggestions or comments.