SOLVED GParted question

Danbor

Active Member
Joined
Aug 1, 2023
Messages
222
Reaction score
113
Credits
2,420
I have a VirtualBox virtual machine running Debian Bookworm with a 20 GiB hard drive, ( I let the installer partition this drive ). After the last update it ran low on diskspace so I went into tools and made the drive 20 GiB larger. Then booted the GParted live CD to add the new space to sda1.
What I've ran into is that between sda1 and the new unallocated free space is sda2. Which is a 975 MiB extended partition that contains sda5 which is a 975 MiB swap.
No matter what I have tried, I cannot get sda2 to move. Whenever I try, all it wants to do is make sda2 20 GiB larger.
How do I move the dratted thing over so I can expand sda1 to encompass the new unallocated space?
I know in Mint a swap partition is no longer needed but I'm not sure Debian12 can run without one or not, so I'm not sure I can do without sda2 here.
Any thoughts? Suggestions?
 


Any thoughts?

Try it 'live'. Even though it's a VM, you can still opt to boot to an .iso image file. Either use an .iso that you already have, or download one and use that. I'd further suggest that, for simplicity's sake, you simply use the same .iso you already used to install the OS in the first place.
 
Thanks KGill. I'll give it a shot. Admittedly, I'm more familiar with Disks than GParted. Which is NOT to say I'm real familiar with Disks either, but I have used it more than GParted. ;)
 
Thanks KGill. I'll give it a shot. Admittedly, I'm more familiar with Disks than GParted. Which is NOT to say I'm real familiar with Disks either, but I have used it more than GParted. ;)

They both work similarly, but you can just install the one you like most in the live environment. It won't impact disk storage as it gets installed in virtual RAM. So, you can install software just like you can with a regular live environment.
 
IIRC, both gnome-disks and gparted should be on a Debian Live iso already.

A look at the menu will reveal. gparted for GParted, and Disks for gnome-disks.

HTH (and hope I am correct, lol).

Wizard
 
I'm going to mark this as solved. Disks didn't help me any more than GParted.
I cloned the macine, then booted the clone with GParted. Opened a terminal and ran "swapoff -a, deleted the swap partition and the extended partition. I then resized sda1 leaving 1000 MiB unallocated. Then created a swap partition in the unallocated space. Went back to the terminal and ran "swapon -a". Rebooted and it worked.
I don't know if that would work on an actual drive, but it worked in the virtual one.
 


Follow Linux.org

Members online


Top