0

I know there are so many questions like mine but I just couldn't find out why my NTFS partition won't resize to take the unallocated space that is next to.

Here you can see my partition scheme

Screenshot of gparted

So I have

sda1 -> `/boot`
sda6 -> SWAP
sda7 -> `/`
sda8 -> `/home`
unallocated (7mb) *
sda5 -> this is the partition I want to extend
unallocated -> this is the unallocated space that I want to add to sda5

*(I don't care about this, but just to make it cleaner I would put it in /sda5 as well)

When I'm on live CD mode and try to expand the NTFS data partition it just won't do it. It is next to it right? I've seen many questions where the problem was that the partitions were not next to each other but in mine it should be okay I think.

Xubuntu 16.04 / laptop emachines D732 / 320GB HDD

  • maybe because you NTFS partition is a logical partition (not sure) – Sumeet Deshmukh Apr 24 '17 at 17:28
  • Did you unmount /dev/sda4 first? – M. Becerra Apr 24 '17 at 17:37
  • 3
    You have to expand the extended partition sda4 first, then expand sda5. sda5 is a logical partition which resides in the extended partition and can't use any space outside the extended partition. – mook765 Apr 24 '17 at 17:42
  • The issue was that when I went live CD my partitions were unmounted but the Swap slot had the key (I didn't see it first), so it was as easy as click "swapoff". Thanks a lot for your help. – kaenovsky Apr 24 '17 at 23:49
4

You need a live DVD/USB running gparted to do this since you have to unmount and resize /dev/sda4 first before you can expand /dev/sda5.

Once you have gparted running from a live environment, you should do the following:

  1. If the swap partition is mounted, unmount it by right clicking on it (swap) and choose swapoff.
  2. Right-click on /dev/sda4, choose resize, and expand /dev/sda4 to engulf the unallocated space. If you did it right, the unallocated space will show up inside /dev/sda4, just after /dev/sda5.
  3. Right-click on /dev/sda5, choose resize, and expand /dev/sda5. Leave the 7 MB space between /dev/sda5 and /dev/sda8 as is. See my note below.
  4. This is optional, but for completeness sake, you can right-click on the swap partition, and choose swapon. This will remount the swap partition.

Although this process won't entail moving data, it would still be a good idea to back up your data just in case something bad happens.

IMPORTANT NOTE: I would leave the 7 MB unallocated space as is if I were you because incorporating it into /dev/sda5 would require moving all the data from /dev/sda5 to the left. This is both time-consuming and risky.

  • That 7Mb is created on the fly and nothing to worry about (it is used as a border between 2 filesystems). – Rinzwind Apr 24 '17 at 17:53
  • Very good answer. But OP might want to expand sda8 instead. – Andrea Lazzarotto Apr 24 '17 at 18:03
  • Good answer, but there's no point to re-activating swap space (step #4) unless one intends to keep using the live environment for significant activities after resizing partitions. When you reboot into the regular installation, swap space should be re-activated whether or not it was used in the live environment. – Rod Smith Apr 24 '17 at 20:12
  • Thank you so much! The problem was the swapoff/on key. Now I got it just the way I wanted it. – kaenovsky Apr 24 '17 at 23:46

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.