I have the following setup: enter image description here

sda7 is my /home (Linux Mint) that I want to merge with sda8 (which I cut out of Windows). I read here that I can't combine two partitions that are not adjacent and that they can't be both extended. Is this true? If so, should I convert one of them into something else? I have no option to drag any of them with a mouse.

  • Obviously two non-adjacent partition can't merge, that's a nature property derived from the data structure of partition table. But you might be able to merge two filesystems by overlayfs, tar the whole overlayfs to somewhere else, then make a new big enough ext4 filesystem, and untar files into it. Mar 31 '19 at 0:14
  • Do you have another drive, big enough to backup your home? If so, you might be able to backup your home, move sda5 and swap. Be aware that moving "/" comes with it's own set of problems, but nothing that can't be fixed. Space that will be freed after deleting sda8 is big enough for new copy of sda5, so you can do this one operation without risking data loss.
    – user224348
    Mar 31 '19 at 0:25

Here's a high-level overview for how to get some unallocated space you can use for sda7.

  1. Get the contents of sda8 and add them into sda7.
  2. Delete sda8.
  3. In the unallocated space where sda8 was, create a new Linux swap partition; The same size as the one you already have.
  4. Delete the "old" Linux swap partition, sda6.

That should allow you to drag sda5 and sda7 to the left, freeing up space after sda7. Then you can extend sda7 to consume the remaining free space.

  • Worked like a charm - I'm actually impressed about no booting issues since I had to move the left side of the /boot partition. Only problem now is that swap partition didn't really catch on - I have to swapon it manually every time - is there any fix for this? Mar 31 '19 at 11:12
  • I just replaced the UUID in fstab and it seems to work. Thanks a lot! Mar 31 '19 at 11:21

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.