Link to home
Start Free TrialLog in
Avatar of rjsurati
rjsurati

asked on

shrinking a partition with parted

I want to shrink a linux ext3 partition and use the new space for a fat32 partition.

So I downloaded a linux CD.
I boot with the CD, and ran parted off the CD.
I typed "print". The logical partition in question goes from 23GB to 39GB. It is partition number 6, ext3.
                       I have about 4.5 GB of data on the partition.
I typed "resize 6 23GB 30GB".
The system does a bunch of work and eventually finishes and gives me a parted prompt.
I type "print" -- there is no change in the table. (Why not?)
I type "mkpts fat32 30GB 39GB". It asks if I want a logical/primary partition. I say logical. It asks for the 30GB and 39GB numbers again -- which is strange. It then says that I cannot have overlapping partitions.

It, of course, says this because the old partition still seems to have the same size. Did I miss something? What am I doing wrong -- or what step did I miss? Do I have to delete the old partition? I'd prefer not to screw over my linux partition.
ASKER CERTIFIED SOLUTION
Avatar of rindi
rindi
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rjsurati
rjsurati

ASKER

Par your suggestion, I grabbed a knoppix CD. I believe it is version 4.0

It can mount /dev/hda6 with no problem.
 But fdisk and parted and qtparted do not know that /dev/hda exists.

Any thoughts?
Are you root and is the partition unmounted?
I am root. I unmounted all the partitions for /dev/hda.

fdisk /dev/hda yielded the error message that /dev/hda does not exist.

parted and qparted don't seem to know about /dev/hda either.

The drive is a standard laptop drive, I presume IDE.
With the disk you are looking to resize partitions on mounted, type in:
cat /proc/partitions
I'm curious to know what it says about /dev/hda.

So, originally you were able to 'fdisk /dev/hda' and get partition info, and now you aren't?  What has changed since the first time you ran fdisk?  
I think the error with knoppix was my fault.  I may not have been root in the window that I was running parted.

I tried again, su-ing to root first in the correct window. It worked with no problem. And, parted worked just fine.

Thanks for the suggestion on knoppix.
By the way, qtparted crashed on me. But, parted worked just fine.
your welcome