-   Linux - Software (
-   -   How to Uninstall Ubuntu and Reinstall Without Losing GRUB (

Loboman 01-26-2012 01:04 PM

How to Uninstall Ubuntu and Reinstall Without Losing GRUB
I am using Ubuntu in a dual boot system with Windows XP. Somehow I managed to load Ubuntu more than once, so I'd like to start over. The problem is that everything I've read seems to indicate that if I delete Ubuntu partitions, I'll lose the ability to boot windows.

My computer came with XP installed without a CD. So I cannot simply delete Ubuntu and boot back up with a Windows CD.

One solution I've read about suggests using EasyBCD, but it doesn't work with Windows XP, SP3.

I'm at a loss.

Larry Webb 01-26-2012 02:25 PM

You can make a small partition of about 20 meg and install grub on it and chainload your windows installation before you start changing your ubuntu partitions. I you google seardh you will also find ways to download and repair xp mbr without the xp cd.

Why delete?
Reinstall and fix partitions on reinstall when it tells you when and where it is going to install ubuntu - select 'expert' or 'edit' and a window should open showing all the partitions on your hd. You can then select to change them or make new. Just do not mess or alter your windows partition.

Wayne Sallee 01-27-2012 09:11 PM

You can research the following commands:

To save the MBR to a file (this contains the partition table too):
dd if=/dev/sda of=sda-mbr-full bs=512 count=1

To save the MBR, without the partition table, to a file:
dd if=/dev/sda of=sda-mbr-nopart bs=446 count=1

To restore the MBR:
dd if=sda-mbr-nopart of=/dev/sda

To restore the MBR only part of the MBR and Part:
dd if=sda-mbr-full of=/dev/sda count=1 bs=446

But be very careful with dd, as you can destroy your data if you don't know what you are doing. Don't just copy and past the above code. You would need to rewrite it to your needs. And of course you would need to unmount the drive.

Most Linux distros will check for other os installed and ask you if you want to include them in the boot, when you are installing linux.

There is also a command that you can use while in grub to add another os to the boot menu.

Wayne Sallee

All times are GMT -5. The time now is 06:12 PM.