-
Notifications
You must be signed in to change notification settings - Fork 2
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
builder for '/nix/store/bsbnngc7s28y45ahbpz92q5f9xb882lx-linux-4.19.132.drv' failed with exit code 2 #2
Comments
Or is this just a size issue? 🤔 The block-device is just 12 GB. |
With building the configuration in /mnt/etc/nixos/configuration.nix...
[1/190/790 built, 1663 copied (10135.4 MiB), 1478.9 MiB DL] building linux-4.19.132 (buildPhase)/run/current-system/sw/bin/nixos-install: line 107: 8423 Killed nix build --out-link "$outLink" --store "$mountPoint" "${extraBuildFlags[@]}" --extra-substituters "$sub" -f '<nixpkgs/nixos>' system -I "nixos-config=$NIXOS_CONFIG" ${verbosity[@]} ${buildLogs} |
And the same with building the configuration in /mnt/etc/nixos/configuration.nix...
[1/188/790 built, 1663 copied (10135.4 MiB), 1478.9 MiB DL] building linux-config-4.19.132 (unpa/run/current-system/sw/bin/nixos-install: line 107: 8697 Killed nix build --out-link "$outLink" --store "$mountPoint" "${extraBuildFlags[@]}" --extra-substituters "$sub" -f '<nixpkgs/nixos>' system -I "nixos-config=$NIXOS_CONFIG" ${verbosity[@]} ${buildLogs} |
Seems to be a size issue; I'll increase the size of the zvolume and get back to you. |
Interestingly, after increasing the size of the zvolume to 20 GB and switching back to building the configuration in /mnt/etc/nixos/configuration.nix...
[0/5 built, 1/5/47 copied (23.9/67.3 MiB), 0.1/3.6 MiB DL] copying glibc-2.30 from local/run/current-system/sw/bin/nixos-install: line 107: 13143 Killed nix build --out-link "$outLink" --store "$mountPoint" "${extraBuildFlags[@]}" --extra-substituters "$sub" -f '<nixpkgs/nixos>' system -I "nixos-config=$NIXOS_CONFIG" ${verbosity[@]} ${buildLogs} |
It seems primarily to be a space issue; this is what I got on the 20 GB building the configuration in /mnt/etc/nixos/configuration.nix...
builder for '/nix/store/yfmzd55ylpicvvhgca5hg5cicr8vgwmi-linux-config-4.19.132.drv' failed with exit code 1; last 10 log lines:
tar: linux-4.19.132/virt/kvm/eventfd.c: Cannot write: No space left on device
tar: linux-4.19.132/virt/kvm/irqchip.c: Cannot write: No space left on device
tar: linux-4.19.132/virt/kvm/kvm_main.c: Cannot write: No space left on device
tar: linux-4.19.132/virt/kvm/vfio.c: Cannot write: No space left on device
tar: linux-4.19.132/virt/kvm/vfio.h: Cannot write: No space left on device
tar: linux-4.19.132/virt/lib/Kconfig: Cannot write: No space left on device
tar: linux-4.19.132/virt/lib/Makefile: Cannot write: No space left on device
tar: linux-4.19.132/virt/lib/irqbypass.c: Cannot write: No space left on device
tar: Exiting with failure status due to previous errors
do not know how to unpack source archive /nix/store/mvh0n9s2ky141q3l210dqz0iv119znm0-linux-4.19.132.tar.xz
note: build failure may have been caused by lack of free disk space
cannot build derivation '/nix/store/bsbnngc7s28y45ahbpz92q5f9xb882lx-linux-4.19.132.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/xfzpvjm1mdyjacv0b38wsli1lh9fp827-nixos-system-chimchar-20.03post-git.drv': 1 dependencies couldn't be built
[187 built (1 failed), 1616 copied (10068.1 MiB), 1475.2 MiB DL]
error: build of '/nix/store/xfzpvjm1mdyjacv0b38wsli1lh9fp827-nixos-system-chimchar-20.03post-git.drv' failed Would you happen to know how much space the final install will take? Or should I just allocate something like 50 GB worth of free space to the zvolume? |
Same space problem using a 50 GB zvolume: building the configuration in /mnt/etc/nixos/configuration.nix...
builder for '/nix/store/yfmzd55ylpicvvhgca5hg5cicr8vgwmi-linux-config-4.19.132.drv' failed with exit code 1; last 10 log lines:
tar: linux-4.19.132/virt/kvm/eventfd.c: Cannot write: No space left on device
tar: linux-4.19.132/virt/kvm/irqchip.c: Cannot write: No space left on device
tar: linux-4.19.132/virt/kvm/kvm_main.c: Cannot write: No space left on device
tar: linux-4.19.132/virt/kvm/vfio.c: Cannot write: No space left on device
tar: linux-4.19.132/virt/kvm/vfio.h: Cannot write: No space left on device
tar: linux-4.19.132/virt/lib/Kconfig: Cannot write: No space left on device
tar: linux-4.19.132/virt/lib/Makefile: Cannot write: No space left on device
tar: linux-4.19.132/virt/lib/irqbypass.c: Cannot write: No space left on device
tar: Exiting with failure status due to previous errors
do not know how to unpack source archive /nix/store/mvh0n9s2ky141q3l210dqz0iv119znm0-linux-4.19.132.tar.xz
note: build failure may have been caused by lack of free disk space
cannot build derivation '/nix/store/bsbnngc7s28y45ahbpz92q5f9xb882lx-linux-4.19.132.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/xfzpvjm1mdyjacv0b38wsli1lh9fp827-nixos-system-chimchar-20.03post-git.drv': 1 dependencies couldn't be built
[188 built (1 failed), 1663 copied (10135.5 MiB), 1478.9 MiB DL]
error: build of '/nix/store/xfzpvjm1mdyjacv0b38wsli1lh9fp827-nixos-system-chimchar-20.03post-git.drv' failed Could this be a problem with the installation device itself? I'm using an 8 GB live install. Or could it still be the ZFS root? |
I think this was the issue last time as well, that some device in the system had insufficient memory. |
Hello again! I use ext4 for my installation, and I haven't experimented with any other filesystems so I don't know about their quirks. |
Ah hah! Perfect! I'll try that out and get back to you! |
In addition, do you know how much space the module itself takes? I allocated 12 GB for the store, but I think I might need more. |
Do I have to keep the update channel as building the configuration in /mnt/etc/nixos/configuration.nix...
builder for '/nix/store/ln0lqccg1396l96nb13jm9aqsk1yllp7-qtwebengine-5.12.7.drv' failed with exit code 2; last 10 log lines:
compilation terminated.
[14616/16299] CXX obj/content/browser/browser/display_cutout_host_impl.o_host.o
ninja: build stopped: subcommand failed.
make[3]: *** [Makefile.gn_run:348: run_ninja] Error 1
make[3]: Leaving directory '/build/qtwebengine-everywhere-src-5.12.7/src/core'
make[2]: *** [Makefile:82: sub-gn_run-pro-make_first] Error 2
make[2]: Leaving directory '/build/qtwebengine-everywhere-src-5.12.7/src/core'
make[1]: *** [Makefile:81: sub-core-make_first] Error 2
make[1]: Leaving directory '/build/qtwebengine-everywhere-src-5.12.7/src'
make: *** [Makefile:49: sub-src-make_first] Error 2
cannot build derivation '/nix/store/h0fyfxwg7f81pdm75i9vg7r3b4lz1vqh-libksysguard-5.17.5.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/yg60n3qgw5118nwrbpvzy1d2625rhsgr-ksysguard-5.17.5.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/72g5a8lqcjlllida42w9fcjh40bswigq-libksysguard-5.17.5_fish-completions.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/dqc9q7yw4r4zv0vwqnkwh3jvycr1cbgq-plasma-workspace-5.17.5.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/7qw9hn2c63wclikvimbiqla0f6xxrjm0-system-path.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/wnc93ykkrin8x6n93kbz058zra4yzx0r-nixos-system-chimchar-20.03post-git.drv': 1 dependencies couldn't be built
[0 built (1 failed), 0.0 MiB DL]
error: build of '/nix/store/wnc93ykkrin8x6n93kbz058zra4yzx0r-nixos-system-chimchar-20.03post-git.drv' failed |
Actually, I think this is due to my use of |
I'm not sure how much space is necessary to build the module, the biggest package is the kernel which I think takes a few gigabytes to unpack and build. Once you add a desktop environment the space requirements would go up quite a lot. Try building without a desktop environment first, just to be sure you have the module working. |
Makes sense; I'll get back to you on that! I've already forced the |
It works! The problems seem to have been first the limited space of the live install, then the |
... And I forgot: it won't boot due to the kernel lacking the ZFS module; you wouldn't be able to help me with compiling the ZFS module against this kernel for NixOS, would you? |
What I remember from our last conversation is that zfs is broken on version 4.19 of the kernel which nixos-surface is using because the touch screen is broken on more recent version of the kernel. Upstream at linux-surface they're maintaining version 5.7 now, and maybe at that version both zfs and nixos-surface work. Unfortunately, on nixos 20.03 the latest kernel is 5.6 so we probably still have some waiting to do. |
If I remember correctly, the linux-surface kernel itself doesn't have a ZFS module itself due to not being in the tree; you have to use the dkms version. So I'm not so sure it's ZFS that's broken as it is that it didn't exist to begin with. When I was using Arch, 4.19 was the most stable version to use with ZFS due to being long-term. As it were, I've opened a new issue in the |
I'm assuming using the following in the configuration file won't work, due to both the { config, ... }:
{
imports = [ ./hardware-configuration ./nixos-surface/surface.nix ];
boot.kernelPackages = [ surface ];
boot.extraModulePackages = with config.boot.kernelPackages; [ zfs ];
} |
You shouldn't need to specify |
Well it started building, then ran into this: building the configuration in /mnt/etc/nixos/configuration.nix...
builder for '/nix/store/0sfq76m0d0c11y24llvy7hx7dv9j56yw-stage-1-init.sh.drv' failed with exit code 2; last 2 log lines:
checking syntax
/nix/store/a2mj25zdygxyccsrs9gcnac3f2lissz7-stage-1-init.sh: line 669: syntax error: unexpected end of file
cannot build derivation '/nix/store/ckj6ghm19vryg754gk47b14flhv3y343-initrd-linux-4.19.132.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/vsfyixbg6sib717z46wyhzy72prx8flw-nixos-system-chimchar-20.03post-git.drv': 1 dependencies couldn't be built
[25 built (1 failed)]
error: build of '/nix/store/vsfyixbg6sib717z46wyhzy72prx8flw-nixos-system-chimchar-20.03post-git.drv' failed |
Solved the previous error; now I'm getting the following error: modprobe: FATAL: Module surface_acpi not found in directory /lib/modules/4.19.132 |
'Ello? |
I don't have the surface_acpi module, here's my |
Ah; should I remove that from the |
Give that a try. It's curious that I also have |
Only in your module; I'm also getting the following error, which might be due to the modprobe: ERROR: could not insert 'zfs': Unknown symbol in module, or unknown parameter (see dmesg) |
I think that error is independent of the |
Fair enough; is there any way for me to update the kernel, given I don't care much for the touchscreen? |
No need to try the surface kernel on non-surface devices. |
Makes sense! 😹 Yes, I used to before I switched them over to a server-state; now they're non-encrypted, but while encrypted they worked fine. |
I doubt it would help if I added a |
Okay, so I reread the error, and while it stops at the aforementioned |
Oh, and the |
This problem doesn't sound like a surface kernel problem. It could be a ZFS problem if for some reason the kernel can't mount the ZFS file system. Maybe the ZFS module needs to be added manually to the initrd. You could also try getting encrypted root working without ZFS just to reduce the number of possible problems you can run into. |
Possibly, but it wouldn't explain why the problem occurs only when using this kernel. My current { config, pkgs, lib, ... }:
{
config.boot = lib.mkMerge [{
loader = {
# Use the systemd-boot EFI boot loader.
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
grub = {
copyKernels = true;
extraEntriesBeforeNixOS = true;
extraEntries = ''
menuentry "Reboot" { reboot }
menuentry "Poweroff" { halt }
'';
useOSProber = true;
zfsSupport = true;
};
};
initrd = {
postDeviceCommands = lib.mkAfter ''
zfs rollback -r ${config.networking.hostName}/root@blank
'';
postMountCommands = lib.mkAfter ''
sudo -iu shadowrylander yadm -Y /cluster/cosmog -C / reset --hard ${config.networking.hostName}.nixos 2> /dev/null
mkdir -p /mnt
{ ${pkgs.xonsh}/bin/xonsh; } <<'```'
from time import sleep
for i in range(5):
zpool import -fa 2> /dev/null
zfs mount -a 2> /dev/null
sleep(1)
```
'';
};
supportedFilesystems = [ "zfs" "xfs" "btrfs" "ext4" ];
zfs = {
requestEncryptionCredentials = true;
enableUnstable = true;
};
extraModulePackages = with config.boot.kernelPackages; [ wireguard ];
}
(lib.mkIf config.variables.surface {
extraModulePackages = with config.boot.kernelPackages; [ zfs ];
initrd = {
availableKernelModules = [ "zfs" ];
kernelModules = [ "zfs" ];
supportedFilesystems = [ "zfs" "xfs" "btrfs" "ext4" ];
};
})
];
} The Regarding the encryption, I honestly just wanted the ZFS to work; encryption is secondary for me, mostly to prevent other people from modifying or deleting my stuff rather than snooping through them. |
Wait a minute... Is it possible |
I have filed yet another bug report on the NixOS repo: NixOS/nixpkgs#95105 |
I don't see a grub device specified in your configuration, but I think it's supposed to be nodev. https://nixos.wiki/wiki/Full_Disk_Encryption (Option 3) |
Ah, yes; forgot to mention that. In |
... Always remember: if anything is not found, check your damn Turns out the init script couldn't be found because the |
I'll report back with the full list of changes you might want to implement zfs with the surface kernel! |
Also, how do I implement the |
I'm not sure I know how to do that, but I think it's okay to just download it and add the patch to the list of patches in |
Thought so. I'm testing out the 4.14 patch as mentioned above; once I've confirmed that to work, I'll send you the [complete] list of changes! |
It works! Here's a list of changes: (lib.mkIf config.variables.surface {
extraModulePackages = with config.boot.kernelPackages; [ zfs ];
initrd = {
availableKernelModules = [ "zfs" ];
kernelModules = [ "zfs" ];
supportedFilesystems = [ "zfs" ];
};
}) (lib.mkIf config.variables.surface {
plasma5.enable = lib.mkForce false;
gnome3.enable = lib.mkForce true;
}) kernelPatches = [
{ patch = linux-surface/patches/4.19/0001-surface3-power.patch; name = "1"; }
{ patch = linux-surface/patches/4.19/0002-surface3-spi.patch; name = "2"; }
{ patch = linux-surface/patches/4.19/0003-surface3-oemb.patch; name = "3"; }
{ patch = linux-surface/patches/4.19/0004-surface-buttons.patch; name = "4"; }
{ patch = linux-surface/patches/4.19/0005-surface-sam.patch; name = "5"; }
{ patch = linux-surface/patches/4.19/0006-suspend.patch; name = "6"; }
{ patch = linux-surface/patches/4.19/0007-ipts.patch; name = "7"; }
{ patch = linux-surface/patches/4.19/0008-surface-lte.patch; name = "8"; }
{ patch = linux-surface/patches/4.19/0009-ioremap_uc.patch; name = "9"; }
{ patch = linux-surface/patches/4.19/0010-wifi.patch; name = "10"; }
{ patch = ./export_kernel_fpu_functions_4_14.patch; name = "11"; }
]; Is there anything I missed? |
Oh, and could you show me how to update the module for |
Sigh... I'm also getting this error when installing to my internal Surface Book 2 SSD (installing the kernel) from the external SSD (alredy has the kernel), due to the nixos channel not being set by default: building the configuration in /mnt/etc/nixos/configuration.nix...
copying channel...
error: path '/nix/store/nv2wxppvnjpd8f9w4q4s5zja6nwckl6c-nixos-20.03-20.03
' does not exist and cannot be created Sorry for asking you so many unrelated questions; you seem to be the only one consistently helping me. |
There's nothing in |
I'll report back after attempting to upgrade; thanks for the tip! I can also try a And I thought they'd come back after a few days... Sigh... |
Ah, yes, rookie mistake: forgot the |
When you do get everything sorted out can you submit your changes as a pull request? |
Still new to git, but I'll try my best! For the changes aside from the patch itself, should I just tack them on to end of the |
Yup |
Alright; I'll submit a request later tonight! |
When you make your patch can you exclude your desktop environment settings? |
Will do! But I still don't know why KDE Plasma won't build with the surface kernel. |
And requested! |
Hello! Me again! 😸
To circumvent the issues last time with using an encrypted ZFS root, I since realized that, technically, it's not the root that's the issue, but the filesystem of the nix store that's the problem, since that's where everything necessary for the system to operate is stored (I think). Therefore, I tried using a BTRFS zvolume block-device instead for just the nix store, but I getting the following error:
What I'm wondering now is whether using BTRFS is the issue, or the issue is still the ZFS zvol, since the latter is still a regular block-device. I will try reinstalling with different underlying filesystems, such as XFS, F2FS, and EXT4; but in the meantime, two questions:
Thank you kindly for the help!
The text was updated successfully, but these errors were encountered: