Move over XP, / I heart Ubuntu
December 11, 2006 4:43 PM   Subscribe

New to Ubuntu. How do I completely uninstall XP after already having partitioned my hard drive.

So now that I love my new OS and want to make some more room, how can I totally get rid of Windows??
posted by nintendo to Computers & Internet (7 answers total) 3 users marked this as a favorite
"parted" is the program which will allow you to edit the partitions on your hard drive. You can do things such as eliminate the partition upon which Windows is installed, and expand the partition(s) on which Linux is installed.

This is, as you might expect, a program which can make your computer inoperable if improperly used. Back up your data to another computer or disk before you use it.

After you do "sudo parted", try "print" as your first command and "help" as your second command. Write down what "print" tells you, figure out what each partition is, and be cautious. Read up on partitioning online if necessary.

You will also want to run "update-grub" after you finish manipulating partitions.
posted by jellicle at 4:54 PM on December 11, 2006

How are you booting Ubuntu? If you are using a linux bootloader, and it doesn't involve the old windows partition at all, then you can just nuke the windows partition, create a new linux partition, create a filesystem and mount it somewhere useful.
posted by Good Brain at 4:55 PM on December 11, 2006

I don't have an answer, but be sure to check out the Ubuntu forums. Very informative and an incredibly friendly community.
posted by Sufi at 5:00 PM on December 11, 2006

I'm not an expert...but:
You can get a live CD version of the parted tool here. Boot off this CD and use it to delete your XP partition and extend your Ubuntu / partition to use the freed up space.

You are probably using the GRUB boot loader, which I don't think this will be affected by these changes. If you do run into trouble, you should be able to restore things by booting off your Ubuntu install CD and running the GRUB configuration again.

Please notice how often I used words like "should" and "I don't think". This ought to work, but be sure to back everything up before you start.
posted by Eddie Mars at 6:01 PM on December 11, 2006

nintendo, I'm glad to hear it. Welcome to our little world!

jellicle's advice is good.

If, however, you installed atop the "Logical Volume Manager", a feature that Ubuntu provides but (IIRC) is sadly not the default, then you can

1) Boot to a CD (for the rest of these steps).
2) use any partitioning tool to (parted, cfdisk, fdisk) to tag the Windows partition as the correct id for LVM.
3) Use "pvcreate" to add that Physical Volume to your Volume Group
4) Use "lvextend" exend one of your logical volumes to cover that extra space.
5) Use "resize2fs" to expand your existing space to cover that newly allocated space.

As j says, mucking about with the low-level is about as elegant as swinging an axe, and you have some chance of cutting off some toes, so be careful.
posted by cmiller at 6:06 PM on December 11, 2006

Alternately, for a solution that's harder to screw up, you can A) back up your files (probably all in /home/username, and possibly some system settings in /etc), and B) nuke the whole system and reinstall over the whole thing.

This is more of a brute-force approach, but you won't end up with the split-partition thing, which is a little weird. Quite usable, mind, but a bit odd. As cmiller says, fdisk and parted are toe-removal devices... if you just reinstall, there's less of a chance of getting something wrong. What they're telling you is completely accurate and will work, but turning a Linux newbie loose with those instructions makes me a little nervous.

Whichever way you go, be sure to back up your files before proceeding!
posted by Malor at 7:59 PM on December 11, 2006

The only thing I will add, is that gparted adds a pretty gui to parted, and is available under System->Administration->GNOME Partition Editor

You almost certainly want to use this over plain ol' parted.
posted by markr at 1:12 AM on December 12, 2006

« Older Do hobos do a lot of data entry in the winter?   |   Warranties for laptops Newer »
This thread is closed to new comments.