You are not logged in.
Hi, I recently installed Arch Linux, I wanted to leave a 50G partition to mount manually for encrypted files, but I forgot.
My current partition scheme is:
sda:
sda1 - boot
sda2 - swap
sda3 - root
Since I already configured Arch, I would like to not install it again.
My question is: is the following procedure going to work like nothing happend to the os?
- cp everything in root into an usb
- remove root partition, make 2 new partition (one is for root again)
- format root partiton
- cp everything back into root
- generate fstab
Last edited by mrbang20 (2022-01-24 18:16:55)
Offline
I just reduce the filesystem size on the root partition with 'btrfs filesystem resize' then use gdisk to delete the root partition and recreate it with a smaller size (matching the new filesystem size) using the same start sector. I've done it a few times now without any problems or need to reboot or edit fstab (which I don't have).
If you like GUIs then it could also be done with GParted (I think).
The only caveat would be the filesystem: for example, XFS doesn't allow for a reduction in size.
EDIT: having said that though a backup should be considered essential. And not just for operations like this
Last edited by Head_on_a_Stick (2022-01-20 17:11:28)
Jin, Jîyan, Azadî
Offline
You need to make sure your USB is a POSIX/linux file system as well, ideally the same as your root partition and then you can do something like: https://wiki.archlinux.org/title/Rsync# … tem_backup
That said if your goal is shrinking the root partition you can generally do that without data loss from a live disk (you should still have a backup in case something goes wrong but if it doesn't you can at least avoid an additional copy over). For ease of use I'd suggest you use a gparted live disk to do shrinking operations, if you want to do it manually you just need to shrink the filesystem and then the partition accordingly: https://wiki.archlinux.org/title/Parted … partitions
Offline