The situation that this specific tutorial will apply to is if you only have an Ubuntu 10.04 boot disk available--say you bought an Acer Revo, which doesn't come with a disk drive, and so assumes you won't want a Win 7 install disk even though the OS comes bundled--and that you had previously installed Ubuntu, but want to get rid of it--say because wireless doesn't work out of the box for a fresh-install of 10.04 on your new Revo, but you're getting another computer that can be your Linux computer. (This can probably be broadened to earlier versions of Ubuntu, and other versions of Windows, if you feel comfortable doing so.) In essence, though, the idea is to wipe all traces of Linux, without resorting to the restore tools on a Windows install disk. Even if you have the Windows install disk, by removing the GRUB bootloader from the Ubuntu live cd, you can save yourself one boot in the whole process.
I used an OLD, OLD tutorial, that assumed two things:
1. That a program called "ms-sys" was (still?) available with linux's apt-get. -- EDIT: I missed where it said to add "Universal" to the repositories of the LiveCD. Oops. :-)
2. That you were using Windows XP.
Here's the tutorial; I'll explain how to work around these assumptions later.
INSTRUCTIONS:
1. Reboot into the Ubuntu LiveCD (choose to "try Ubuntu" instead of install it, and from there you will enter a live version of Ubuntu).
2. Open System -> Administration -> GParted from the menu at the top left.
3. Choose to delete the partition that has Ubuntu installed on it; choose to resize the partition with Windows 7; choose to make it take up the remainder of the drive. (I'm assuming that if you had the know-how to set-up a dual-boot, you've had your fair share of exposure to GParted, and know how to this.) Note that even though it says this is dangerous and you should back things up, it has worked out just fine for me. If there's an error, yes, that would be bad, but know that GParted *is* capable of doing the wipe and resize.
Here, remember the name of the disk that your system is on. I had an external plugged in, so my Win7/Ubuntu partitions were on /dev/sdb. (In case you *haven't* had that much exposure to dual-booting and GParted, and thus will have a hard time remembering a name like that, with Ubuntu, harddrives get put in the /dev folder (for devices, if you really don't know), and then get named sda, sdb, sdc... /dev/sdb just means "the second harddrive.") Note that you don't need the partition with Windows, just the drive. (I'm not even sure where in the Windows system the bootloader is kept--there seems to be a "System Partition" with a folder called "Boot," though, that showed up in Ubuntu but doesn't in Win7. Besides, the MBR goes in the 1MB partition at the front of the drive.)
[Another note: This is how far I got before I remembered that I hadn't gotten rid of Grub2 after installing Linux. I re-booted, and it went straight to the Grub2 recovery prompt. But, with no linux kernels left, there was absolutely nothing I could do from there. After a fair bit of searching in Firefox with the LiveCD, and finding a lot of people just saying to use the Windows recovery tools on the install disk, I came across the old tutorial above.]
4. (This is where we start to follow the older tutorial, with some modifications.) Go to ms-sys and follow their instructions for installing ms-sys to the Live boot system. (Where this gets installed to when the booted drive is read-only, I do not know...)
5. To find the proper command-line arguments for running ms-sys on your system, run `man ms-sys`. (The old tutorial said to use -m, but that would have, according to ms-sys's manual pages, written the MBR of a Windows XP system. For Windows 7, the correct option was -7. For multiple versions of Windows... I have no clue.)
6. Run `sudo ms-sys -7 /dev/sdb` (or, the appropriate option for your version of Windows, and appropriate target for the partitioning scheme you've got). This for me took NO TIME at all. Eerily no time. I'm pretty sure something more complicated like wiping the MBR partition with dd would have taken longer, let alone re-writing a proper MBR.
7. Reboot. Instead of getting the grub2 recovery prompt here, I got the screen that said Windows was loading. It then dropped out of that and checked the harddrive, which didn't take much time at all. It then rebooted itself, and here I am, with a fully functioning Windows 7, with twice the available harddrive space, and no Linux.
Maybe not the best informed tutorial yet, but, easily one of the most explanatory.

No comments:
Post a Comment