Monday, July 28, 2008
Recover GRUB after reinstall windows
Boot using a Live CD or Installation CD.
mount your linux partition. Chroot, mount /proc and give the grub specific command to overwrite or update the mbr or where you want.
like my Linux root in /dev/sda4
after boot with the Live CD
#mkdir /mnt/lin (create a folder to use as a mount point)
#mount /dev/sda4 /mnt/lin
#chroot /mnt/lin
# mount /proc
#grub-install /dev/sda
or
#update-grub
the update-grub and grub-install command will work of Debian, Ubuntu and Debian based distro. If your are using other distribution. Read their grub policy and command. Here chroot will enable you to access the existing Linux system using the live CD kernel.
note: If you use normal Installation CD to recover grub then you might need to give the path known by the kernel. Like then you may need to use ../disc0/part4/ etc instead of /dev/hda6. You can find the exact path by execution a script called os-prober that generally comes with the installation CD of Debian.
Posted by salahuddin66 at 12:04 AM
Another Solution from
http://apcmag.com/how_to_dual_boot_linux_and_windows_xp_linux_installed_first.htm?page=5
How to dual-boot Windows XP and Linux. (Now updated for XP SP 3 and Ubuntu 8.04.)
Once XP has been installed, it will boot happily into XP but there's no sign of Ubuntu. To reinstate GRUB as the system bootloader it needs to be reinstalled into the MBR.
Boot the system from the Ubuntu Live CD and select "Try Ubuntu without any change to your computer".
Open a Terminal session - Applications, Accessories, Terminal
To enter the GRUB configuration mode, type in "sudo grub" and press Enter. Then type in the following commands in sequence:
- root (hd0,0) - it may be (sd0,0) for SCSI device
- setup (hd0)
- quit
- exit
Reboot the system. You'll get the GRUB bootloader but Vista won't be an option - we need to add this to the boot options.
Boot into Ubuntu and open up another Terminal session. Then, type in sudo gedit /boot/grub/menu.lst
Scroll down to the bottom of the file and type in the following text strings:
title Windows XP
root (hd0,1)
makeactive
chainloader +1
Save the file and reboot. When the GRUB loader launches hit ESC for the boot menu. Windows XP is the last option - select it and XP will load.
If you want to make the GRUB menu always available, boot back into Ubuntu and edit the MENU.LST file. Find the hiddenmenu text string and change it to #hiddenmenu.
To increase the menu timeout, change the default timeout 3 to something more appropriate.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment