Monday, August 17, 2009

Changing boot parameters

Open a terminal and do the following:
Type sudo
Type vim /boot/grub/menu.1st
Press Insert key
Make necessary changes
Press Esc key
Type :wq! and press Enter key

You can change the timeout value to your preference. During bootup after that number of seconds without any key press, the default OS will be automatically booted unless the user manually chooses one at boot time.

To cange the default boot OS simply change the value in default=X. The numbers are counted from 0. For eg if the OS you want to boot by default is the third title in your menu.1st file then make the following change:
default=2

To change the names displayed for the operating systems at the boot menu simply change the title in the menu.1st file.

To comment a line in the menu.1st file, simply add a # symbol at the start of the line.

To remove an entry from boot menu, either comment or remove the lines for that particular entry from the menu.1st file. The lines to remove will include a title line and two or three option lines below it in the menu.1st file.

To add Windows entry into GRUB menu, add the following lines at the end of menu.1st file:
#windows
title Microsoft Windows
root (hd0,X) - where X is windows partition no
savedefault
makeactive
chainloader +1

P.S. Before making changes to menu.1st file it is good to backup your existing file by typing the following in a terminal:
cp /boot/grub/menu.1st /boot/grub/menu.1st_backup
In case you corrupt the boot file you can restore it by reversing the above command:
cp /boot/grub/menu.1st_backup /boot/grub/menu.1st

No comments:

Post a Comment

Few Amazing Videos!!!

Loading...