Jump to content
xisto Community
mikesoft

Ubuntu 7.10 + Windows Xp Dual Boot how to reinstall GRUB after windows reinstall

Recommended Posts

Ok so for a long time I had my dual boot working great, windows and ubuntu. But 2 days ago my windows required a wipe and clean install because of some issues, like it usually happens after 8 months.So I reinstalled windows, well, first deleted the windows partition using the windows XP install CD. Then assigned a partition for windows (same size) and left the ubuntu and swap partition intact. But of course, windows deletes GRUB and replace it with their boot info, so now I can't boot ubuntu (I can't choose).How can I reinstall GRUB without having to reinstall ubuntu, so I don't lose all my files and settings?

Share this post


Link to post
Share on other sites

I had to deal with similar issue (reinstalling Windows XP with Ubuntu 7.10 already installed), except I didn't delete the Windows partition, just formated. The thing is, at least according to my limited "boot" knowledge, that you have probably made the old GRUB unusable, since the Windows practically isn't on the same partition any more. This, however, shouldn't prevent you from trying the method I used. Be aware that I have done this only once, so there is a slight risk when following my instructions.

 

First of all, insert the Ubuntu Live CD and boot the computer from it. After doing so, and starting Ubuntu, run the Terminal (Applications -> Accessories -> Terminal) and run the following commands.

 

CONSOLE
$ sudo grub

 

After doing so, you will start the GRUB configuration utility which will allow you to setup GRUB on a desired partition.

 

CONSOLE
grub> find /boot/grub/stage1

 

This command will output (hd*,*), the asterisks being some numbers. Now you need to run these commands (replacing the asterisks with the numbers you got):

 

CONSOLE
grub> root (hd*,*)

grub> setup (hd0)

grub> quit

 

Exit Ubuntu, remove the disk and reboot your computer. You should now get the GRUB bootloader.

 

The chances are Ubuntu will run properly, but due to the deletion of a partition, Windows might not. If that is the case, start Ubuntu and run this command in the terminal:

 

CONSOLE
$ gksu gedit /boot/grub/menu.lst

 

The file menu.lst should contain something like this:

 

# This entry automatically added by the Debian installer for a non-linux OS# on /dev/sda1title		Microsoft Windows XP Home Editionroot		(hd0,0)savedefaultmakeactivechainloader	+1

If Windows doesn't boot, the root line is wrong, and you need to replace (hd0,0) with the proper partition. Which one and how to do so? That I don't know...

Share this post


Link to post
Share on other sites

Pyost's instructions are correct. That's in the case where you lost your GRUB menu during startup. I am Quin-Booting or should we call it Penta-Booting (5) different Operating Systems in my AMD Machine, I experience a lot of times 'losing' my OSes when scrumbling more OS in a single PC, single hard drive.

Edited by rockershive (see edit history)

Share this post


Link to post
Share on other sites

Instead of the common grub-based dualboot setup, you could use a program called HyperOS. It has had support for linux since version 2004 I believe, however I think it costs money.

Share this post


Link to post
Share on other sites

error in finding grub

Ubuntu 7.10 + Windows Xp Dual Boot

 

I ran the sudo grub command. Ok

Grub> find /boot/grub/stage1 says file not found.

Pl. Advice

 

-question by syed

Share this post


Link to post
Share on other sites
dual boot win reinstallUbuntu 7.10 + Windows Xp Dual Boot

my laptop is dual boot with win sp2 + kubuntu 8.04

after reinstall windows kubuntu don't boot and in live session partitioner can't detect any partition from hda  windows have ntfs but I can mount drives in live session through menu>places>computer

I have 120 toshiba sata hd0

-question by devendra

Share this post


Link to post
Share on other sites

dual boot win reinstall

Ubuntu 7.10 + Windows Xp Dual Boot

 

my laptop is dual boot with win sp2 + kubuntu 8.04

 

after reinstall windows kubuntu don't boot and in live session partitioner can't detect any partition from hda windows have ntfs but I can mount drives in live session through menu>places>computer

 

I have 120 toshiba sata hd0

 

-question by devendra

you can download http://www.supergrubdisk.org/ it can be mounted to boot from cd,floppy and usb and lets you restore grub and do other task to recover linux

Share this post


Link to post
Share on other sites
Thank you!Ubuntu 7.10 + Windows Xp Dual Boot

Excellent instructions - even for a newbie like me :) worked like a charm! 

 thank you :) :)

 

Share this post


Link to post
Share on other sites
Low Specification alternative to Live CDUbuntu 7.10 + Windows Xp Dual Boot

If you are using a low-specification machine that cannot run the live cd, then try using Gparted, and when its starting up, choose to run it as command line, and then do what "Pyos" said up top... It works like a charm, and my very old computer I use as a server works with with Windows 2000 & Ubuntu 8.04.3 Server ( I installed gnome as an extremely slimmed-down version) ... This all runs on an Intel Celeron (Coppermine) 1 GHz, 384 MB RAM,  and 30 GB HDD.  =D

-reply by Alex

Share this post


Link to post
Share on other sites
Ubuntu - Windows dual boot problem Ubuntu 7.10 + Windows Xp Dual Boot

Hi,

I had installed Ubunto after Windows on my laptop and GRUB dual boot worked fine. But my laptop broke during a trip, and I have taken the hard drive out and put that on another laptop. But now, I cannot boot windows. Ubunto works fine ad my files are fine, but when I choose windows from the boot menu, the black grub commandline screen with "grub> " shows up. Any thoughts on what hast happend?

Many Thanks,

MG

-reply by Ghandi

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.