dracutdevs / dracut

dracut the event driven initramfs infrastructure
https://github.com/dracutdevs/dracut/wiki
GNU General Public License v2.0
598 stars 397 forks source link

dracut 059 produces broken unified kernel images with systemd 254 #2431

Closed HanabishiRecca closed 1 year ago

HanabishiRecca commented 1 year ago

Describe the bug I am testing systemd v254-rc2 now and dracut generates broken unified kernel images (--uefi) with it.

Distribution used Arch Linux, testing repo

Dracut version 059

Init system systemd

To Reproduce

# dracut --uefi --kver 6.4.3-arch1-1 /boot/EFI/Linux/test.efi

No extra configuration. Prints such messages during build:

objcopy: /var/tmp/dracut.PzGAVA/uefi/linux.efi:.osrel: section below image base
objcopy: /var/tmp/dracut.PzGAVA/uefi/linux.efi:.linux: section below image base
objcopy: /var/tmp/dracut.PzGAVA/uefi/linux.efi:.initrd: section below image base

Dracut itself does not recognize it as an error and produces an image successfully:

dracut: *** Creating UEFI image file '/boot/EFI/Linux/test.efi' done ***

But systemd-boot fails to load the image:

Error loading \EFI\Linux\test.efi: Load error

Expected behavior Produced images should work.

Additional context I suspect https://github.com/systemd/systemd/commit/dfca5587cf2032f9ad06041b93b0da5cb39b9989 is the cause. But not sure.

freswa commented 1 year ago

Same issue. Bisected to https://github.com/systemd/systemd/commit/dfca5587cf2032f9ad06041b93b0da5cb39b9989. I guess also https://github.com/systemd/systemd/commit/2afeaf1675a6a68636be493a9461e72ce067db19 is involved since that is the new code.

HanabishiRecca commented 1 year ago

Related: https://github.com/dracutdevs/dracut/issues/2275

It is actually already fixed in https://github.com/dracutdevs/dracut/commit/f32e95bcadbc5158843530407adc1e7b700561b1. But the issue should remain open until the next release I think.

aafeijoo-suse commented 1 year ago

It is actually already fixed in f32e95b. But the issue should remain open until the next release I think.

Thanks for your feedback. If it's already fixed on the master branch, there is no need to keep this issue open.

freswa commented 1 year ago

@aafeijoo-suse Do you plan to release dracut 060 before systemd 254 hits the repos (an thus breaking dracut uki setups)?

aafeijoo-suse commented 1 year ago

@aafeijoo-suse Do you plan to release dracut 060 before systemd 254 hits the repos (an thus breaking dracut uki setups)?

The main purpose of the issue tracker is to reflect current upstream issues, when it's fixed, it's closed. It has nothing to do with the release process. I'm not an upstream admin, so I cannot create releases, and I'm afraid there won't be a 060 version any time soon. I'd recommend downstream maintainers (like myself) to backport the most important fixes to 059 before systemd-254 is released.

HanabishiRecca commented 1 year ago

Alternatively, you can pin the issue. Because this is fairly important information + to avoid duplicates when 254 will land.

Mithras commented 1 year ago

I've just got my system borked. Wasted 2 hours before I stumbled into this issue and rolled back systemd to 253. Updating arch right now means borked system for anybody using systemd + dracut + UKI

kode54 commented 1 year ago

Unless you use dracut-git from the AUR instead until 060 is released.

EugeneKorshenko commented 1 year ago

I've just got my system borked. Wasted 2 hours before I stumbled into this issue and rolled back systemd to 253. Updating arch right now means borked system for anybody using systemd + dracut + UKI

@Mithras I got into the same problem. Make sure you're not on dracut 059-2. Because the problem is gone when I upgraded dracut to 059-3.

kode54 commented 1 year ago

Oh, 059-3? Guess they pulled in another commit that hasn't made it to a release.

freswa commented 1 year ago

@kode54 I released the new pkg after seeing the first complains today. I hope we'll see a release soon.

Mithras commented 1 year ago

I've just got my system borked. Wasted 2 hours before I stumbled into this issue and rolled back systemd to 253. Updating arch right now means borked system for anybody using systemd + dracut + UKI

Can confirm that 59-3 works with systemd 254. Thank you! Related question: Is there a way to somehow test/validate UKI without rebooting? I want to add something like that to my pacman hook if possible.

AsciiWolf commented 11 months ago

@aafeijoo-suse Any chance a new version of dracut could be released with the fix for this issue included?

Mithras commented 11 months ago

Fixed version was released a few hours after the bug hit arch repos

thesamesam commented 11 months ago

Fixed version was released a few hours after the bug hit arch repos

No, not everybody uses Arch. There is no new official dracut release.

aafeijoo-suse commented 11 months ago

@aafeijoo-suse Any chance a new version of dracut could be released with the fix for this issue included?

Sorry, that doesn't depend on me.

LaszloGombos commented 11 months ago

I would encourage downstream Linux distributions to consider making downstream releases from git commits.

If you'd like to see a version bump and release notes in a git commit, please take a look at https://github.com/dracutdevs/dracut/pull/2509.

Github allows to download a tarball from any commit {sha} with the following link https://github.com/dracutdevs/dracut/archive/{sha}.tar.gz

Currently only Github project admins can tag git commits in this project. The current project admins are documented in the wiki - https://github.com/dracutdevs/dracut/wiki/Dracut-development