I have dual boot Vista/Ubuntu 10.10. I want to save Ubuntu and data, but get rid of Windows Vista. How do I do that?

Asked by Greg Boone

I have an HP laptop. Came with Vista. I have been running Ubuntu for more than a year and love it. I want to now get rid of Vista altogether, but keep all my Ubuntu settings, files, etc... and make the laptop a full blown Ubuntu machine.
Can I do it with out reloading?
If I have to or should reload Ubuntu 10.10, how do I safely back it up so all my settings, software, etc... remain intact?
Or, am I asking too much? :-)

<email address hidden>

Greg

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gparted Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Eliah Kagan (degeneracypressure) said :
#1

You don't have to do a fresh reinstallation of Ubuntu for this, no. Fortunately, all that is necessary is to follow these steps:

(1) Back up any files you want, from your Vista installation, such as your documents. You'll be wiping out the partitions associated with Windows Vista, so you'll lose whatever files are inside.

(2) Back up your documents and other important files from your Ubuntu installation, since you'll be resizing your Ubuntu partition, and resizing a partition occasionally can cause data loss.

(3) Boot from the Ubuntu Desktop Install CD. Select Try Ubuntu. Run GParted (Applications > Accessories > GParted Partition Editor).

(4) Delete the partition associated with your Windows Vista installation. That's an NTFS partition. It's possible that you have multiple NTFS partitions. Some might be used for storage. Others might be used for recovery, or to enable you to put back Windows Vista. Please feel free to post again if you need advice on what partitions to remove. Do NOT remove any partitions of type linux-swap, ext4, ext3, or ext2, as partitions of these types would not be associated with Windows, and are probably associated with your Ubuntu installation. Click the green check mark to apply this operation.

(5) You probably have two partitions remaining. One of them is much bigger than the other. It's probably of type ext4, though it might be ext3 if you started out with an old enough version of Ubuntu. Resize this partition to take up all the unpartitioned (gray) space freed up by deleting the NTFS partition(s) associated with Windows Vista. Click the green check mark to apply this operation.

(6) Remember (or write down) the name of the big ext4 (or ext3) partition that you just resized. It is probably called /dev/sda1, but it might be called something else. Note that this, and step 8, and not strictly necessary, but they may decrease the risk of Ubuntu being rendered unbootable. If you skip these two steps and Ubuntu won't boot, you can always boot from the Ubuntu CD again and perform them then.

(7) Quit GParted.

(8) Open up a Terminal window (Applications > Accessories > Terminal) and run these three commands, replacing /dev/sda1 with the name of that big partition that you remembered in step 6, if it's different. To run a command, paste it in (or type it carefully) and press enter.

sudo mount /dev/sda1 /mnt
sudo grub-install --root-directory=/mnt /dev/sda
sudo umount /mnt

If the name of the big partition from step 6 is not /dev/sdN, where N is some number, then it is necessary to modify "/dev/sda" from the second of those three commands accordingly. For example, if the name of the big partition were /dev/sdb1, you would change /dev/sda to /dev/sdb on the second command, and if the name of the big partition were /dev/hda1, you would change /dev/sda to /dev/hda in the second command.

The first and last of those three commands will not produce any output if they are successful, so don't worry about the appearance that they did nothing. Since your live CD environment typically gives you Internet access, it's a good idea to copy the text from the Terminal (Edit > Select All; Edit > Copy) and save it, perhaps by pasting it in your email, or here (click the "Just Add a Comment" button if you're not also requesting further assistance). Then, if things don't work right, you'll have the output to post here when asking for additional help.

(9) Using the power icon at the upper-right corner of the screen, reboot your computer to attempt to boot into your newly expanded Ubuntu installation. Make sure to remove the CD from the drive, so you don't inadvertently reboot back into the live CD environment. If you have any problems, please feel free to post again. There's a chance this process will temporarily render your Ubuntu system unbootable (even if you did do step 8)...and of course, you won't have your Windows Vista system either. If that happens, you can still boot from the Ubuntu CD and access the Internet and Launchpad.

(10) Once you're booted back into your Ubuntu system on the hard drive, open a Terminal window (Applications > Accessories > Terminal) and run the command:

sudo update-grub

This time, you might be prompted for your password. When you type it in, you won't see any placeholder characters (like *). That's OK, just type it in and press enter. This step makes sure your boot loader (GRUB) is properly set up. This is the last step, though you may also want to reboot to verify that everything is working properly.

Please note that these instructions assume that you installed Ubuntu alongside Windows Vista. However, if you installed it *inside* your Vista system, with the Wubi installer (which is the installer that you run inside Windows), then those steps will NOT work and it would be *bad* to attempt them. If that is the case, please post again.

Revision history for this message
Greg Boone (luv-hot-chiles) said :
#2

Thank you for the QUICK response! Eager to get home and do this after work or this weekend! Will let you know results.

Can you help with this problem?

Provide an answer of your own, or ask Greg Boone for more information if necessary.

To post a message you must log in.