Resizing partitons is often not necessary. Use a symbolic link to relocate a subdirectory to another file system. For 99% of use cases this is indistinguishable from expanding the partition.
post
Safely is always a bit iffy when you're resizing partitions with data on them. Parted and various GUI tools built on top of it can resize partitions without losing data in most cases, but there is always a risk. I wouldn't like doing this without fresh backups.
You can unmount the home partition for resizing when you're not using it, e.g. if you log in as root, which typically has its home directory in /root. This would allow resizing it while running from your installed OS rather than a flash drive.
Doing anything with partitions safely means having a current backup of your disk.
What you want to do might be possible if your disk was set up with LVM, but I don't have too much experience with it. If you have a more traditional partitioning scheme, the problem is that you can't really shave off the front of the next partition if you want to expand /home to the right, and you can't tack free space to the front of a partition, if say, you shrink the partition to the left of /home.
If, for example, you want to expand /home into a partition on the right, you'd have to shrink that partition, back it up, delete the original, expand /home to the desired size, and copy the backed-up partition into its new, smaller place. If that other partition is not mounted, you could do the procedure without a live USB, if you insist.
I use GParted on a live CD/ISO for similar situations. I personally have never put my home directory on a separate partition, so I don’t know if this would somehow not work for you and I suggest backing up your data!
To do it on a live system, /home and the partition shrinking have to be neighbors, and the shrinking partition needs to be unmounted. I think it might be possible with resize2fs, but I don't have a guide.
This is one of the reasons I put /home on a separate ssd. If I want to upgrade, which has happened, I can just format the new one and copy my /home contents over preserving ownership and permissions, then it's as easy as changing fstab and rebooting. No headache, but keep your old drive around for a while unaltered just in case you find out the new one is faulty.
/ is also ssd (same drive as /boot/efi) and includes the rest of the standard locations. Anything beyond that can be ssd or hdd as speed isn't critical for longer storage.
Theoretically it can be done without a Live USB Stick. However you will probably be altering the partition table of the partition that is currently booted. If you fuck up, you will be left with an unusable system. Don't do it.
I'm pretty sure you're going to have to use a live USB. You can't modify a partition while it's mounted and you can't unmount a partition that's in use.
! thank you, but maybe you can tell me, how can I do it on a live system, please?
Use a live image with gparted (most normal distros come with it) start it and the gui should be pretty self explanatory.
Use cfdisk and just edit the partitions.
Please note that if you do this without first resizing the filesystems on the partitions, you are very likely to lose data. You cannot safely shrink a mounted partition.
Edit: oh you mean booted from external media, not an online system. Use gparted. https://gparted.org/
Don't do it on a live system.

all 20 comments