PDA

View Full Version : [ubuntu] Confused about repartitioning drive



jedimattk
March 15th, 2010, 05:53 AM
Although asking this question makes me feel like a total newb, I've been trying to puzzle it out for a while now and have been unable to. Here's what my hard drive in gParted looks like:

http://farm5.static.flickr.com/4013/4433881235_bca5439904_b.jpg

I want to create a new partition with that unused space, install a new operating system to said partition, copy all my personal files over to said partition, and then delete my current Linux partition(s?). Please don't tell me that just erasing my hard drive and starting fresh would be easier, because there's no viable way for me to back up my sixty-odd gigs of personal files.

On a different but related topic, does anyone know a good Windows program that allows you to see a Linux-formatted drive?

zvacet
March 15th, 2010, 02:20 PM
Put Ubuntu live CD in drive and then go to the gparted.You need to to this,because you can not resize,delete... mounted partitions (you see the key on the left side).I will do it this way

1.delete swap
2.shrink existing partition to get enough space
3.on that free space install OS of your choice

I don't know any Win program capable of read ext4 so let your new partition be in ext3.This (http://www.fs-driver.org/) is program you are looking for.If my answer is little bit confused just ask again.

cryptotheslow
March 15th, 2010, 02:25 PM
What zvacet said will work fine - although you may find that the LiveCD mounts the swap partition, so you will need to unmount it in gparted before being able to delete it.

drs305
March 15th, 2010, 02:26 PM
Shrinking an Ubuntu system partition requires use of the LiveCD or a SystemRescue or other external partitioning source.

Here is a guide for expanding the size of an Ubuntu / partition. The principals and techniques would also apply to shrinking the partition.

http://ubuntuforums.org/showthread.php?t=1219270
The first part of the post deals with an old bug, so you start with "Some basic rules..." section midway through the post.

leorolla
March 15th, 2010, 04:52 PM
There is always some risk when reducing a partition.

You really should borrow an external hard disk just to keep you data safe while you do this.

And follow the advices above: gparted from a Live Ubuntu CD, with the hard disk unmounted.

Then I suggest you reduce this partition to almost half of it, create a FAT32 partition on the remaining space, mount both, and copy the files you want to keep from the EXT4 partition to the FAT32 partition. Once your files are safe there, do whatever you want to the EXT4 partition. If you want you can format it NTFS for a later Windows install, in this case sorry for you.

jedimattk
March 16th, 2010, 07:55 AM
Thanks, guys. I followed your instructions and (after about two and a half hours) it seemed to go off smoothly. Then I installed Windows 7 to the new partition, expecting to be able to install some Linux-drive software and copy all the files over from my home folder.Unfortunately, no software seemed to know what to do with my ext4 partition, so I turned to my live CD.

In the live environment, I mounted both partitions and tried to do a straight copy of everything in my home folder over to the C:/Users/Matt/ folder on my Windows drive. It failed because I didn't have the right permissions or something (I don't remember the exact error.) In Nautilus, about half the folders in my home folder were locked - they show a little badge on the folder icon and give me the same error. The others were all empty.

I assumed I just needed to boot into Mint as usual and copy my files over that way, but couldn't figure out how. Trying to restore the Grub bootloader failed miserably and EasyBCD just shows me a grub> prompt. When I try to boot from that, it gives me an error about being unable to find the kernel, and is generally uncooperative from then on.

Is my Ubuntu partition corrupted? Again? I've had these headaches with it in the past, and more than once it has ended in my losing a great deal of data. Any help you can provide on how to copy my files now would be great...

drs305
March 16th, 2010, 02:15 PM
So you can currently boot into Windows but not Ubuntu?

Let's start by looking at the state of your machine. Please run meierfra.'s boot info script. Place the results between the code tags generated by clicking on the post menu's # icon.
http://bootinfoscript.sourceforge.net/

jedimattk
March 16th, 2010, 02:49 PM
Actually, what I really want to know is how to access my home folders from the live CD. That way I can just copy them over to my Windows partition without ever entering my existing Linux install, and erase the Linux partition afterwards with no regrets.

I've found a tutorial in the archives of this forum that suggests I need to create another mount point and mount my partition from that, and then use sudo to change all my file permissions. Supposedly after that I can copy them anywhere I want ... I'll report back here when I know the results.

leorolla
March 16th, 2010, 03:33 PM
What does GParted show when you boot from LiveCD?

You still see 71GB being used on your EXT4 partition?