PDA

View Full Version : How to REinstall WinXp and keep Ubuntu bootable



th0mas
March 28th, 2005, 04:01 PM
Hello everyone,

Few months ago i installed Ubuntu 4.1 with XP already running. So my grub asks me which OS i want each time I start my computer.

The thing is that i would like to reinstall XP (going more & more crappy those days). But i understood it will erase the "MBR".

How can i do to keep a Grub ? to keep my Ubuntu bootable ?

I hope i'm enough precise.

THX!

Buffalo Soldier
March 28th, 2005, 04:12 PM
Out of curiosity, are you reinstalling Windows because you want a clean fresh install of Windows or someting related to GRUB default OS when booting?

puelly
March 28th, 2005, 05:33 PM
Hello everyone,

Few months ago i installed Ubuntu 4.1 with XP already running. So my grub asks me which OS i want each time I start my computer.

The thing is that i would like to reinstall XP (going more & more crappy those days). But i understood it will erase the "MBR".

How can i do to keep a Grub ? to keep my Ubuntu bootable ?

I hope i'm enough precise.

THX!
you should make a bootdisk for ubuntu before installing windows. then install windows, use the bootdisk to boot into grub and run grub-install

Sorry I can't remember the exact command to create a boot disk but it should be on the forum somewhere.

th0mas
March 28th, 2005, 10:14 PM
Out of curiosity, are you reinstalling Windows because you want a clean fresh install of Windows or someting related to GRUB default OS when booting?

yup, i want a clean refresh of my windows. I still keep xp cause some softs and things don't run with linux...

my grub was ok, letting me chose Ubuntu or Windows when booting.
but i heard reinstalling XP will erase the MBR and my Grub...

garyng
March 28th, 2005, 10:22 PM
yup, i want a clean refresh of my windows. I still keep xp cause some softs and things don't run with linux...

my grub was ok, letting me chose Ubuntu or Windows when booting.
but i heard reinstalling XP will erase the MBR and my Grub...

You are right BUT XP may preserve GRUB as the original DOS boot sector and you may have an option to "boot previous window"(which is in fact GRUB) in XP.

You can always do it yourself by :

dd if=/dev/hda of=/mnt/C/grub bs=512 count=1

to save the GRUB sector to a file that is readable by BOTH XP and linux(say a FAT32 as C:, just don't let XP change it to NTFS). Then add the line yourself to C:\BOOT.INI after XP has done its installation.

th0mas
March 28th, 2005, 10:28 PM
you should make a bootdisk for ubuntu before installing windows. then install windows, use the bootdisk to boot into grub and run grub-install

Sorry I can't remember the exact command to create a boot disk but it should be on the forum somewhere.

Don't you think i could do this more easily using an Ubuntu LiveCD (after having reinstalled Xp), so that i have access to my linux partitions and do some modifications ?

Anyway, i've just seen this url, hope it will help others...
http://ubuntuguide.org/#restoregrubmenuafterwindowsinstallation

Buffalo Soldier
March 29th, 2005, 01:10 AM
A similar discussion going on at Windows Install after Ubuntu? (http://ubuntuforums.org/showthread.php?t=22537) thread.

kuleali
April 12th, 2005, 04:12 PM
i have the sam issue. Would be nice if i had a disk station.