| 12 Feb 2023 |
henrik-ch | Thank 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 | Нуы | 20:21:28 |
K900 | * Yes | 20:21:29 |
Arson Copperflame | It will fail if you don't, because it needs to modify paths that only root can write to | 20:21:57 |
henrik-ch | Yess, 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 joined the room. | 21:17:42 |
| 13 Feb 2023 |
K900 | There's still no good way to shrink the WSL disk image natively, is there? | 18:31:39 |
K900 | Natively as in in a way that can actually move files around and not just hope the FS is sparse enough | 18:31:54 |
Arson Copperflame | there is a powershell function to shink VHDX images iirc | 18:37:20 |
K900 | Yeah it doesn't work | 18:37:38 |
K900 | Well it does but | 18:37:42 |
K900 | It doesn't actually understand ext4 | 18:37:47 |
K900 | So if you have a single byte used in a block, it will not reclaim those | 18:37:57 |
K900 | The only consistent way to do it that I know of is to basically wsl --export | wsl --import | 18:38:13 |
K900 | Which is what I'm doing right now, very, very slowly | 18:38:39 |
Arson Copperflame | You can fill the image with dd if=/dev/zero of=<file> and then run the optimize command | 18:44:13 |
K900 | That also doesn't work, funnily enough | 18:45:25 |
K900 | Because WSL lies about the rootfs capacity | 18:45:33 |
K900 | And will just fail writes if the underlying disk is out of space | 18:45:42 |
Arson Copperflame | Why would they LIE ABOUT THAT?? | 18:47:07 |
K900 | ¯\_(ツ)_/¯ | 18:47:18 |
K900 | Anyway found a script that automates the dance: https://github.com/okibcn/wslcompact | 18:47:26 |
K900 | Running that now | 18:47:35 |
K900 | How the fuck is it this slow | 19:06:23 |
K900 | What is it even doing | 19:06:26 |
K900 | Gonna write my own script that makes a new vhdx, mounts it natively as ext4, then rsyncs the whole system over | 19:06:44 |
K900 | Sheesh | 20:10:32 |
K900 | It's still going | 20:10:34 |
K900 | Copied 75GB supposedly | 20:10:41 |
K900 | Of ~150 reported by df | 20:10:51 |