reinstalled windows, how do i reconfigure grub?

Vaibhav Vaidya ampfp at yahoo.com
Tue Aug 30 17:24:02 UTC 2005


There's an easier way if you know a little command line stuff...
 
Boot into the ubuntu cd, at the boot prompt type linux rescue <enter>
This will search for your ubuntu install and mount it under /mnt/sysimage and give you a recovery prompt. At this prompt, do this:
 
chroot /mnt/sysimage
cd /boot/grub
vi < bootmenu.lst or similar filename >
 
In this file you should find stuff like 'title Ubuntu...' 'root (hd0,0)' 'vmlinuz' etc etc.
 
If you read the file it will tell you how to make winxp bootable...
This is how: add the following lines at the end (you need to be comfortable using vi)
title Win XP
rootnoverify (hd0,0)  
makeactive
chainloader +1
 
In the above lines, '(hd0,0)' is where your winxp is. Here I've assumed it is in first partition of your first drive. If it is in the second partition, it should be (hd0,1). check the section in the file on ubuntu, you'll know the partition ubuntu is installed in. From there you can infer what partition winxp is installed in.
 
Save the file and exit vi
 
run the following command:
grub-install /dev/hda  (If your hard drive is called hd... in the menu file)
 
type exit until it reboots. This time it should boot into grub, you might have to press Esc to get the menu. You can change the 'default' option in the menu file later if you want winxp to boot by default.
 
Note of caution: Dont do this unless you're basically familiar with linux command line, vi etc.
 
If you get it wrong, your computer might not boot. But you can always go to the ubuntu install cd and set things right...
 
--Vav

Lewis Futrell <silicon.vampire at gmail.com> wrote:


-----Original Message-----

>On Saturday, August 27, 2005 8:38 PM
>Drew asked about "reinstalled windows, how do i reconfigure grub?"
>
>
><>and now i want to reconfigure grub so that i can still use both
>operating systems. however, my machine only boots into windows now, so
>i'm kinda freaked out. how can i solve this?>>
>
>
>
>Drew: 
>
>Please post a summary of what you find about how to to
>get a Windows reinstallation to allow Linux to be booted.
>
>I will be faced with doing this from time to time. My solution
>is to create a couple Linux boot disks every time I change my 
>system. I keep one carefully dated in my box with my will,
>car titles and other important documents, and the other on my desk.
>
>Warm Regards
>
>David Teague 
>--
>Sometimes I wonder whether the world is 
>being run by smart people who are putting
>us on or by imbeciles who really mean it.
> --Mark Twain
>Clearly, it's the imbeciles. And they really mean it.
> ---DBT



I just reinstalled Windows which of course trashed GRUB. What I did to fix
the issue was to use the Ubuntu install CD, booted with the expert option,
went through all the steps up until I hit the partitioning. When I got
there, I told Ubuntu to NOT format the drives and gave them the proper mount
points. After I was finished with partitioning, I skipped down to the part
where you install Grub. Grub found the XP partition and installed itself
back to the home that it was so rudely ejected from by XP.


-- 
ubuntu-users mailing list
ubuntu-users at lists.ubuntu.com
http://lists.ubuntu.com/mailman/listinfo/ubuntu-users

		
---------------------------------
Do you Yahoo!?
 Yahoo! Mail - You care about security. So do we.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050830/1c8a74bb/attachment.html>


More information about the ubuntu-users mailing list