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

NixOS fails to install #34508

Closed
savorocks opened this issue Feb 1, 2018 · 29 comments
Closed

NixOS fails to install #34508

savorocks opened this issue Feb 1, 2018 · 29 comments

Comments

@savorocks
Copy link

savorocks commented Feb 1, 2018

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)

@savorocks
Copy link
Author

The problem persists on Fujitsu Lifebook E754...

@erictapen
Copy link
Member

erictapen commented Feb 2, 2018 via email

@dtzWill
Copy link
Member

dtzWill commented Feb 2, 2018

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?

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

@savorocks
Copy link
Author

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

@savorocks
Copy link
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...

@dtzWill
Copy link
Member

dtzWill commented Feb 2, 2018

  • 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)?

@savorocks
Copy link
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.

@srghma
Copy link
Contributor

srghma commented Feb 3, 2018

have the same error using this steps https://github.com/BjornMelgaard/dotfiles#how-to-install-on-new-computer

$ nixos-install --root /mnt
....
cp: error writing '/nix/store/4x3gckrdpjfh65vi099x4gcj00kfwhwa-nvidia-x11-384.111/lib/libvdpau_nvidia.so.384.111': No space left on device
cp: error writing '/nix/store/4x3gckrdpjfh65vi099x4gcj00kfwhwa-nvidia-x11-384.111/lib/tls/libnvidia-tls.so.384.111': No space left on device
note: build failure may have been caused by lack of free disk space
builder for ‘/nix/store/kmy4wnzdqxbx4p09lm96myk035nav3vq-nvidia-x11-384.111.drv’ failed with exit code 1
building path(s) ‘/nix/store/6fypgi2p68asaqnm863d52dq1jcfkalp-opengl-drivers-32bit’
cannot build derivation ‘/nix/store/s4svfrqw2q18lf4pqlqsyw2mr5z24rvc-primusrun.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/1calf7d7l8k1skwj3h699dkvdgv39js8-system-path.drv’: 1 dependencies couldn't be built
cannot build derivation ‘/nix/store/nascnazd6xgxs28ala3lwpxyh5h97lb2-nixos-system-machine-17.09.2905.c1d9aff56e0.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/nascnazd6xgxs28ala3lwpxyh5h97lb2-nixos-system-machine-17.09.2905.c1d9aff56e0.drv’ failed

[root@nixos:~]# df
Filesystem     1K-blocks    Used Available Use% Mounted on
devtmpfs          403068       0    403068   0% /dev
tmpfs            4030652   35800   3994852   1% /dev/shm
tmpfs            2015328    6464   2008864   1% /run
tmpfs            4030648     320   4030328   1% /run/wrappers
tmpfs            4030648  134784   3895864   4% /
/dev/root         837632  837632         0 100% /iso
/dev/loop0        809984  809984         0 100% /nix/.ro-store
tmpfs            4030648 4030648         0 100% /nix/.rw-store
unionfs          4840632 4840632         0 100% /nix/store
tmpfs            4030648       0   4030648   0% /sys/fs/cgroup
tmpfs             806128       8    806120   1% /run/user/0
/dev/sdb3      114288112   70112 108369460   1% /mnt
/dev/sdb1           2028       0      2028   0% /mnt/boot

@srghma
Copy link
Contributor

srghma commented Feb 3, 2018

[root@nixos:~]# ls -al /nix/store/4x3gckrdpjfh65vi099x4gcj00kfwhwa-nvidia-x11-384.111
total 0
drwxr-xr-x 1 nixbld1 nixbld     60 Feb  3 19:18 .
drwxrwxr-t 1 root    nixbld 110760 Feb  3 19:18 ..
drwxr-xr-x 1 nixbld1 nixbld    760 Feb  3 19:18 lib

[root@nixos:~]# ls -al /mnt/nix/
total 8
drwxr-xr-x  2 root root 4096 Feb  3 18:36 .
drwxr-xr-x 10 root root 4096 Feb  3 18:36 ..

I always thought the packages should install to /mnt during nixos-install O_O

@srghma
Copy link
Contributor

srghma commented Feb 3, 2018

Yes, it should copy to /mnt/nix/store. based on manual.

It copies Nix and its dependencies to /mnt/nix/store.

How to install old system-path package?

[root@nixos:~]# whereis nixos-install
nixos-install: /nix/store/4q4dj5p4lm6jmsypa0kf8pwl2fq5b0sq-system-path/bin/nixos-install

[root@nixos:~]# nix-env -qaP system-path
error: selector ‘system-path’ matches no derivations

@pbogdan
Copy link
Member

pbogdan commented Feb 3, 2018

@BjornMelgaard your error sounds like an instance of #27307

@srghma
Copy link
Contributor

srghma commented Feb 3, 2018

@pbogdan this error is preserved in latest unstable iso

@pbogdan
Copy link
Member

pbogdan commented Feb 3, 2018

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

@srghma
Copy link
Contributor

srghma commented Feb 3, 2018

@pbogdan any idea how can I fix it right now? maybe mount nix store to disk by hand?

@pbogdan
Copy link
Member

pbogdan commented Feb 3, 2018

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.

@srghma
Copy link
Contributor

srghma commented Feb 4, 2018

@pbogdan installed with minimal configuration, tnx

@zarkone
Copy link
Contributor

zarkone commented Mar 27, 2018

got the same issue, can't build because of no space left. Downloaded iso from here: https://nixos.org/nixos/download.html, this one: https://d3g5gsiof5omrk.cloudfront.net/nixos/17.09/nixos-17.09.3129.1dcd022f01b/nixos-minimal-17.09.3129.1dcd022f01b-x86_64-linux.iso

I see that my mounted volume is emoty when mounted unionfs volume /nix/store is full.

@src386
Copy link

src386 commented Mar 31, 2018

Same here...

@vcunat
Copy link
Member

vcunat commented Mar 31, 2018

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

@sondr3
Copy link
Contributor

sondr3 commented Apr 10, 2018

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

@wmertens
Copy link
Contributor

wmertens commented Apr 11, 2018 via email

@sondr3
Copy link
Contributor

sondr3 commented Apr 11, 2018

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.

@wmertens
Copy link
Contributor

wmertens commented Apr 11, 2018 via email

@7c6f434c
Copy link
Member

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

@sondr3
Copy link
Contributor

sondr3 commented Apr 11, 2018

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.

@jcrben
Copy link
Contributor

jcrben commented Apr 23, 2018

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

@vcunat
Copy link
Member

vcunat commented Apr 23, 2018

I suppose you suffer from #38477 ?

@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/20-03-uefi-installation-problem-vs-instructions/7783/2

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

No branches or pull requests