
How to restore GRUB menu after Windows installation
- Boot from the CD/DVD and at the boot prompt type:
linux rescue. - Select your language and keyboard layout.
- Choose whether or not to start networking interfaces.
- Mount your partitions read/write.
- Type
chroot /mnt/sysimage to enter your Linux environment. - Type
grub-install /dev/sda or grub-install /dev/hda
- Reboot.
To add Windows entry into GRUB menu
Take a backup first
cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
Edit the file and add following line at the end of file
/boot/grub/menu.lst
#windows
title Microsoft Windows
root (hd0,0)
savedefault
makeactive
chainloader +1
A sample menu.lst file
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,1)
# kernel /vmlinuz-version ro root=/dev/mapper/vg_acerfedora-lv_root
# initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=15
splashimage=(hd0,1)/grub/splash.xpm.gz
#hiddenmenu
title Fedora (2.6.29.6-217.2.3.fc11.i686.PAE)
root (hd0,1)
kernel /vmlinuz-2.6.29.6-217.2.3.fc11.i686.PAE ro root=/dev/mapper/vg_acerfedora-lv_root quiet
initrd /initrd-2.6.29.6-217.2.3.fc11.i686.PAE.img
title WindowsVista
rootnoverify (hd0,0)
chainloader +1
Note:You can change timeout,default values by editing this file.
No comments:
Post a Comment