-
Notifications
You must be signed in to change notification settings - Fork 345
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
Disable systemd-boot on live media #5172
Conversation
/kickstart-test --testtype smoke |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First commit is OK.
Second commit needs more discussion, I think. There's a bit of a problem, in that sdboot
can be selected on live by using kickstart... Which is not a thing that would be really supported in the future. So, perhaps it's actually ok, because the whole scheme will need to be revisited anyway.
Generally speaking, the error should be happening at different time of the installation process. We know we're on live and what the "inputs" are, so we don't have to wait until installation time. We can act on the problem as soon as we have the data, either on setting the default bootloader from conf, or when processing the kickstart.
However, I think this might be actually good enough. Check my logic please?
The options here are:
- Selected via kickstart on live = unsupported = hard error too late is somewhat admissible in unsupported state
- Selected via config file on live = supported, BUT conf and media type is known in advance, so the media author knows they are creating an impossible combination = hard error late is sort-of ok too, this should come up when testing the media before circulation
- If sdboot starts being supported on live, the error is no longer happening, so does not matter.
These would manifest as D-Bus errors that bubble up from there via BTW, there was originally some discussion about "known errors" and "unknown errors". This sounds like a known error, but does not behave like one - it's raised at install time, even if it's known in advance. I'm not too sure if there is an existing better place to plug this, though... |
One more thought is that we might want to fall back to grub instead. But I'm not sure if it does any good. Personally I'm ignorant of situations where sdboot would be desired, unsupported, and selected, unless the user is a hardcore tester / power user and intentionally chooses to do this. But in such case, the experience does not have to be polished at cost of additional code complexity. |
@poncovka I'd appreciate any thoughts about
|
@jlinton Do you have a screenshot of the error in the old UI? There are multiple error handlers and I am not sure which one you mean. Or if you could just point us at the place in the code where you tried to raise the error. |
Some background. This is not exactly about support, but about missing installation dependencies of the selected bootloader. While are able to verify these kind of dependencies for RPM installations, we never had time to implement support for other types of payloads like live images and rpm ostree. Btw, these checks are also done during the installation process, so I wouldn't worry about that too much. |
IMHO, its better to simply stop the install if inst.sdboot/etc is selected against a live image that already has grub rather than (silently?) falling back to grub. That way the user isn't surprised when the machine boots with grub. |
Screen shot of what the above change looks like with the graphical UI. Or where I was trying to handle the error before the current PR? I tried a couple of places, one of the nicer ones was just in the init routine of SystemdBoot() that one IIRC just reset the webUI into an infinite loop. |
07e49a1
to
3874ce5
Compare
I think that at this point we should try solve this issue wrt to GUI and then later (at a separte issue) look at how the solution works with WebUI and think if/how we should handle this and similar cases. I've got a feeling that including WebUI into considerations now could make resolution of the issue too complicated. |
Well, AFAIK its only really an issue on the live media (webUI) and OStree, which needs another fix. I would like to get the btrfs fix in place because that will allow everything media to work out of the box, rather than requiring an alternate FS, or user interaction during the boot? Should I split these to commits so the first one can land sooner? |
Yeah, that sounds like a good idea :-) |
3874ce5
to
7a0e5cb
Compare
Moved systemd/btrfs commit to #5194 and rebased. |
Uh, this isn't any better with the latest f39 builds, I rebased to those and it fires too early too, and doesn't get caught properly. |
Ok, so I moved into an overridden is_valid_stage1_device() and that sorta works, but is ugly too. The storage config gets an error, so if you go into the storage config, and click the not obvious link to see what the error is, it give a couple pages of the error message about systemd-boot not being supported on live media. |
7a0e5cb
to
0f79309
Compare
Live images are already installed with grub2 and cannot be changed on the fly to systemd-boot (well at least without a lot of extra work). In case the user passed one of the systemd-boot options to anaconda, we should be a bit more graceful than failing to run the updateloader entries script as currently happens. This change, when run on non webUI installs results in a popup notifying the user there is an error in the bootloader configuration and asking if they would like to ignore it. Resolves: 2234638 Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
0f79309
to
8626d88
Compare
Also, should I create a separate PR for the f39 branch (once this is merged), or can you guys merge this commit to both branches? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since master now is defaulting to the new Web UI (see new Fedora rawhide anaconda UI) this needs to be re-tested on the new UI.
I will try if I can test this.
|
||
def is_valid_stage1_device(self, device, early=False): | ||
valid = True | ||
if conf.system.provides_liveuser: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, we should probably make the special casing include also ostree based installations. However, I fear the logic needs to change a bit more thanks to that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's more correct then to check the payload type? If the payload type is DNF then all good, otherwise error out.
/build-image --live --webui |
Images built based on commit 8626d88:
Download the images from the bottom of the job status page. |
I'm frankly having second thoughts about disabling this. I've been building systemd-boot live media (in various states of functionality but its getting closer AFAIK). So, really it doesn't look like a huge lift to create live systemd-boot media. But it does require dedicated images (rather than a single ex workstation image that can flip between bootloaders). Right now I have a fedora-live-systemd.ks that builds live media with systemd-boot where the intention is to install that to to the end machine with systemd-boot. Meaning, if/when that gets cleaned up this code should be detecting whether the final media is a systemd-boot or grub before making the decision to complain about it. And I expect its going to be a similar situation for ostree too. |
I'm thinking about, but haven't yet managed to test, the idea that instead of aborting on live media installs/etc it only aborts if it is running from the live media and it can't find updateloaderentries, although maybe a better plan is actually to query something in systemd-boot itself, but i'm not yet sure what a good "is this image systemd-boot" flag is, short of actually checking to see if it exists in the ESP. |
@jlinton I have opened a new pull request with an alternative solution. The team would like to get it to Fedora 39 soon. Can you look at it, please? The idea is to support only payloads where we are able to verify the systemd-boot requirements. At this moment, that's only the package installation. The check can be eventually extended to support other types of payloads. #5297 |
@poncovka as the alternative is merged, should this be closed? |
Why not, i'm closing it. |
This fixes https://bugzilla.redhat.com/show_bug.cgi?id=2237327, by adding the btrfs subvolumes like zipl and extlinux to the systemd-boot strings. Grub has special cased this in grub-tools, otherwise a better fix would have been to get the btrfs subvolume boot string into boot_args when BTRFS was selected rather than depending on each bootloader to discover and fix them up.It also partially fixes https://bugzilla.redhat.com/show_bug.cgi?id=2234638 by providing a nicer message on live installs. This fix isn't ideal because 1: The webui apparently doesn't have a way to actually display storage/bootloader errors like the old anaconda UI does. 2: Its a bit later in the installation than I would have liked, but moving it earlier tends to blow up the webUI in even less ideal ways.
Suggestions are welcome...