!apXxbtexmNGJaAryzM:nixos.org

NixOS on WSL

347 Members
https://github.com/nix-community/NixOS-WSL61 Servers

Load older messages


SenderMessageTime
12 Feb 2023
@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
@k900:0upti.meK900Which is what I'm doing right now, very, very slowly18:38:39
@nzbr:nzbr.deArson Copperflame You can fill the image with dd if=/dev/zero of=<file> and then run the optimize command 18:44:13
@k900:0upti.meK900 That also doesn't work, funnily enough 18:45:25
@k900:0upti.meK900Because WSL lies about the rootfs capacity18:45:33
@k900:0upti.meK900And will just fail writes if the underlying disk is out of space18:45:42
@nzbr:nzbr.deArson CopperflameWhy would they LIE ABOUT THAT??18:47:07
@k900:0upti.meK900¯\_(ツ)_/¯18:47:18
@k900:0upti.meK900Anyway found a script that automates the dance: https://github.com/okibcn/wslcompact18:47:26
@k900:0upti.meK900Running that now18:47:35
@k900:0upti.meK900How the fuck is it this slow19:06:23
@k900:0upti.meK900What is it even doing19:06:26
@k900:0upti.meK900Gonna write my own script that makes a new vhdx, mounts it natively as ext4, then rsyncs the whole system over19:06:44
@k900:0upti.meK900Sheesh20:10:32
@k900:0upti.meK900It's still going20:10:34
@k900:0upti.meK900Copied 75GB supposedly20:10:41
@k900:0upti.meK900Of ~150 reported by df20:10:51

Show newer messages


Back to Room ListRoom Version: 9