GParted - Can't move partition

Hi!

I’d like to move sda2 to the end of the free space, preserving its size of 767 MB.
Then I’d like to expand sda1 to take up all the free space.

However it won’t let me change the preceding space at all.
Last time I expanded this very same machine I used gparted and had no issues, but now it just doesn’t want to comply.

Any suggestions?

Thanks!

1 Like

Are you using linux install on the hard drive or are you using live linux?

Also, since sda5 is the only extended partition under sda2, and it is a swap partition, you should be able to totally remove sda2(remove it from fstab first and reboot), extend sda1, then recreate sda2(and add it back into fstab and mount it)

2 Likes

Using a GParted Live ISO.

Right now trying what you just suggested, getting rid of the ext/swap and just recreating it afterwards. As you say shouldn’t mess up anything, it’s just swap.

1 Like

It worked! Thanks!

Now I feel like “that guy” asking a question without trying first, oh my… I’ll hide in a corner and look embaressed.

2 Likes

Thanks for the solution :slight_smile:

I think it was because it was an extended partition, which do not like to be changed.

2 Likes

sda1 is the primary boot partition in which the os installs, sda 2 being the swap partition is only used as overflow of ram in larger data processes
creating sda3 and making its mount point as home , this partition is where the os will store your files and you can make that the remainder of your drive size.

dont feel embarrassed about asking question (you ask them because you want to learn)

1 Like

Thanks!
I felt a bit embarrassed because I could have spent a few extra minutes instead of resorting to ask right away.
I knew that the end result I wanted to achieve was technically totally fine/possible so it confused me GParted wouldn’t just let me.

At home I have Arch setup with encrypted boot, the LUKS header and key on a USB stick for proper plausible deniability and everything setup the good old manual way in CLI with parted and cryptsetup. But when dealing with a server in a business environment (as in this case) I do get slightly tempted by a neat GUI tool to avoid any trouble I could potentially cause, lol.

Should actually try to duplicate the VM and see if I’m allowed to change the start and end of the existing partitions when not using the GUI. Hmm…