Invalid root fs hooks in initramfs after cloning system
My aim is to be able to backup a running Fedora system to a separate hard disk and be able to boot it in case my current hard disk fails. I imagine using LVM2 to create snapshots, which I can backup while the system is running. My central problem is in reassigning the root system hooks for the backup system. I can edit /etc/fstab and the grub2 entry to use the backup logical volume, which works fine. The problem is that the cloned initramfs seems to still have invalid root fs hooks. Booting the backup will only work if the source hard drive is still operational. Otherwise I get: dracut-initqueue: /dev/[source] does not exist
while booting. I need to run dracut --regenerate-all --force
within the backup in order to untie it from the source. How can I achieve this without having to boot the backup first?
I found ties in the initramfs here: ./usr/lib/dracut/hooks/ ./etc/systemd/system/
Note that if I would get dracut to ignore the boot error this would actually suffice. I tested this by creating an empty dummy filesystem with the required id on the backup hard drive.