microsoft / WSL

Issues found on WSL
https://docs.microsoft.com/windows/wsl
MIT License
17.48k stars 822 forks source link

WSL2 Fatal error with usrmerge #12027

Closed grzegorztomasiak closed 2 months ago

grzegorztomasiak commented 2 months ago

Windows Version

Microsoft Windows [Version 10.0.22631.4169]

WSL Version

2.2.4.0

Are you using WSL 1 or WSL 2?

Kernel Version

5.15.153.1-2

Distro Version

Debian 12

Other Software

No response

Repro Steps

$ /usr/lib/usrmerge/convert-usrmerge

/lib/modules/ is a mount point.
Probably this system is using User Mode Linux or some variant of Xen.

To continue the conversion please unmount /lib/modules/ (try the command
'umount -l /lib/modules/') and then try again.
Do not forget to reboot after the conversion is complete to have it
mounted again.

Expected Behavior

Apparently there was a problem with WSL1 and usrmerge but this shouldn't be the case in WSL2 as far as I read but unfortunately I still get the problem with usrmerge and I am unable to update the system.

I did full distro upgrade from 10, to 11 and to 12.

8927

I've talked with both the internal team and the Debian maintainer of the WSL image. This is a WSL 1.0 specific issue, and there's not much we can do in usrmerge about it, as it's related to the underlying filesystem that we can't touch anyway.

The Debian stable WSL image in the store will be updated shortly to be merged-usr out of the box, so this won't happen again for new installations, and on upgrade to bookworm it will be a no-op. Older installations on WSL 1.0 will have to remove and reinstall, unless a workaround is found, but for that please use the upstream bug tracker as here we really can't figure out what the problem is.

Also please note that it would be a good idea to just move to WSL 2.0 for all use cases at this point.

Actual Behavior

Do you want to continue? [Y/n] y
Extracting templates from packages: 100%
Preconfiguring packages ...
Setting up usrmerge (39) ...
dpkg: warning: files list file for package 'usrmerge' missing; assuming package has no files currently installed
(Reading database ... 56974 files and directories currently installed.)
Preparing to unpack .../base-files_13.5_amd64.deb ...

******************************************************************************
*
* The base-files package cannot be installed because
* /bin is a directory, but should be a symbolic link.
*
* Please install the usrmerge package to convert this system to merged-/usr.
*
* For more information please read https://wiki.debian.org/UsrMerge.
*
******************************************************************************

dpkg: error processing archive /var/cache/apt/archives/base-files_13.5_amd64.deb (--unpack):
 new base-files package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/base-files_13.5_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Diagnostic Logs

No response

github-actions[bot] commented 2 months ago

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs Download and execute [collect-wsl-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-wsl-logs.ps1) in an **administrative powershell prompt**: ``` Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1 Set-ExecutionPolicy Bypass -Scope Process -Force .\collect-wsl-logs.ps1 ``` The script will output the path of the log file once done. If this is a networking issue, please use [collect-networking-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-networking-logs.ps1), following the instructions [here](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues) Once completed please upload the output files to this Github issue. [Click here for more info on logging](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method) If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

github-actions[bot] commented 2 months ago

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs Download and execute [collect-wsl-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-wsl-logs.ps1) in an **administrative powershell prompt**: ``` Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1 Set-ExecutionPolicy Bypass -Scope Process -Force .\collect-wsl-logs.ps1 ``` The script will output the path of the log file once done. If this is a networking issue, please use [collect-networking-logs.ps1](https://github.com/Microsoft/WSL/blob/master/diagnostics/collect-networking-logs.ps1), following the instructions [here](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#collect-wsl-logs-for-networking-issues) Once completed please upload the output files to this Github issue. [Click here for more info on logging](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method) If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

View similar issues

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it!

Open similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

microsoft-github-policy-service[bot] commented 2 months ago

This issue has been automatically closed since it has not had any author activity for the past 7 days. If you're still experiencing this issue please re-file it as a new issue.

Thank you!