Another Partitioning Question

Asked by penneyda

So I have been using Ubuntu for a month now and I am ready to ditch (erase) my windows partition and start with a fresh install of windows that I can run via vmware in ubuntu. I already know how to install vmware/windows in Ubuntu and do not care about losing all of my data in the current windows partition (it's backed up). But I am not sure if I need to completely delete my windows partition or just resize it. I initially gave Ubuntu a small parition (23gig) and now I want to increase the Ubuntu partition since I use it the most.

I have read many many ways to do this online and I am unclear on the best, most painless, process so felt I needed to ask the experts here.

Here is exactly what I would like to accomplish:
 - I no longer wish to dual boot windows xp and Ubuntu, only Ubuntu.
 - I want to increase the size my Ubuntu partition without losing/damaging any data on my current Ubuntu partition.

My main goal is to boot Ubuntu, and only run windows via wmware from Ubuntu. I can install vmware/windows by reading online, but here is what I am unsure of and need help with:
 - how to re-partition Ubuntu and make it bigger without losing data
 - if i need to delete the windows partition or just make it smaller
 - how to resize windows partition from Ubuntu if i need to keep it or how to delete it if i dont
 - how to load only Ubuntu at startup, and get rid of the dual boot option

Any guidance on how I can accomplish this would be much appreciated. I have only been using Ubuntu/Linus for one month now and my Linux skills are currently lacking, so details would be much appreciated =)

Ubuntu 9.10
 - - - - -
Filesystem Size Used Avail Use% Mounted on
/dev/sda5 23G 7.0G 15G 33% /
udev 991M 280K 991M 1% /dev
none 991M 184K 991M 1% /dev/shm
none 991M 204K 991M 1% /var/run
none 991M 0 991M 0% /var/lock
none 991M 0 991M 0% /lib/init/rw
/dev/sda1 70G 31G 39G 44% /media/System (WindowsXp)

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu yelp Edit question
Assignee:
No assignee Edit question
Solved by:
penneyda
Solved:
Last query:
Last reply:
Revision history for this message
David Jones (dj) said :
#1

Have you considered moving your windows files to ubuntu?

www.reallylinux.com

Accessing Windows Files from Linux

To be able to get access to your Windows drive/partition under Linux you will need to perform two steps.

1) Create a directory under Linux that will link to your Windows drive/partition
at the prompt type (only do this once): mkdir /mnt/win

2) Then mount your Windows drive and link it to this new directory under Linux at the prompt type exactly:
mount -t vfat /dev/hda1 /mnt/win

NOTE: If you are using Windows NT, 2000, 2003, or XP you need to instead use this command:
mount -t ntfs /dev/hda1 /mnt/win

then simply copy and past to where ever you want to put the files you wish to save ie; documents, music, pics whatever.

David
in TN

Revision history for this message
penneyda (penneyda) said :
#2

Thanks David, but I've got this functionality now. I basically want to take the space from sda1 and give to sda5 without losing/damaging my current ubuntu data.

I'm doing this because my current windows install is messed up and thought it would be a good time to give some unused space back to ubuntu, where I really want it, then I will just run windows from vmware at a later time.

If you have an advice for getting this done painlessly please let me know.

Revision history for this message
penneyda (penneyda) said :
#3

This was a lot easier than I thought but I can't take credit myself since I had somebody else helping me. I don't claim to know what I was doing but for anybody that is curious, here is what I did ...

I. BackUp:

A)
I confirmed from Ubuntu what partition I am using when I am running it. Few options to do this, read online for more, but you can figure it out using "df -h" or "cat /etc/partitions"
B)
I then booted from my Ubuntu 9.10 live CD i made when I installed Ubuntu. There's an option to let you "TRY" ubuntu, without installing it, you can't miss it, it's there on the menu that pops up by default after rebooting with the CD in your drive . It allows you to load Ubuntu as normal but from disc, so it's a like a fresh install once fully loaded.
C)
You then have to mount your regular Ubuntu partition, that you normally run Ubuntu from. In my example, after running "df -h" I could see this was "/dev/sda5". So I mounted dev/sda5 to a folder that just created. I then I plugged in my external usb flash drive, and mounted it to another new folder that I created.
D)
I then compressed my important files. Easiest way to do this is via gui, just select the files/folders you want to backup, right click, and choose compress. Then I copied it to my usb flash drive.

II. Resized Partitions.

A) To resized the partitions I did a google search and found gparted. Found a gparted iso and created a cd to boot with. It's easy, download the iso, right click on the iso and choose write to disc.

B) I restarted with the gparted CD in my drive and it gives you a nice gui to resize/move your partitions. Make sure you defrag your windows partition beforehand or else it takes a really really really long time, and you might lose/corrupt some windows data.

After you have repartitioned everything to your liking it will say that it is done. DO NOT remove the gparted CD until you have chosen to exit Gparted, because you are running it from disc (remember?). It will exit the gui for you, then run some commands via command line and it will tell you when to remove the CD.

III. Done
After I removed the gparted CD and rebooted I chose to load my windows partition from grub (since I have dual boot) and I let windows complain and run its check disk process. Everything booted up fine afterwards.

***
I'm a Ubuntu/Linux newbie, so I had to google just about everything along every step of the way to completely understand, so please dont look to me for answers, more people out there better able to answer your questions than me =) This is just how I accomplished this on my IBM t61p thinkpad with dual boot (ubuntu 9.10 / windowsXP). Hopefully this helps other people looking to do the same.