How do I remove a Linux partition and expand the Windows partition to consume the Linux partition space?
Removing linux is fairly simple.
- Use a tool like GPartEd to remove the linux partition. Do not expand the Windows partition yet - expanding NTFS partitions can cause issues, and it's best to only have one thing broken at a time.
- Since your computer was configured to boot using GRUB, and you've just deleted the partition that GRUB resided in, your computer will be nonbootable after you remove the partition - GRUB will fail with a nondescript error. Don't worry about this, and carry on to the next step
- Get your Windows 7 install disk. You need a retail disk, upgrade disk, or media from your manufacturer that is actually Windows 7 media - you do not want a disc with proprietary recovery software, which unfortunately some manufacturers now ship. If the disc is labeled as "Windows 7", it should be the right kind, even if it's not in the normal Microsoft styling (OEMs press their own install discs, so it may be a standard install disc but have a different label from your OEM). To check for sure, before you change anything on your computer, boot from the disc. You should get a Windows 7-style screen asking you what language you want to proceed in.
- Boot from the disc (keep in mind that you have to hit a key when it says "press any key to boot from disc...", I usually miss this and have to try again), click Next on the language screen (it defaults to English), and on the next screen look in the lower right - there will be a link. I believe it says "Startup Recovery", but it may also be "Repair". Click that. If you are asked how to proceed, select "Startup Recovery." You'll stare at a progress bar for a while while the Windows installer automatically restores the standard Windows bootloader.
- When your computer reboots, it should start Windows 7. If it doesn't repeat step 4 again, it may take a couple of Startup Recovery cycles.
You could use Gparted to delete the partition and to resize the Windows partition. Then use EasyBCD to set Windows 7 as the default boot OS, or the Windows 7 disk to "repair" its boot.