Thursday, November 12, 2009

Windows XP x64 and Kubuntu dual boot... Remove kubuntu and prepare for pain

So I've been using Windows XP x64 and Kubuntu side by side for a while but I was sick of dual booting. So I installed Sun's VirtualBox and installed Kubuntu there. Now I don't have to reboot the PC to run Linux when I have to do Linux'y things.

Yesterday I decided to remove the Kubuntu partitions and reclaim the disk space for Windows (since I had 1g left). So I remove the partitions and reboot.

I was faced with a Grub error 22 screen and I couldn't proceed. Seems that /boot was a directory off of / and / didn't exist anymore. So Grub had no configuration data to go on.

Ohh, I remember, I thought. I'll just rewrite my MBR and that'll get rid of Grub. So I boot to the Windows XP x64 recovery console and issue the command fixmbr. Then reboot and no change - still Grub error 22.

Hmm, maybe I didn't save? Maybe I need fixboot? Maybe fixmbr then fixboot? Maybe fixboot then fixmbr? Maybe I need to specify the disk to fixmbr? Maybe I need to specify the partition? Maybe I need to specify the disk and partition? Maybe X64 doesn't use the MBR? Maybe it's a GUID thing? Maybe I'm going insane? None of it worked.

After 6 hours I was ready to simply reinstall Windows but then I thought, maybe if I reinstall Kubuntu, Grub will fix itself? So I reinstall Kubuntu, reboot and behold, a valid Grub screen with a choice to go to Windows XP that worked!

For what it's worth, I manually partitioned, creating a 1g /boot, 1 10g / and a 2g swap. So hopefully, I can reclaim the 10g and 2g, leaving Grub on /boot and configuring Grub to automatically boot to Windows XP.

No comments: