-
-
Notifications
You must be signed in to change notification settings - Fork 16.5k
nixos/console: start vconsole-setup service after local-fs.target #430883
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
base: master
Are you sure you want to change the base?
Conversation
This fixes the instances where the service might have trouble accessing custom fonts on disk. ``` May 17 19:48:23 Ainz-NIX systemd-vconsole-setup[901]: popen: /nix/store/hragmx5p3izmwinv4441hj5706sxy4xs-gzip-1.13/bin/gzip -d -c /etc/kbd/keymaps/i386/qwerty/us.map.gz: No such file or directory May 17 19:48:23 Ainz-NIX systemd-vconsole-setup[901]: popen: /nix/store/hragmx5p3izmwinv4441hj5706sxy4xs-gzip-1.13/bin/gzip -d -c /nix/store/bjzji701dz67bfrrwx9smqqyy1pnf2c9-kbd-2.6.4/share/keymaps/i386/qwerty/us.map.gz: No such file or directory May 17 19:48:23 Ainz-NIX systemd-vconsole-setup[901]: loadkeys: Unable to open file: us: No such file or directory May 17 19:48:22 Ainz-NIX systemd-vconsole-setup[832]: /nix/store/bjzji701dz67bfrrwx9smqqyy1pnf2c9-kbd-2.6.4/bin/loadkeys failed with exit status 1. May 17 19:48:22 Ainz-NIX systemd-vconsole-setup[832]: KD_FONT_OP_GET failed while trying to get the font metadata: Invalid argument May 17 19:48:22 Ainz-NIX systemd-vconsole-setup[832]: Fonts will not be copied to remaining consoles May 17 19:48:22 Ainz-NIX systemd[1]: systemd-vconsole-setup.service: Main process exited, code=exited, status=1/FAILURE May 17 19:48:22 Ainz-NIX systemd[1]: systemd-vconsole-setup.service: Failed with result 'exit-code'. ``` Fixes NixOS#312452
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/systemd-1-failed-to-start-virtual-console-setup/44798/8 |
@JaKooLit you may consider disabling the masking and use this fix in your configuration. |
Is this with
|
I don't think this is the correct fix. the whole point of This will break things like https://github.com/systemd/systemd/blob/948b186f46d338c9cb7932816f334fd85a4ea6dd/units/systemd-ask-password-console.service#L17 Could you please provide a minimal reproducer of the issue instead? I tried reproducing with copying from your config this:
but no luck. it just works for me 🤷 Are you doing anything in your setup related to Impermenance or having your |
I did reproduce it failing in the initrd with |
Thanks bro. Ill disable / remove once it is merged in upstream |
I do not have systemd initrd enabled as you can see in my configuration.
The log without systemd initrd is the same:
|
As far as I understand, the issue is nix store not being available at the time of this service starting. I am also using bcachefs if that's a factor. CC @ElvishJerricco who might have an idea about it. Though AFAIK @JaKooLit does not use bcachefs and this still happens to him (unless disabled by masking). |
@rnhmjoj No. but I have:
and have set |
Do the paths actually exist on disk? bcachefs is experimental. Maybe you have data loss? |
I wasn't using any fancy thing like bcachefs and I had the problem. |
Yes. The command if tried in a normal terminal passes.
I don't think this is a Bcachefs issue persay. Because people who don't use Bcachefs also encounter it. Bcachefs itself is almost stable, and is set to remove experimental flag in 6.18. |
I'm just gonna keep repeating myself.
Again please provide a minimal nixos config that reproduces the issue. I've tried to use the console config posted here but it doesn't reproduce for me. I can't help fix this until someone can share with me a reliable reproducer |
The thing is it is very hard to pinpoint what exactly is causing it. I might try removing console config then see if this issue persists, once I get home today. Pinging @poperigby @waffle8946 @fzakaria from the Discourse thread, would love to get a reproducible example config to know what exactly causing this. |
Did more testing.
still happens if I entirely delete my console font config: console.earlySetup = true;
# Console fonts
console = {
font = "ter-124b";
keyMap = "us";
packages = with pkgs; [
terminus_font
];
}; |
What doesn't make any sense, to me, is that it says a Nix store path doesn't exists: that can only mean that either /nix/store as a whole doesn't exist or the store is corrupted. If you are really not using the systemd initrd, and the error does not come from stage-1, and the store is not corrupted, well then there must be something really cursed with your filesystem or I'm out of ideas. |
I tried removing my entire font config to see if it was affecting it. No luck, still happens. Removing pieces from configurations isn't really the best way to test this. Any lead on this would be helpful. |
@arianvp you sure? I am not sure about how this works in detail, but I assume How can we even access the fonts? like the way it is trying to access it here?
|
From:
All I can deduce from this log is Might be interesting:
and
|
|
As I said before, this does not make sense: the purpose of stage-1 is to mount the root (and whatever contains
These again suggest that your root file system is broken; not very surprising if you're using an experimental one. Anyway, whatever your issue is, systemd-vconsole-setup is not at fault: you're having the same error in unrelated services, and services can assume the root file system to exist when they're started. Also, systemd-vconsole-setup is a base systemd unit, used unmodified in NixOS. If you think its implementation is incorrect you should report this to systemd upstream. |
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.
As others have said, it is not possible to make it to stage 2 without the store already being fully mounted. So that's most certainly not the issue.
May 17 19:48:23 Ainz-NIX systemd-vconsole-setup[901]: popen: /nix/store/hragmx5p3izmwinv4441hj5706sxy4xs-gzip-1.13/bin/gzip -d -c /etc/kbd/keymaps/i386/qwerty/us.map.gz: No such file or directory
May 17 19:48:23 Ainz-NIX systemd-vconsole-setup[901]: popen: /nix/store/hragmx5p3izmwinv4441hj5706sxy4xs-gzip-1.13/bin/gzip -d -c /nix/store/bjzji701dz67bfrrwx9smqqyy1pnf2c9-kbd-2.6.4/share/keymaps/i386/qwerty/us.map.gz: No such file or directory
May 17 19:48:23 Ainz-NIX systemd-vconsole-setup[901]: loadkeys: Unable to open file: us: No such file or directory
In fact, this is deeply suspicious. /etc/kbd/keymaps/i386/qwerty/us.map.gz
certainly should exist. And before anyone asks, yes, /etc
is also mounted in stage 1 if it's a separate mountpoint, and /etc
is setup by the activation script before stage 2 as well. So something really fishy here. Certainly, the currently proposed fix is not an answer.
@rnhmjoj I believe these are normal. |
All I can say based on the collective reports is this isn't exclusive to Bcachefs nor every Bcachefs user experiences this. I don't know if we can proceed here unless anyone else provides logs. What triggers me is that NixOS is reproducible, and this behaviour is very deterministic with certain set of users/machine, perhaps the hardware (or hardware nixos configuration) is at play here. |
@JohnRTitor I think you need to figure out |
Looks like it works now for some reason... |
This fixes the instances where the service might have trouble accessing custom fonts on disk.
Fixes #312452
Suggested by @fzakaria on Discourse.
With this fix applied:
Things done
Add a 👍 reaction to pull requests you find important.