This is an external ssd, so I’m not super worried about things going wrong.

  • NaibofTabr@infosec.pub
    link
    fedilink
    English
    arrow-up
    8
    ·
    edit-2
    10 days ago

    Move the NTFS partitions, one at a time, toward the end of the drive. Let gparted complete each operation seperately. When you’re done you should have all the NTFS partitions stacked at the back end of the drive but without having to change their UUID and sda#. Moving the 160G partition will take awhile, but just be patient, make sure the power doesn’t fail and the drive is securely connected and won’t get bumped during the operation, and let it do its thing. Then you can simply expand the ext4 partition into the newly available space ahead of the NTFS partitions.

    Gparted is the only partition editor I’ve ever used that has successfully moved NTFS partitions on a drive without breaking a Windows install. I’m convinced it’s the best out there, I always keep a live image of it around. It’s an essential tool. I’ve done this exact thing to rearrange partitions on a dual-boot system, though it was a significantly smaller drive.

    *edit: this is an external SSD, so do you actually boot from it? If not and you just want to keep the data on the Windows partition, you can just delete the other smaller NTFS partitions.

    You can definitely just delete the linux-swap and create a new one wherever it’s convenient.

      • NaibofTabr@infosec.pub
        link
        fedilink
        English
        arrow-up
        2
        arrow-down
        1
        ·
        10 days ago

        Is this your first time using gparted?

        Here’s an example with pictures:

        https://gparted.org/display-doc.php?name=moving-space-between-partitions

        Basically you’re going to select the partition, then click Resize/Move and then drag the end of the partition all the way to the right and then the beginning of the partition as far to the right as you want (the final size of the partition does not have to stay exactly the same as it is now, but dont squash them down to exactly the size of the data that’s currently in the partition, leave some extra space).

        The difference between this example and your situation is that your partitions are not inside of an extended partition (yours are all primary partitions). This doesn’t matter, you only need to worry about moving the start and end points of each primary partition.

        Start with the partition that is furthest to the right.

  • Jaffa@lemm.ee
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    10 days ago

    Looks like you need to delete the swap partition between them. If you are using it you can turn it off in the os it is being used and then recreate it afterwards.

    Edit - I see now that the partition you are talking about is not even pictured in the image at the top and there are lots more partitions between them. While I think it is possible to move partitions I can’t tell you how. The drive is a bit of a mess though, maybe consider getting another one and moving some of the stuff off it?

  • comador @lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    10 days ago

    copy the contents of that 296GB partition somewhere, delete the entire hda9 and recreate it, hopefully sucking ouo those spare 2+1MB, then copying the data back.

    You have too many partitions to begin with though and beyond that, those 3MB may be just outside of alignment with the other partions, meaning you may not be able to reclaim them.

    Regardless, it’s 3MB, not a big deal.

    • Interstellar_1@lemmy.blahaj.zoneOP
      link
      fedilink
      arrow-up
      3
      ·
      10 days ago

      I can’t tell, but are you assuming I’m talking about the 3MB of unallocated space around the highlighted partition? because I’m not, I’m referring to the large allocated space at the right side of the drive.

      • HorseChandelier@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        10 days ago

        Copying all the data elsewhere and re-partition is still the right answer…

        You could possibly get away with copying the data out of the last partition, deleting the last 3 and extending the other one then copying the data back but, as others have said, you seem to have rather too many partitions.

        ETA: there is no way to merge ntfs and ext4 partitions anyway - even without the intervening partitions that are present here. Copy, destroy extend is the only way.

  • serenissi@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    10 days ago

    Certainly you can move the partitions to do that. But you can also make a dm-linear (lvm) volume out of both partitions and use that. On ssd there won’t be any performance impact.

  • verdigris@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    10 days ago

    Are you just taking about the 1mb? If so I’d just leave it, it’s common to leave some buffer space at the start and/or end of a block device.