Skip to content

_get_boot_image_output_file_format_from_dracut_code() not compatible with dracut-ng #2918

@aafeijoo-suse

Description

@aafeijoo-suse

A few years ago I reported something similar (#2149), but this time the fix is not as easy as updating the regex pattern.

Since dracut-ng/dracut-ng@28820e2, the format of the initrd output file is set via configuration, so the code in dracut.sh changed from:

outfile="$dracutsysrootdir/boot/initramfs-${kernel}.img"

to:

outfile="${dracutsysrootdir-}/boot/$initrdname"

This $initrdname variable is defined in, for example:

I came across this issue while integrating dracut-ng in openSUSE, since _get_boot_image_output_file_format_from_dracut_code() returns None, all openQA tests involving MicroOS images had the initrd named initramfs-<kver>.img, that is, it's taking the content of the default_outfile_format variable:

default_outfile_format = 'initramfs-{kernel_version}.img'

While the initial image boots fine because kiwi also set grub entries using that initrd name, dracut generates new initrds using the configured $initrdname.

This issue is blocking the switch to dracut-ng in openSUSE.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions