How to resize extended partition?

1

I have primary partition with Windows XP on it. Also I have extended partition divided into 3 logical partitions: - Drive D: for Windows - Ext4 Linux System - Swap

Now, Linux is my main system, and I'd like to have Ext4 partition the largest, so I want to make windows partitions smaller, and ext4 larger.

Here is my structure:

Model: ATA ST3320613AS (scsi)
Disk /dev/sda: 320073MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start     End       Size      Type      File system     Flags
 1      0.03MB    104856MB  104856MB  primary   ntfs            boot
 2      104856MB  320073MB  215217MB  extended                  lba
 5      104856MB  209712MB  104856MB  logical   ntfs
 6      209712MB  318014MB  108302MB  logical   ext4
 7      318014MB  320073MB  2058MB    logical   linux-swap(v1)

If I free some space (for example 50Gb) from sda1 (primary ntfs), I will have 50Gb free, but gparted doesn't allow to resize sda2 partition. So I can't give this 50Gb to other partition.

I ask for a piece of advice - how to part my HD. I need to take 50Gb from both of windows partitions, and these 100Gb give to ext4 partition.

Larry Cinnabar

Posted 2012-11-02T09:41:36.950

Reputation: 263

Answers

1

Are you doing this from your Linux OS or from a Live CD? Typically gparted does not let you do major changes to partitions until they are unmounted.

If this is the issue, a Live CD usage should let you resize the extended partition, move the ntfs one and then resize the ext4 one.

Karthik T

Posted 2012-11-02T09:41:36.950

Reputation: 2 654

I'm trying to do it from Live Linux Mint (from USB pendrive) – Larry Cinnabar – 2012-11-02T10:11:19.167

in that case can you elabourate what sort of error are you getting when you try to expand sda2? – Karthik T – 2012-11-02T11:03:45.157

I've tried another LiveCD and it's OK this time. It was no error, expanding was locked option of partition – Larry Cinnabar – 2012-11-02T12:58:55.077

0

This can happen even when booting from a USB drive because the swap partition within the extended partition you're trying to move is active as shown under Partition -> Information. To deactivate it, select it and click Swapoff in the Partition menu.

user1318499

Posted 2012-11-02T09:41:36.950

Reputation: 101