help on resizing partitions

user1 bqz69 at telia.com
Fri Dec 25 23:30:27 UTC 2009


On Fri, 25 Dec 2009 21:44:26 +0100, xPol wrote:

> I would like to resize three consecutive partitions, _without losing
> data_, by shrinking the one in the middle and enlarging the remaining
> ones. 

I do not think there is a tutorual.

Here is a quick one, examples only.

Please note that the order of partitions always should be, beginning at 1 
and ending at 18:
1 primary - ext3
2 primary - ext3
3 primary - ext3
4 extended
5....18 logical - ext3

Otherwise the partition table cannot cope

I only use ext3 format, and do not mix with ext4, as I have had problems 
with that.

Then I would take the last partition and resize to the size you want - i 
presume you have unused free space on the harddisk so you can increase 
the size.
Then I would backup that partition with dd command to an external 
harddisk.

Then I would do the same with the middle partition.

And then do the same with the first partition.

Then I would resize the internal harddisk with partitions of the sizes 
you have sitting on the external harddisk.

Then I would restore each of the 3 backups sitting on the external 
harddisk with the dd command back to their now resized partitions on the 
internal harddisk - partition one first, then partition two and then 
partition 3.

You can see how to do the dd backup/restore on www.minihowto.org

What you want to do is not really an exercise for beginners, I think, and 
not an exercise a lot of people often are doing.

I have never tried that, but I always make backup of my partitions using 
puppy and the dd command - puppy also have the gparted program installed.

I would use a puppy live cd for the dd operations, because it has a very 
easy to use interface (I find), and is very fast.

That is, you would have to download a puppy iso image (big file) and burn 
it into a live cd (I use k3b)

Download from here: http://www.puppylinux.com/download/

In order to backup partition 1:

dd if=/dev/sda1 of=/mnt/sdb1/backup1.img

In order to restore backup1.img onto partition 1:

dd if=/mnt/sdb1/backup1.img of=/dev/sda1

My partition size for my ubuntu is 30 gb, and takes about 30 minutes to 
backup/restore 







More information about the ubuntu-users mailing list