You are not logged in.

#1 2024-05-28 07:55:13

marchbaby
Member
From: Kenitra,Morocco
Registered: 2024-05-28
Posts: 17

Partitioning

Hello guys I'm sorry if this is something you've got bored from but here is my question, I want to spare 100gb from my home partition to another new partition or just a free space how can I do that without damaging my system?
Thanks in advance;
I tried to boot from a live archlinux media and use cfdisk but when rebooting to my system I get an error and the home partition isn't mounted anymore.

Offline

#2 2024-05-28 08:13:26

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,224

Re: Partitioning

Rule N1 of partitioning and handling filesystems,  when shrinking, shrink the filesystem first then the partition, the reverse when growing.

You potentially broke your filesystem by resizing the partition first, "best" would be to try and restoring the partition size to the exact sector it used to have and seeing whether that already fixes things/lets you mount /home again. If you just hit free space it might be possible to simply resize2fs to the new partition size, but that's somewhat of a gamble. If you're not 100% sure of what you're doing, use a Gparted live disk and use Gparted, it makes the process visually trivial and does things in the correct order.

Offline

#3 2024-05-28 08:26:33

marchbaby
Member
From: Kenitra,Morocco
Registered: 2024-05-28
Posts: 17

Re: Partitioning

Thanks I'll try that

Offline

#4 2024-05-28 09:43:13

marchbaby
Member
From: Kenitra,Morocco
Registered: 2024-05-28
Posts: 17

Re: Partitioning

Thanks @V1del  it worked perfectly, appreciated but can you guide me through how to learn to do this process from the command line?

Offline

#5 2024-05-28 10:07:40

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,224

Re: Partitioning

https://wiki.archlinux.org/title/Parted … partitions has the general process (... the fact that this is under the parted article is somewhat unfortunate, as the actual filesystem resizing process depends on your filesystem, not the partitioning tool used to ultimately resize the parititon -- might be a relict from the time when parted could actually do both, resize the filesystem and the partition, but that got removed from parted ages ago). The important bit is that you  do things in the correct order and use the appropriate tool for what you want to do. When shrinking, filesystem resize tools first, then partitioning tools, when growing partitioning tools first, then filesystem tools to grow to the partition end.

Please mark as [SOLVED] by editing the title in your first post.

Offline

Board footer

Powered by FluxBB