#3152 Issue open: SLES15 SP5: Cannot create initrd (found no mkinitrd in the recreated system)

Labels: enhancement, bug

abbbi opened issue at 2024-02-12 13:30:

Rear 2.7

hi,

it appears that

finalize/SUSE_LINUX/i386/550_rebuild_initramfs.sh

makes use of the "mkinitrd" executable. This executable has been moved to a special package on SLES15 SP5 called
dracut-mkinitrd-deprecated, which seems to be optional and may not be existent on the system backed up.

In reality it seems this "mkinitrd" exectuable is just an wrapper shellscript to call dracut, see the following
discussion:

https://lists.opensuse.org/archives/list/factory@lists.opensuse.org/thread/WKZFPUPW3BQ4GYLI4HIWLJDWANUOBLIT/

However, as the executable may be missing, this can result in recovery to spoil:

2024-01-10 13:38:11.294431793 Running mkinitrd...
2024-01-10 13:38:11.298370613 WARNING:
Cannot create initrd (found no mkinitrd in the recreated system).
Check the recreated system (mounted at /mnt/local)
and decide yourself, whether the system will boot or not.

maybe it would make sense to implement an fall-back to dracut commands if mkinitrd is not available:

dracut -f --regenerate-all

pcahyna commented at 2024-02-12 13:37:

See https://github.com/rear/rear/pull/2825

abbbi commented at 2024-02-12 19:52:

@pcahyna thanks, it may make sense to either port these changes to the SUSE related parts too, or use common code base for this?

jsmeix commented at 2024-02-13 13:24:

I can reproduce it.

Running mkinitrd...
WARNING:
Cannot create initrd (found no mkinitrd in the recreated system).
Check the recreated system (mounted at /mnt/local)
and decide yourself, whether the system will boot or not.

Installing GRUB2 boot loader...
Determining where to install GRUB2 (no GRUB2_INSTALL_DEVICES specified)
Found possible boot disk /dev/vda - installing GRUB2 there

Nevertheless the recreated system boots well for me
as expected because I recreated on 100% compatible
replacement "hardware" (on a same VM) so the same initrd
from the original system should still work.

I will have a look how to solve it properly.

jsmeix commented at 2024-02-16 11:59:

@abbbi
could you please test if
https://github.com/rear/rear/pull/3155
also works for you?

In particular check your "rear -D recover" log file
for possible issues when dracut is run
and during reboot of the recreated system
for issues that could be related to the initrd.


[Export of Github issue for rear/rear.]