I installed Ubuntu 12.10 alongside Windows but now I want to permanently remove it from my computer as I find it quite uncomfortable to have to choose which OS to boot at startup time.
How can I remove it without affecting my Windows system?
This question appeared in my 'dashboard' as active but I've just realised it's from over 5 years ago - it looked active because Community has marked it for being moved. But whilst I'm here anyway I'll add a little to it:
@phoibos offers decent advice to answer the question asked and then points in the direction of 'you don't need to get rid of Ubuntu to get the functionality asked for'.
Removing Ubuntu and getting Windows to re-write the bootloader afterwards is an awful lot more hassle than just changing a couple of lines in the grub file located in the /etc/default
folder.
Open up a terminal and type sudo nano /etc/default/grub
Change GRUB_DEFAULT=0
to GRUB_DEFAULT=saved
Add GRUB_SAVEDEFAULT=true
on a new line below it.
From there you can press Ctrl + o to save your changes ('Write Out'), enter to accept the filename 'grub' and then Ctrl + x to exit.
If you prefer you can just press Ctrl + x once you've made your changes, y to accept the offer to save your changes and then enter to accept the filename.
sudo update-grub
to update your new grub adjustments, then the last Operating System that you successfully booted will be the default option.So if you usually end up running Windows, then when you switch on your machine it will be the option highlighted in the grub menu. If you don't choose something else then it'll get on with booting it when the timer runs out (or you press enter).
Using the same method, you can also change the GRUB_TIMEOUT=10
to just a few seconds if you prefer to get on with booting your usual choice more quickly.
Keeping another Operating System on your machine may turn out to be surprisingly useful if something unexpected happens to your main system.
(This assumes that you can spare 15 - 20 GB or so on your storage device, although some of the lighter distros take up even less space even with a bunch of useful programs installed).
Also, Community, don't worry about deleting/moving this answer if you'd prefer - I've saved a copy in case something similar is asked again ;)
Get rid of Ubuntu:
Boot your windows boot disc and fix the master boot record to get rid of Ubuntus Grub menu. The process is described here:
http://www.howtogeek.com/howto/32523/how-to-manually-repair-windows-7-boot-loader-problems/
If you rebooted to Windows and didn't encounter the Grub menu, you're free to do with Ubuntus partitions whatever you please (if you don't have any valuable data on its partitions).
A (IMHO) better alternative:
Keep Ubuntu, but make the default entry for the Grub boot loader Windows. Now you can still boot Ubuntu if you like, but if you don't select its entry in the boot menu, Windows gets loaded.
See this answer: How do I set Windows to boot as the default in the boot loader?