Ubuntu Dist-Upgrade unter WSL2
Ubuntu Dist-Upgrade unter WSL2
ERROR during do-release-upgrade on WSL2
1
Cannot upgrade without unified cgroupv2 hierarchy Beginning with Ubuntu 26.04 LTS, it is required that the system is booted with a unified cgroupv2 hierarchy, but this system is not.
SOLUTION
create or edit .wslconfig in %USERPROFILE%. Add the following content
1
2
[wsl2]
kernelCommandLine = cgroup_no_v1=all
reboot wsl from cmd/wt/PowerShell
1
wsl --shutdown
NACH Upgrade
Windows Terminal aktualisiert den Versionsnamen nicht in der Anzeige, einfach in den Einstellungen ändern.
Ändern des Namens für wsl –list
1
2
3
4
5
Get-ChildItem "HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss" |
ForEach-Object {
$name = (Get-ItemProperty $_.PSPath).DistributionName
[PSCustomObject]@{ GUID = $_.PSChildName; Name = $name }
}
shutdown wsl
1
wsl --shutdown
change name
1
2
3
$guid = "{12345678-abcd-1234-abcd-123456789012}"
Set-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss\$guid" `
-Name "DistributionName" -Value "Ubuntu-26.04"
that is not enough, edit the settings.json of your WT (either Preview or Public)
1
2
$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\
$env:LOCALAPPDATA\Packages\Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe\LocalState\
ensure the GUID is the same as in the registry
Dieser Eintrag ist vom Autor unter
CC BY 4.0
lizensiert.