!apXxbtexmNGJaAryzM:nixos.org

NixOS on WSL

342 Members
https://github.com/nix-community/NixOS-WSL59 Servers

Load older messages


SenderMessageTime
12 Feb 2023
@i97henka:matrix.orghenrik-ch Thank you for the advice - will do!
What you mean for afterwards is basically installing as is, and then run the sudo nixos-rebuild without making any changes, to configuration.nix, right?
20:05:20
@i97henka:matrix.orghenrik-ch * Thank you for the advice - will do!
What you mean for afterwards is basically installing as is, and then run the sudo nixos-rebuild without making any changes to configuration.nix, right?
20:05:41
@k900:0upti.meK900Just install from that latest build20:05:50
@k900:0upti.meK900 And then sudo nixos-rebuild switch when you want to make changes 20:05:58
@i97henka:matrix.orghenrik-ch

Installed like this:
PS C:\Users\i97he> wsl --import NixOS .\NixOS\ installer.zip --version 2

then I run and get this error:

PS C:\Users\i97he> wsl --shutdown
PS C:\Users\i97he> wsl -d NixOS
Processing fstab with mount -a failed.

<3>WSL (8) ERROR: CreateProcessEntryCommon:358: getpwuid(0) failed 2
<3>WSL (8) ERROR: CreateProcessEntryCommon:362: getpwuid(0) failed 2
<3>WSL (8) ERROR: CreateProcessEntryCommon:570: execvpe /bin/sh failed 2
<3>WSL (8) ERROR: CreateProcessEntryCommon:579: Create process not expected to return
PS C:\Users\i97he>
20:13:35
@k900:0upti.meK900You need to unzip the installer.zip to actually get the install image20:14:53
@nzbr:nzbr.deArson Copperflame There should be a .tar.gz inside that zip, you need to use that instead of the zip directly 20:14:53
@k900:0upti.meK900Why does it even work the other way20:15:03
@i97henka:matrix.orghenrik-chSorry to waste your time with my rookie mistakes, and thanks for your patience!20:15:51
@i97henka:matrix.orghenrik-chtrying now20:15:55
@nzbr:nzbr.deArson Copperflame
In reply to @k900:0upti.me
Why does it even work the other way
Because WSL can actually use zips, but then you get a system with the tarball as the only file (and that won't boot obviously). And because this is a MS-Product, the error message does not give any clue to what is actually happening
20:16:43
@k900:0upti.meK900Should just ship a squashfs20:17:07
@k900:0upti.meK900/s20:17:23
@k900:0upti.meK900Unless20:17:25
@nzbr:nzbr.deArson CopperflameVHDX is supported as well. squashfs isn't as far as I know. The only reason the tarball is inside a zip is that GitHub Actions artifacts are always zips for some reason, even if they only contain a single file20:18:36
@k900:0upti.meK900Yeah, what I meant is the artifacts should just be a squashfs and a tiny shim to extract it20:19:09
@i97henka:matrix.orghenrik-chThank you - seems much better after unzipping the zip and using the tar.gz with the usual name. Follow up question, should you typically always run nixos-rebuild switch with sudo?20:20:55
@k900:0upti.meK900Нуы20:21:28
@k900:0upti.meK900 * Yes20:21:29
@nzbr:nzbr.deArson CopperflameIt will fail if you don't, because it needs to modify paths that only root can write to20:21:57
@i97henka:matrix.orghenrik-chYess, it all worked out! 🎆 Thank you so much for your expert help! You will probably hear back from me soon enough when I get stuck again, but for the moment I am a very happy camper! 🏕️ 20:29:17
@nixinator:nixos.devnixinator joined the room.21:17:42
13 Feb 2023
@k900:0upti.meK900There's still no good way to shrink the WSL disk image natively, is there?18:31:39
@k900:0upti.meK900Natively as in in a way that can actually move files around and not just hope the FS is sparse enough18:31:54
@nzbr:nzbr.deArson Copperflamethere is a powershell function to shink VHDX images iirc18:37:20
@k900:0upti.meK900Yeah it doesn't work18:37:38
@k900:0upti.meK900Well it does but18:37:42
@k900:0upti.meK900It doesn't actually understand ext418:37:47
@k900:0upti.meK900So if you have a single byte used in a block, it will not reclaim those18:37:57
@k900:0upti.meK900 The only consistent way to do it that I know of is to basically wsl --export | wsl --import 18:38:13

Show newer messages


Back to Room ListRoom Version: 9