Open vadimkantorov opened 2 months ago
In /tmp/ubuntu-release-upgrader-t8sg0mg9/DistUpgrade/DistUpgradeQuirks.py
:
def _test_and_fail_on_tpm_fde(self):
"""
LP: #2065229
"""
try:
snap_list = subprocess.check_output(['snap', 'list'])
snaps = [s.decode().split()[0] for s in snap_list.splitlines()]
except FileNotFoundError:
# snapd not installed?
return
I think except FileNotFoundError:
should be extended to except:
Because DistUpgradeQuirks.py
is stored in some temp directory, it was hard to change it inplace, but I succeeded, and then the upgrade process continued as it should
Then after an hour of upgrade I got this error (maybe systemd install failed):
Setting up systemd (255.4-1ubuntu8.4) ...
Installing new version of config file /etc/systemd/journald.conf ...
Installing new version of config file /etc/systemd/logind.conf ...
Installing new version of config file /etc/systemd/networkd.conf ...
Installing new version of config file /etc/systemd/pstore.conf ...
Installing new version of config file /etc/systemd/sleep.conf ...
Installing new version of config file /etc/systemd/system.conf ...
Installing new version of config file /etc/systemd/user.conf ...
/usr/lib/tmpfiles.d/polkitd.conf:2: Failed to resolve group 'polkitd': No such process
/usr/lib/tmpfiles.d/polkitd.conf:3: Failed to resolve group 'polkitd': No such process
Failed to take /etc/passwd lock: Invalid argument
dpkg: error processing package systemd (--configure):
installed systemd package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
systemd
It appears that some packages add systemd post-installation scripts which then cannot run as WSLv1 has no systemd
I guess I'm finding another fellow that appreciates WSL1 approach... ;-)
I use wsl2 but I am getting the same error. 😕
edit:
systemd was disabled because /etc/wsl.conf
was empty. It worked after enabling systemd support.
Thanks for your report. I filed https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/2080233 upstream to address this issue in Ubuntu release upgrader.
Another suggestion:
DistUpgrade/DistUpgradeQuirks.py
_test_and_fail_on_tpm_fde
in DistUpgrade/DistUpgradeQuirks.py
and in general make all these hacks for defensive to eat up unexpected exceptions or allow to continue on errors, it seems that many people have stumbled on various problems in DistUpgrade/DistUpgradeQuirks.py
. So maybe putting this script / upgrade tools on a GitHub repo would allow regular users to report problems faster...@jibel In the bug filed above two problems appear mixed:
_test_and_fail_on_tpm_fde
which crashes on unexpected return code by snap list
. after hacking/commenting this out I stumbled on the next problem which is more serious:apt
which tries to run systemd-postinstall scripts whereas systemd
is disabledBtw my distro became broken after this upgrade attempt, and --fix-broken-install
did not help as it also tries to run systemd-postinstall scripts and cannot. Maybe a command-line switch for apt which would skip systemd-postinstall scripts would be nice. Luckily, I installed a fresh Ubuntu24.04 distro from Microsoft Store and switched it to WSLv1 successfully. But of course, this upgrade experience is not very nice :(
2. bug in
apt
which tries to run systemd-postinstall scripts whereassystemd
is disabled
Right, I filed https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2080257 against systemd in Ubuntu for the systemd postinst issue.
I filed https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/2080233 upstream to address this issue in Ubuntu release upgrader.
Could you please add in there investigated details about the DistUpgrade/DistUpgradeQuirks.py
being problematic and its function _test_and_fail_on_tpm_fde
being too conservative? That method is designed to continue fine if snap
is not present, but unfortunately fails to continue if snap
exists, but snap list
returns a stubbed message / non-zero exit code
cmd /c ver
Microsoft Windows [Version 10.0.22631.4037]
wsl --status
C:\Users\vadim>wsl --status Default Distribution: Ubuntu Default Version: 2
C:\Users\vadim>wsl -l -v NAME STATE VERSION
Did the problem occur during installation?
What happened?
UbtuntuWSL1
sudo do-release-upgrade
fails with stack trace somewhere afternoble.tar.gz
is extracted:snap list
errors out with exit code 1 and prints:Interacting with snapd is not yet supported on Windows Subsystem for Linux 1. This command has been left available for documentation purposes only.
Related issue I created in MS's repo:
What was expected?
On Ubuntu-22.04/WSLv1
sudo do-release-upgrade
should succeed and bypass not workingsnap list
, maybesnap list
could be stubbed out, or better - the upgrader script should handle this error. On WSLv1snap
/snapd
and snap apps are not supported, so they need not any upgrades, and this should be simply skipped in the upgrade processSteps to reproduce
N/A - explained above (have Ubuntu-22.04 + WSLv1 and launch
sudo do-release-upgrade
)Additional information
No response