Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

Thanks!!

share|improve this question

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

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

add comment

2 Answers 2

up vote 2 down vote accepted

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.

share|improve this answer
add comment

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.

share|improve this answer
    
I cannot Resize/Move /dev/sda5 or /dev/sda4. The button is not active for them –  Moiz Jan 27 '13 at 4:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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