A couple of months ago I switched from windows XP to Ubuntu on a seperate partition. Last week I started using XP again for games. I decided to switch back to XP. My brother showed me how to delete everything from the Ubuntu partition, so i went and did that. I restarted my computer and GRUB could not start up it gave me error 22. I looked up error 22 up online and got this one fourm. I tried following someones advice by installing windows bootloader again off a windows 98 cd (i dont have a xp cd). I tried booting from cd and got to a part that told me that if i went any further i would replace files with older versions so i turned back and turned off my computer. I restarted and wanted to see what GRUB would do but GRUB didnt even try all i get is the message... "Missing operating system"... what is wrong and is it possible to get back to my windows xp partition without having to wipe my computer? Thanks
I imagine you didn't have a separate /boot partition? This is one reason I advise people to have one, means that if the main root partition dies, booting is still fine, and the insurance it gives you only takes up 64meg tops... I think the error message basically means that your MBR points to formatted space now. My understanding is that basically, the MBR isn't big enough to contain grub in its entirity, so execution starts there, then passes to the main grub executable in /boot, then it hands over to whichever OS you choose in grub. So if you don't have a /boot anymore, there is enough logic to be able to work out that something isn't right, but not much beyond that. I'd recommend you find your XP cd, boot to recovery console and try "fixmbr" if you're determined to turn your back on Linux. The other solution would be to just reinstall Linux and re-establish a working grub install. If you don't need the space tied up on the Linux partition that will always let you come back again if your priorities change in the future. You could probably also consider resizing and reallocating partitions a bit further to create a small /boot partition and allocate the rest as a Linux partition, then once you have a working grub install, format the Linux partition but keep /boot. But given your recent experience, that might not be wise if you have stuff not backed up on Windows. Would be a good learning experience though. Long story short, if you don't have access to your XP cd, you're probably going to reinstall Linux in some way shape or form. But if you're clever about it, you'll be able to at least reclaim most of the space on the partition as it stands now.