Changing partition sizes

I would like to make my /home partition smaller and increase the size of my root partition. I’ve downloaded gparted but I’m struggling to work out how to do it. As it stands my root partition is sdb4 and my home is sdb6. Both are primary partitions. If I try to shrink sdb6, I get an unallocated space after (below in the partition table on gparted) but I seem unable to move this to sdb4.

Can anyone explain how to do this for me please?

Many thanks

At least show what you have so that everybody knows what we are talking about

su -l -c 'fdisk -l'

Thanks, I’ll get the output for that posted up tomorrow as I’m away from the PC at the moment!

Cheers :slight_smile:

It is tricky because partitions must be continues. By the numbers you state there is a partition between Root and home that has to be moved. When resizing only the END PONT changes You can move then expand.

Be sure that the gparted disk supports BTRFS also it can not reduce the size less then the amount of data on the partition

Hi, after entering the command I’ve got the output and have just copied that for the hard drive I’m interested in altering

Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: D201BCF7-38D9-4E87-823F-8C2DB274D52C

Device ** Start** ** End** ** Sectors** ** Size** Type
/dev/sdb1 34 262177 262144 128M Microsoft reserved
/dev/sdb2 264192 631155681 630891490 300.9G Microsoft basic data
/dev/sdb3 651636736 655837183 4200448 2G Microsoft basic data
/dev/sdb4 655837184 697782271 41945088 20G Microsoft basic data
/dev/sdb5 698103808 740050943 41947136 20G EFI System
/dev/sdb6 740050944 1953523711 1213472768 578.6G Microsoft basic data

Partition 1 does not start on physical sector boundary.

You can see sdb6 is 578.6GB and my root partition is 20GB which is sdb4. Oddly, it states this is Microsoft basic data…but it’s definitely my root partition and is btrfs. sdb5 is EFI boot.

Ultimately, I’d like to make the root partition 50gb and my home partition 548.6gb. Is this possible?

Many thanks for your help guys :slight_smile:

Ross

It is unclear to me how you ever got in this situation. Indeed sdb4 has the wrong type. I have never seen that an openSUSE installation did this in such a way. Also the installer will go for a default of 40 Gb for a btrfs root partition where you have only 20 Gb (the default for a non-btrfs root partition).

For your background information. You are using the words “primary partition”. “primary partition” has a special meaning in MBR partitioning. This disk uses GPT partitioning. and “primary partition” is not applicable wording. It only will confuse readers of your first post (one of the reasons why we ask you to post what the computer thinks you have and not what you think you have ;)).

As you can see for yourself (and was already explained for the most by gogalthorpe), you may have free space after sdb6, but you need it after sdb4. And that would mean “pushing” sdb5 and sdb6 further to the end of the disk. Now, from old experience (+40 years) I am very pessimistic about tools who claim that they can do such actions. Maybe to pessimistic (tools may be more trustworthy after this amount of time). I also do not know if e.g. gparted (or another tool) claims that they can do this. So better wait for people with more experience in this tricky field. In any case: make extra backups before you do anything (but that is of course very clear to you).

Thanks for that. I am not sure how this happened. I may end up doing a fresh install after backing everything up, and leaving my windows drive untouched, I can delete/format the root partitions and my home partition and start from scratch. My only concern, however, would be losing my dual boot function?

Thanks.

I’vejustdone

I’ve just done a fresh install. Deleted both sdb4 and sdb6, created a 50GB partition for root (automatically names sdb4) and then made my home partition (automatically names sdb6) and sdb5 (boot) remained as it was, and I have dual boot ability. It did mean formatting my /home partition (well, deleting it and creating another) so need to get all my data back on there. I also increased my SWAP partition size as well, no harm in doing so as I’ve so much space on my hard disks it’s not an issue (most of my stuff is on USB drives so don’t really use the internal drives).

I have got a few minor issues though which I’ll need to create another thread or 2 for but the partitions are all sorted…I didn’t want to delete sdb5 in case it messed up with my dual boot ability, but having a root partition of 50GB should be more than enough!

Many thanks for your help/support chaps!