0
I have Debian Jessie 64bit and Windows 10 alongside and i want to increase root partition (in my configuration called sda5) size.
I installed gparted in version 0.19, but he doesn't allow me to change size of any partition.
I was trying to shrink home partition first and extend root it automatically sets previous value.
When i try to reduce size of single partition it automatically sets previous value. He shows that minimal value is equal to maximal.
Why gparted doesn't work?
I also tried to do this by command line:
fdisk -l
returns:
Disk /dev/sda: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 0AE14023-D392-11E6-8283-B4774F0AF981
Device Start End Sectors Size Type
/dev/sda1 2048 1845248 1843201 900M Windows recovery environment
/dev/sda2 1845249 2050049 204801 100M EFI System
/dev/sda3 2050050 2312194 262145 128M Microsoft reserved
/dev/sda4 2312195 332339202 330027008 157.4G Microsoft basic data
/dev/sda5 332341248 346011647 13670400 6.5G Linux filesystem
/dev/sda6 346011648 351870975 5859328 2.8G Linux filesystem
/dev/sda7 351870976 368355327 16484352 7.9G Linux swap
/dev/sda8 368355328 369135615 780288 381M Linux filesystem
/dev/sda9 369135616 500117503 130981888 62.5G Linux filesystem
I previously read that partitions must be continous. I want to increase root partition by 5GB from home partition. Do i need to change size of each partition beetween root (sda5) and home (sda9)?
I was also trying to remove swap partition basing on this post: https://askubuntu.com/questions/492054/how-to-extend-my-root-partition
but sudo resize2fs /dev/sda
doesn't increase size of root partion becase there is var partition beetween them. I created swap partition once again to restore previous state.
What should i do? Please help.
You can't grow a partition unless you have contiguous unallocated space after said partition. – None – 2017-11-21T21:34:46.503
So what you suggest? Should i remove /var and /swap partitions? But removal of /var partition by gparted ends with failure because disk was busy. What should i do? – domandinho – 2017-11-21T21:57:32.623
I don't. Honestly, your partitioning is absurd from the start and anything you need to do is risky. You'd need to
swapoff
, remove the swap partition (which is huge, BTW), resize (shrink) sda9, then move it all the way to the right, then also move sda6 and sda8 all the way to the right, then resize (grow) sda5 provisioning for a new swap, create the new swap in the remaining free space and finally boot (if it boots with all this done) and update fstab to reflect the new UUID for the new swap... – None – 2017-11-21T22:07:10.137It was created by choosing one of options in GUI during Debian installation. I didn't perform any partition changes during installation – domandinho – 2017-11-22T12:18:03.123
The defaults aren't always the best option, just the more convenient. That explains the huge swap and the separated
/var
and/tmp
(both can be under/
. I don't know what criteria Debian installer has for making such small/
and give the rest to/home
(as above, having it in a separated partition isn't a requirement; useful if reinstalling while keeping the user files and settings but not mandatory) though but I guess it must have its reasons. Users can always use manual partitioning. – None – 2017-11-22T12:25:54.817can i remove /var first than remove swap than extend root partition and create smaller /var and smaller swap? when i tried to remove /var gparted says that this partition is busy – domandinho – 2017-11-22T12:28:48.143
That will break your system and managing partitions CAN'T be done from within the running system (partitions are in use). You must boot a live session and run GParted (or other) from there. If doable, deleting all those partitions and reinstall with your own partition schema is much easier. – None – 2017-11-22T12:41:32.983