What I wanted to do:
- Remove logical partitions
- Cleanly reinstall Windows XP
- Resize and merge existing logical partitions
- Make sure Ubuntu is unaffected (Grub)
Note #1. Partition magic will not help, if you attempt to resize/move an existing partition due to the presence of the linux partition.
Note #2. Grub is my boot loader. I did not note down the partition on which my linux is installed and kind of regretted later. Note down the partition information when you attempt to boot into Ubuntu ..something like 'Booting from hd (0,5)' etc
Here is what I did.
Task #1: Remove logical partition
As I said earlier, Partition magic will not help in this regard due to the presence of the Linux partition.
I booted using the Windows XP setup CD and using the partition utility, removed the logical partitions that I did not want.
Task #2: Install Windows
After the partitions were removed, I proceeded to install Windows XP on my newly formatted partition. Note, my Linux partition was untouched all this while.
Now, once XP was installed, the XP boot manager takes over and I could not see my Linux boot options. Now the task was to restore Grub as the boot manager.
Task #3: Resize partitions
Now I restarted the PC and booted using the Live CD.
Ubuntu has a Partition manager that ships with the Live CD.
Using that, I was able to resize the partitions
Task #4: Restore Grub
Once inside, In a terminal window, I used the following commands:
a. sudo grub
b. root hd(0,5)
(you may have noticed where Grub loads from as mentioned in Note#2 above)
if not, here is what can be done to find where Grub was previously installed
b1. find /boot/grub/stage1
c. setup hd(0)
d. quit
All done!
I now restarted the PC without the Live CD and was able to see the Grub menu with Ubuntu and Windows XP OS choices.
No comments:
Post a Comment