Skip to content

NixOS fails to install #34508

Closed
Closed

Description

@savorocks

Issue description

I want to install nixos on my Lenovo T420 laptop, and since my config always gets an error i tried the basic generated config, un-commenting the stuff that was there, no more and still getting the same error which is following:

Failed to create EFI Boot variable entry: No space left on device
Traceback (most recent call last):
  File "/nix/store/w3kckp1k7hngiadrcllybnji9nc8di25-systemd-boot-builder.py", line 102, in <module>
    subprocess.check_call(["/nix/store/mnbl0f66cykmwjin47r7rlnwwgiac7ys-systemd-231/bin/bootctl", "--path=/boot", "install"])
  File "/nix/store/ignn33dyacf5vm5hsmwiaj617226x1js-python-2.7.12/lib/python2.7/subprocess.py", line 541, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/nix/store/mnbl0f66cykmwjin47r7rlnwwgiac7ys-systemd-231/bin/bootctl', '--path=/boot', 'install']' returned non-zero exit status 1

Steps to reproduce

nixos-install (classic stuff before that, creating the partitions using gdisk, mounting the main partition on /mnt and efi boot partition on /mnt/boot)

Activity

  1. savorocks commented on Feb 2, 2018

    @savorocks
    Author

    The problem persists on Fujitsu Lifebook E754...

  2. erictapen commented on Feb 2, 2018

    @erictapen
    Member
  3. dtzWill commented on Feb 2, 2018

    @dtzWill
    Member

    Related, possibly helpful: #27821.

    Not sure if it'd result in the problems you're seeing, but make sure you're booting the install media with UEFI...

    What are the relevant configuration.nix options you're setting?

  4. savorocks commented on Feb 2, 2018

    @savorocks
    Author
    df
    \Filesystem     1K-blocks    Used Available Use% Mounted on
    devtmpfs          299840       0    299840   0% /dev
    tmpfs            2998400       0   2998400   0% /dev/shm
    tmpfs            1499200    6660   1492540   1% /run
    tmpfs            2998396  195368   2803028   7% /
    /dev/root        3922944 1492096   2430848  39% /iso
    /dev/loop0        891264  891264         0 100% /nix/.ro-store
    tmpfs            2998396  103816   2894580   4% /nix/.rw-store
    unionfs          3889660  995080   2894580  26% /nix/store
    tmpfs            2998396       0   2998396   0% /sys/fs/cgroup
    tmpfs             599676       4    599672   1% /run/user/0
    /dev/sda2       25671996 4545880  19799012  19% /mnt
    /dev/sda1         523248     176    523072   1% /mnt/boot
    
  5. savorocks commented on Feb 2, 2018

    @savorocks
    Author

    The config is nixos-generate-config for uefi installation and still fails.

  6. savorocks commented on Feb 2, 2018

    @savorocks
    Author

    I somehow managed to install default nixos generated config (without the kde desktop environment) from the 17.09 live cd (i previously tried with the older live cd 16.09). When I tried to install with the older live cd, I of course added a new nixos channel (either unstable or 17.03, from the current nixos manual) and then run nix-channel --update, but it failed every time.

    When I did that, I managed to boot into the installed system and ran nixos-rebuild switch without problems. So I guess this is kind of an ad-hoc solution...

  7. dtzWill commented on Feb 2, 2018

    @dtzWill
    Member
    • 17.09 is what NixOS manual would refer you to
    • While 16.09 is no longer supported, what you did generally does work although occasionally a newer installer is needed.

    Quick clarification, for posterity's sake if nothing else:

    Is it accurate that the problems occurred when using 16.09 installation media but did not occur (at all) using latest (17.09)?

  8. savorocks commented on Feb 2, 2018

    @savorocks
    Author

    They did occur using the latest live cd (17.09), but that's when trying to install my full config (which works on my other devices, so I don't think my config is the problem). I haven't tried installing basic nixos-generated config first with 17.09.

    The whole process went like this:

    -Downloaded the 17.09 graphical live cd, tried to install nixos with my config - failed.
    -Tried 16.09 graphical medium which I had lying around, tried to install my config - failed.
    -Tried to install nixos with default 16.09 nixos-generate-config configuration with everything uncommented except the kde desktop environment. Still failed.
    -Tried the 17.09 installation with nixos-generate-config, and uncommenting everything except the desktop environment - SUCCESS.
    -Once the install finished I booted it up, and proceeded to install my configuration and succeeded without problems.

  9. pbogdan commented on Feb 3, 2018

    @pbogdan
    Member

    @BjornMelgaard your error sounds like an instance of #27307

  10. pbogdan commented on Feb 3, 2018

    @pbogdan
    Member

    Correct, the issue I referenced hasn't been fixed as of yet, and AFAICT is present in both 17.09 and unstable ISO's..

  11. pbogdan commented on Feb 3, 2018

    @pbogdan
    Member

    AFAIK there is no good work around for that issue but assuming that is indeed the cause your options, as I understand it, are:

    • perform the installation using a minimal configuration, once the new system boots nixos-rebuild switch it with your full configuration..
    • assuming the full system configuration you are building may fit into memory (not sure how one would check it) remount the /nix/.rw-store so that it uses more RAM (by default it uses 50% I think). I think the right incantation to do that would be something like mount -o remount,size=7G /nix/.rw-store. You might be able to add swap to make it bigger than what would fit into RAM but I'm non 100% sure on that.
  12. zarkone commented on Mar 27, 2018

    @zarkone
    Contributor
  13. src386 commented on Mar 31, 2018

    @src386

    Same here...

  14. vcunat commented on Mar 31, 2018

    @vcunat
    Member

    Assuming your instances are caused by #27307, that should be fixed on 18.03. That is supposed to be officially released any day now (we're a little late), but it should be very well usable now if you want: https://nixos.org/channels/nixos-18.03

  15. sondr3 commented on Apr 10, 2018

    @sondr3
    Contributor

    I’m getting this issue right now when trying to install 18.03 sadly.

  16. wmertens commented on Apr 11, 2018

    @wmertens
    Contributor
  17. sondr3 commented on Apr 11, 2018

    @sondr3
    Contributor

    Just a follow up, setting boot.loader.efi.canTouchEfiVariables to false (I had mine as true) fixed the installation issue and then once NixOS has been installed you can set it back to true.

  18. wmertens commented on Apr 11, 2018

    @wmertens
    Contributor
  19. 7c6f434c commented on Apr 11, 2018

    @7c6f434c
    Member

    Well, if EFI setting storage is full (which happens)…

  20. sondr3 commented on Apr 11, 2018

    @sondr3
    Contributor

    Oh, sorry, I misread the top message. Mine was a very similar message, but /nix/.rw-store (or what the name is called) was what became filled up in my case, but in any case I did that and it worked. Not sure if it was related but in any case, it worked.

  21. jcrben commented on Apr 23, 2018

    @jcrben
    Contributor

    Just a follow up, setting boot.loader.efi.canTouchEfiVariables to false (I had mine as true) fixed the installation issue and then once NixOS has been installed you can set it back to true.

    @sondr3 thanks, that allowed me to install 18.03

  22. vcunat commented on Apr 23, 2018

    @vcunat
    Member

    I suppose you suffer from #38477 ?

  23. nixos-discourse commented on Jun 21, 2020

    @nixos-discourse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions