I have a situation where I need to expand my Linux partition to a partition that is available above it.

I would like to use unallocated 93.31 GiB to expand /dev/sda5.

I'd appreciate any help.

Here is the screenshot to give you an overview of partitions. enter image description here


migrated from serverfault.com Jan 27 '13 at 7:38

This question came from our site for system and network administrators.


Partition /dev/sda4 is basically a holder for all the space allocated for an extended partition. Partitions sd5..sdn are allocated from this space. This was implemented a long time ago so that larger disks with more than four partitions could be accomodated. Thus your problem is to expand the expanded partition pool (sda4) and then you can expand the subpartitions. Since you are including an area ABOVE you'll be unable to save the partition data in the subpartitions.

Your question is YES you can expanded the extended partition, using the following process:

 0. remove /dev/sda5 and /dev/sda6 from /etc/fstab and reboot system
 1. delete /dev/sda6  
 2. delete /dev/sda5 (yes you will lose the filesystetm and information so backup)
 3. delete /dev/sda4
 4. Recreate /dev/sda4 with all the available disk including the currently unused space.
 5. recreate /dev/sda5 with the size that you want
 6. recreate /dev/sda6 with the size that you want and mark as swap
 7. reboot the system
 8. do mkswap on /dev/sda6
 9. mkfs -t ext3 on /dev/sda5
 10. mount /dev/sda5
 11. restore backup onto /dev/sda5
 11a. return /etc/fstab to include /dev/sda5 and /dev/sda6
 12. reboot the system to see if all works

That is what you need to do.


Click the Resize/Move button, which appears as an arrow pointing rightward at a vertical line. Then drag the partition to the left to use up the unallocated space. Then drag the right edge of the partition right to use up the entire space. Apply your changes and go have lunch.

  • I cannot Resize/Move /dev/sda5 or /dev/sda4. The button is not active for them – Moiz Jan 27 '13 at 4:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.