On 7/31/21 1:16 PM, Sreyan Chakravarty wrote:
Hi, I am trying to change my root partition from BTRFS to EXT4, but I am looking for ways to do it without a full reinstall of the OS. Any suggestions?
In theory any Linux installation can be copied over to a new partitions and work. Best way is to do everything while booted from an independent disk (USB live image or something like that). You will need an additional disk to be able to "park the data and copy them back": for example, copy to your external disk, then repartition/reformat the first disk and copy data back. Things to be careful: - do a "good" copy which includes all additional metadata: "cp -a" or "rsync -aHAX --numeric-ids" or "tar -C /source --numeric-owner c|tar -C /dst --numeric-owner xv" - the UUID of the filesystem will change, either you manage to have the old value on the new filesystem ("mkfs.ext4 -U", "tune2fs -U"), or you have to change /etc/fstab and possibly the kernel cmdline that specifies the root filesystem - be sure all your grub pieces are ok (but you shouldn't' have reformatted the /boot partition) - watch out: your existing initrd may be missing the ext4 kernel module and be unable to find your root partition (happened to me when switching a RHEL8 from xfs to ext4); better try to regenerate the initrd including ext4 before starting the migration It is not easy, but it can be done. You have to be skilled with things like dracut, grub, chroot. Otherwise, trust some tool that claims to do everything for you easily. Regards. -- Roberto Ragusa mail at robertoragusa.it _______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure