Closed lucyllewy closed 3 years ago
Hi! Decided to give this another go on stable 21H1 19043.1052
build. It's not Insiders one, but AFAIK should work fine.
I had a few issues during the script execution:
I had to replace powershell.exe
to pwsh.exe
in the script since I'm using PowerShell Core.
I suggest you should detect the current shell instead of forcing the vanilla powershell binary, e.g. with (Get-Process -Id $pid).ProcessName
Got few errors for Invoke-WslCommand
:
--- Detecting default user in Ubuntu
Invoke-WslCommand: <repo_path>\install.ps1:392
Line |
392 | $User = Invoke-WslCommand -Command "whoami"
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Parameter set cannot be resolved using the specified named parameters. One or more parameters issued
| cannot be used together or an insufficient number of parameters were provided.
--- Ensuring is a sudoer in Ubuntu
Invoke-WslCommand: <repo_path>\install.ps1:398
Line |
398 | Invoke-WslCommand -User 'root' -Command "usermod -a -G sudo $User 2>/ …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Parameter set cannot be resolved using the specified named parameters. One or more parameters issued
| cannot be used together or an insufficient number of parameters were provided.
Invoke-WslCommand: <repo_path>\install.ps1:399
Line |
399 | Invoke-WslCommand -User 'root' -Command "usermod -a -G wheel $User 2> …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Parameter set cannot be resolved using the specified named parameters. One or more parameters issued
| cannot be used together or an insufficient number of parameters were provided.
--- Installing files in Ubuntu
// and it goes on with the script
When I tried those manually, they seemed to work fine though, so not sure what's the issue here.
While trying to log into Ubuntu, I got this error:
nsenter: failed to execute machinectl: No such file or directory
and it exited the shell with the code 127
.
Is it expected due to my build version being a stable one, or something else is the issue?
No, that's a bug - I forgot to get the script to install systemd-container
, which on Ubuntu is the package providing machinectl
.
Nice, got it to boot with the fixed script.
First boot log contains an error though:
2021/06/22 01:14:04 socat[447] E bind(5, {AF=1 "/home/nezorflame/.ssh/agent.sock"}, 34): No such file or directory
Seems that agent wasn't started on Ubuntu side?
This will become the primary branch once Windows in stable channels supports the
boot.command
feature in WSL.