0

I've backed up a Fedora 42 installation using tar, and now I am trying to restore the backup to a different drive on the same system, basically cloning the original installation. The original installation contains 3 partitions, ESP partition formatted as FAT16 with boot and esp flags, boot partition formatted as ext4 with bls_boot flag, and root partition formatted as btrfs with one subvolume named root.

I backed up each partition of the original installation to a separate .tar.xz archive, then I created identical partitions on a separate drive, set the appropriate flags on the ESP and boot partitions, created the root subvolume on the root partition, extracted my backup to the new partitions, replaced the old partitions' UUIDs with the corresponding UUID from the new partition in the files /boot/efi/EFI/fedora/grub.cfg, boot/grub2/grub.cfg and etc/fstab, and then I chrooted into the cloned system and re-generated initramfs using dracut.

All of this was done from a Fedora 42 KDE live ISO.

When I attempt to boot into the cloned system, I am able to get to the kernel selection screen, and after selecting a kernel, it tries to boot but stops with nothing but an underscore shown in the top left of my screen. Even if I remove the rhgb quiet flags from the command line, some text will show up when booting, then the text will disappear and it still gets stuck in the exact same place with the underscore on the top left of the screen and no messages shown anywhere.

What could be preventing the cloned system from booting? I am using Secure Boot, and the original system has the Nvidia graphics drivers installed, which required to manually enroll an MOK certificate. Could the issue be caused by the Nvidia drivers?

This is the exact procedure that I've followed to create the backups:

sudo mount -t btrfs -o subvol=root /dev/nvme0n1p6 /mnt sudo XZ_OPT=-9 tar --selinux --xattrs --xattrs-include='*.*' --numeric-owner --acls --preserve-permissions --same-owner --one-file-system --verbose --create --xz --file /run/media/liveuser/BackupPartition/root.tar.xz --directory /mnt . sudo umount /mnt sudo mount -t ext4 /dev/nvme0n1p5 /mnt sudo XZ_OPT=-9 tar --selinux --xattrs --xattrs-include='*.*' --numeric-owner --acls --preserve-permissions --same-owner --one-file-system --verbose --create --xz --file /run/media/liveuser/BackupPartition/boot.tar.xz --directory /mnt . sudo umount /mnt sudo mount -t vfat /dev/nvme0n1p4 /mnt sudo XZ_OPT=-9 tar --selinux --xattrs --xattrs-include='*.*' --numeric-owner --acls --preserve-permissions --same-owner --one-file-system --verbose --create --xz --file /run/media/liveuser/BackupPartition/ESP.tar.xz --directory /mnt . sudo umount /mnt 

And this is the exact procedure that I've followed to restore the backups to a new drive:

#create (vfat) ESP partition (/dev/sda3) set esp and boot flags #create (ext4) boot partition (/dev/sda4) set bls_boot flag #create (btrfs) root partition (/dev/sda5) sudo mount -t btrfs /dev/sda5 /mnt sudo btrfs subvolume create /mnt/root sudo umount /mnt sudo mount -t btrfs -o subvol=root /dev/sda5 /mnt sudo tar --selinux --xattrs --xattrs-include='*.*' --numeric-owner --acls --preserve-permissions --same-owner --verbose --extract --xz --file /run/media/liveuser/BackupPartition/root.tar.xz --directory /mnt sudo mount -t ext4 /dev/sda4 /mnt/boot sudo tar --selinux --xattrs --xattrs-include='*.*' --numeric-owner --acls --preserve-permissions --same-owner --verbose --extract --xz --file /run/media/liveuser/BackupPartition/boot.tar.xz --directory /mnt/boot sudo mount -t vfat /dev/sda3 /mnt/boot/efi sudo tar --selinux --xattrs --xattrs-include='*.*' --numeric-owner --acls --preserve-permissions --same-owner --verbose --extract --xz --file /run/media/liveuser/BackupPartition/ESP.tar.xz --directory /mnt/boot/efi #manually edit "/mnt/boot/efi/EFI/fedora/grub.cfg" and replace the old boot partition's UUID with the new boot partition's UUID. #manually edit "/mnt/boot/grub2/grub.cfg" and replace all three old UUIDs with the three new corresponding UUIDs. #manually edit "/mnt/etc/fstab" and replace all three old UUIDs with the three new corresponding UUIDs. sudo mount --bind /dev /mnt/dev sudo mount --bind /proc /mnt/proc sudo mount --bind /sys /mnt/sys sudo chroot /mnt dracut --force /boot/initramfs-6.15.9-201.fc42.x86_64.img 6.15.9-201.fc42.x86_64 dracut --force /boot/initramfs-0-rescue-d991a58fb3ad42c9b7679f82f8adc99a.img 6.15.9-201.fc42.x86_64 exit sudo umount -R /mnt 

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.