Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
HanabishiRecca opened this issue Jul 15, 2023 · 17 comments
Closed
Labels
bug Our bugs

Comments

@HanabishiRecca
Copy link

HanabishiRecca commented Jul 15, 2023

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 systemd/systemd@dfca558 is the cause. But not sure.

@HanabishiRecca HanabishiRecca added the bug Our bugs label Jul 15, 2023
@freswa
Copy link

freswa commented Jul 16, 2023

Same issue. Bisected to systemd/systemd@dfca558.
I guess also systemd/systemd@2afeaf1 is involved since that is the new code.

@HanabishiRecca
Copy link
Author

Related: #2275

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

@aafeijoo-suse
Copy link
Member

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
Copy link

freswa commented Jul 17, 2023

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

@aafeijoo-suse
Copy link
Member

@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
Copy link
Author

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

@HanabishiRecca HanabishiRecca changed the title Broken unified kernel images with systemd 254 dracut 059 produces broken unified kernel images with systemd 254 Jul 17, 2023
@Mithras
Copy link

Mithras commented Aug 2, 2023

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
Copy link

kode54 commented Aug 2, 2023

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

@EugeneKorshenko
Copy link

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
Copy link

kode54 commented Aug 2, 2023

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

@freswa
Copy link

freswa commented Aug 2, 2023

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

@Mithras
Copy link

Mithras commented Aug 2, 2023

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.

brandsimon added a commit to brandsimon/verity-squash-root that referenced this issue Aug 2, 2023
systemd 254 changed the efistub, the hardcoded offsets are wrong with
the new efistub.

See:
dracutdevs/dracut#2431
systemd/systemd@0fa2cac#commitcomment-76747223
brandsimon added a commit to brandsimon/verity-squash-root that referenced this issue Aug 2, 2023
systemd 254 changed the efistub, the hardcoded offsets are wrong with
the new efistub.

See:
dracutdevs/dracut#2431
systemd/systemd@0fa2cac#commitcomment-76747223
brandsimon added a commit to brandsimon/verity-squash-root that referenced this issue Aug 2, 2023
systemd 254 changed the efistub, the hardcoded offsets are wrong with
the new efistub.

See:
dracutdevs/dracut#2431
systemd/systemd@0fa2cac#commitcomment-76747223
@AsciiWolf
Copy link

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

@Mithras
Copy link

Mithras commented Oct 7, 2023

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

@thesamesam
Copy link
Contributor

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
Copy link
Member

@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
Copy link
Collaborator

LaszloGombos commented Oct 10, 2023

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 #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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Our bugs
Projects
None yet
Development

No branches or pull requests

9 participants