Resize a Windows Partition with the Ubuntu Live CD


by Lonnie Lee Best
Lonnie Lee Best

Some Microsoft Windows users want to install Ubuntu "for real", while also maintaining their MS Window's too. They want to dual boot, but they only have one hard drive with one partition that is fully consumed by Microsoft Window's "c-drive". They wish they could shrink their current partition to make room for Ubuntu's partitions. This article will show you step by step how to do exactly this.

Download the Ubuntu 7.04 ISO:

http://www.ubuntu.com/getubuntu/download

Burn it to a CD. Here's a free program for burning an ISO in Windows:

http://infrarecorder.sourceforge.net/?page_id=5

You won't be able to shrink your c partition to a size less than the size of the files it contains. So, remove any unnecessary files you really don't want to remain. Also, just to be safe, make a backup of any important files.

After you've backup all your important files, boot from the Ubuntu CD then follow these instructions:

Install qtparted

  1. Open the Synaptic Package Manager by navigating from your "System" menu: System | Administration | Synaptic Package Manager.
  2. Click the "Search" button and type "qtparted" into the search box, then click the search button below.
  3. You'll see an alphabetical listing of packages. Right click on the first "qtparted" package, and select "Mark for Installation".
  4. Now click the "Apply" button. "qtparted" will be downloaded and installed.

Change Root Password

  1. From Ubuntu's "System" menu, open the "Users and Groups" manager: System | Administration | Users and Groups
  2. Click on the "root" user, and then click the properties button.
  3. Highlight the contents of "User Password" text-box and then over-type it with the first password that comes to your mind.
  4. Highlight the contents of "Confirmation" text-box and then over-type it with the same password you chose in the previous step.
  5. Click the "OK" button.

Launch qtparted

  1. From Ubuntu's Applications menu, open a terminal: Applications | Accessories | Terminal
  2. At the command prompt, type "su" followed by the <enter> key (no quotes).
  3. Now type the new root password you created previously, and press the <enter> key.
  4. Last, type "qtparted" (no quotes) and press the <enter> key. This will launch qtparted's graphical user interface. Oh and don't close this terminal session; doing so will close qtparted's GUI.

Locate your c-drive in qtparted

  1. Maximize qtparted so we can see everything better. If you don't see qtparted, look down at your task bar, it may be minimized or behind another window.
  2. In the left pane, you should see a tree control listing all the physical hardrives install in your machine. Click on the first one; for me, its "/dev/hda".
  3. Now, in the right pane, you should see a list of partitions for the drive you selected. For me, the very first partition listed happens to be my c-drive, but its not label "c-drive"; ubuntu calls it "/dev/hda1".
  4. Write down that name Ubuntu is calling your c-drive ("/dev/hda1" in my case).

Unmount the Windows C drive

Qtparted won't allow us to resize this partition until we have unmounted it.

  1. Start a new Terminal (don't attempt to use the one that is currently on your task bar).
  2. Type "su" and then hit <enter>.
  3. Type in the root password we created, and the press <enter>.
  4. View the /proc/mounts file to see where Ubuntu is currently mounting our c-drive. Type "cat /proc/mounts" (no quotes) and press <enter>.
  5. Find the partition name your wrote down in the text outputed to the terminal. For me, I see "/dev/hda1" two lines above where my cursor is blinking. It indicates that /dev/hada1 is currently mounted at /media/disk.
  6. Now unmount your partition using the umount command (notice its not "unmount"). For me, I type: "umount /media/disk" then <enter> (no quotes).

Resize the Partition

Ok, we've covered all the preliminaries.

  1. Click back over to qtparted (resting on your task bar).
  2. In the right pane, right-click on the partition you want to resize and select "Resize" from the context menu.
  3. Enter the new size you want the partition to be. It must be larger than the space currently occupied with files. The partition I'm resizing is currently "114463.09" (so its around 114 gigs). I personally use Ubuntu exclusively, so I don't need much room for Windows, but I'm going to be generous and give it around 25 gigs ("25600").
  4. Click the "OK" button.
  5. From qtparted's "File" menu, select "Confirm". For me, after confirming, it took about 5 or 6 minutes to resize.
  6. When qtparted completes, the "OK" button will become enabled. Click it and exit qtparted. Your partition is resized!

Now, if you want to test that everything is ok, you can now restart Ubuntu, and take out the CD when it prompts you: System | Quit | Restart. For me, MS Windows realized that something was different, and it came up to a blue screen (not of death, thankfully) that did a "chkdisk". After this, it rebooted again (automatically) and loaded right up. I checked the size of the drive in "My Computer" and in "Computer Management" and all changes went through successfully.



Tell others about
this page:

facebook twitter reddit google+

About the Author

Lonnie Best has been using the internet since 1993, and has been making web pages since 1995. visit: http://www.lonniebest.com



Comments? Questions? Email Here

© HowtoAdvice.com

Next
How to Advice .com
Send us Feedback about HowtoAdvice.com
NextPrevious