[WSL1] Upgrade to Ubuntu 24.04 from 22.04 fails with missing snap. Possible to work around?
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
### Windows Version
Microsoft Windows [Version 10.0.22631.4037]
### WSL Version
2.2.4.0
### Are you using WSL 1 or WSL 2?
- [ ] WSL 2
- [X] WSL 1
### Kernel Version
5.15.153.1-2
### Distro Version
Ubuntu 22.04
### Other Software
WSL version: 2.2.4.0
Kernel version: 5.15.153.1-2
WSLg version: 1.0.61
MSRDC version: 1.2.5326
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26091.1-240325-1447.ge-release
Windows version: 10.0.22631.4037
### Repro Steps
```
sudo do-release-upgrade
Traceback (most recent call last):
File "/tmp/ubuntu-release-upgrader-uqmd8iby/noble", line 8, in
sys.exit(main())
File "/tmp/ubuntu-release-upgrader-uqmd8iby/DistUpgrade/DistUpgradeMain.py", line 241, in main
if app.run():
File "/tmp/ubuntu-release-upgrader-uqmd8iby/DistUpgrade/DistUpgradeController.py", line 2642, in run
return self.fullUpgrade()
File "/tmp/ubuntu-release-upgrader-uqmd8iby/DistUpgrade/DistUpgradeController.py", line 2447, in fullUpgrade
if not self.doPostInitialUpdate():
File "/tmp/ubuntu-release-upgrader-uqmd8iby/DistUpgrade/DistUpgradeController.py", line 1438, in doPostInitialUpdate
self.quirks.run("PostInitialUpdate")
File "/tmp/ubuntu-release-upgrader-uqmd8iby/DistUpgrade/DistUpgradeQuirks.py", line 102, in run
func()
File "/tmp/ubuntu-release-upgrader-uqmd8iby/DistUpgrade/DistUpgradeQuirks.py", line 127, in noblePostInitialUpdate
self._test_and_fail_on_tpm_fde()
File "/tmp/ubuntu-release-upgrader-uqmd8iby/DistUpgrade/DistUpgradeQuirks.py", line 1898, in _test_and_fail_on_tpm_fde
snap_list = subprocess.check_output(['snap', 'list'])
File "/usr/lib/python3.10/subprocess.py", line 421, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.10/subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['snap', 'list']' returned non-zero exit status 1.
```
### Expected Behavior
Ubuntu 24.04 installs in one way or another
### Actual Behavior
Complete breakage as it seems to depend on `snap list` which prints this:
```
Interacting with snapd is not yet supported on Windows Subsystem for Linux 1.
This command has been left available for documentation purposes only.
```
I would propose at least `snap list` prints an empty list or something else reasonable.
Is it possible to upgrade to Ubuntu 24.04 in some other way to bypass `snap` problems?
I like WSLv1 on my Laptop because it's fast, lightweight and doesn't require Hyper-V or a full VM and uses the regular processes without a separate memory allocated for the VM.
### Diagnostic Logs
_No response_
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing `sudo do-release-upgrade` on WSL1 with Ubuntu 22.04 and review the traceback around `noblePostInitialUpdate` and `_test_and_fail_on_tpm_fde`. Determine whether the upgrade can proceed without a usable `snap list`, then verify that Ubuntu 24.04 upgrades successfully or that a documented workaround avoids the failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, ubuntu
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100