NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.15k stars 14.18k forks source link

Error during update: Failed to parse /etc/machine-info: Permission denied #301406

Open uzytkownik opened 7 months ago

uzytkownik commented 7 months ago

Describe the bug

During update there was an error:

updating systemd-boot from 255.2 to 255.4
Failed to parse /etc/machine-info: Permission denied
Traceback (most recent call last):
  File "/nix/store/lk7gv2jjaq6xllr9r6ks88hl2jnz5ba9-systemd-boot/bin/systemd-boot-builder", line 394, in <module>
    main()
  File "/nix/store/lk7gv2jjaq6xllr9r6ks88hl2jnz5ba9-systemd-boot/bin/systemd-boot-builder", line 377, in main
    install_bootloader(args)
  File "/nix/store/lk7gv2jjaq6xllr9r6ks88hl2jnz5ba9-systemd-boot/bin/systemd-boot-builder", line 315, in install_bootloader
    subprocess.check_call([f"{SYSTEMD}/bin/bootctl", f"--esp-path={EFI_SYS_MOUNT_POINT}"] + bootctl_flags + ["update"])
  File "/nix/store/gd3shnza1i50zn8zs04fa729ribr88m9-python3-3.11.8/lib/python3.11/subprocess.py", line 413, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/nix/store/4npvfi1zh3igsgglxqzwg0w7m2h7sr9b-systemd-255.4/bin/bootctl', '--esp-path=/boot', '--no-variables', 'update']' returned non-zero exit status 1.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Update nixos unstable

Expected behavior

Update finish without issue (e.g. file is autogenerated)

Notify maintainers

@flokli @Kloenk

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.22, NixOS, 24.05 (Uakari), 24.05pre604424.d8fe5e6c92d0`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.2`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a :+1: reaction to issues you find important.

winterqt commented 7 months ago

cc @NixOS/systemd

alyssais commented 2 months ago

I just encountered something similar. I think https://github.com/systemd/systemd/pull/34063 is the fix.