Open seanthegeek opened 1 year ago
Debian bug report https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1020971
Debian bug closed with this note
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.
Hence, setting the forwarded address and closing.
--
Kind regards,
Luca Boccassi
A new upload to the store has been done by the maintainer, and the Debian image is now merged-usr by default. Users on WSL 1.0 can uninstall and reinstall to fix this problem.
This also applies to Kali Linux which is based on Debian:
Setting up usrmerge (33) ...
mv: cannot move '/lib/x86_64-linux-gnu/security' to '/usr/lib/x86_64-linux-gnu/security': Permission denied
FATAL ERROR:
mv --no-clobber /lib/x86_64-linux-gnu/security /usr/lib/x86_64-linux-gnu/security: rc=1
It just broke with the latest updates from last night though.
The WSL1 Kali Linux now changed to
Setting up systemd (252-2) ...
systemd-machine-id-setup: error while loading shared libraries: libsystemd-shared-251.so: cannot open shared object file: No such file or directory
I was able to bypass the libsystemd-shared-251.so
issue by re-adding the older files to the system and getting past that.
Then I ran into the issue that files exist in /lib/x86_64-linux-gnu
and /usr/lib/x86_64-linux-gnu
which I was able resolve by getting rid of the ones in /usr/lib
.
That got me back to the initial issue.
It is extremely weird since it was able to copy/move several files between those folders already. There's no security
folder in /usr/lib/x86_64-linux-gnu
yet.
I was able to work around the issue by doing
sudo mkdir -p /usr/lib/x86_64-linux-gnu/security
sudo chown root:root /usr/lib/x86_64-linux-gnu/security
sudo chmod 755 /usr/lib/x86_64-linux-gnu/security
That leads to a different error:
FATAL ERROR:
Can't rename /lib: Permission denied at /usr/lib/usrmerge/convert-usrmerge line 286.
Running /usr/lib/usrmerge/convert-usrmerge
again doesn't report that error anymore and was able to finish.
After that I was finally able to update the system again.
It did report the following though:
dpkg: warning: This system uses merged-usr-via-aliased-dirs, going behind dpkg's
dpkg: warning: back, breaking its core assumptions. This can cause silent file
dpkg: warning: overwrites and disappearances, and its general tools misbehavior.
dpkg: warning: See <https://wiki.debian.org/Teams/Dpkg/FAQ#broken-usrmerge>.
That suggests to run dpkg-fsys-usrunmess
which seems to have cleaned everything up.
That suggests to run dpkg-fsys-usrunmess which seems to have cleaned everything up.
No, that further breaks it, it means you won't be able to upgrade to bookworm. Delete the image and install it from scratch.
Is it possible to use the Linux distribution in WSL2 instead of WSL1?
No, that further breaks it, it means you won't be able to upgrade to bookworm. Delete the image and install it from scratch.
I am using Kali which is rolling so I am possibly already on a bookworm-ish state.
A new upload to the store has been done by the maintainer, and the Debian image is now merged-usr by default. Users on WSL 1.0 can uninstall and reinstall to fix this problem.
Still not working, I remove my Debian image using wsl unregister then uninstall it from start menu. Then, I download new image from https://aka.ms/wsl-debian-gnulinux.
I got a fresh Debian 11. After editing sources.list and upgrade:
Preparing to unpack .../archives/usrmerge_35_all.deb ...
Unpacking usrmerge (35) ...
Setting up usrmerge (35) ...
mv: cannot move '/lib/x86_64-linux-gnu/security' to '/usr/lib/x86_64-linux-gnu/security': Permission denied
FATAL ERROR:
mv --no-clobber /lib/x86_64-linux-gnu/security /usr/lib/x86_64-linux-gnu/security: rc=1
You can try correcting the errors reported and running again
/usr/lib/usrmerge/convert-usrmerge until it will complete without errors.
Do not install or update other Debian packages until the program
has been run successfully.
E: usrmerge failed.
dpkg: error processing package usrmerge (--configure):
installed usrmerge package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
usrmerge
E: Sub-process /usr/bin/dpkg returned an error code (1)
Is it possible to use the Linux distribution in WSL2 instead of WSL1?
Not in some cases. WSL2 requires Hyper-V. Some Virtual desktop systems like AWS WorkSpaces can't run a hypervisor like Hyper-V, because the system itself is a VM.
Here is a pure WSL1 workaround: https://github.com/microsoft/WSL/issues/4279#issuecomment-1846822075
Version
Microsoft Windows [Version 10.0.22000.978]
WSL Version
Kernel Version
Linux 4.4.0-22000-Microsoft
Distro Version
Debian Bookworm
Other Software
No response
Repro Steps
Expected Behavior
All system-critical/essential/default packages should upgrade correctly.
Actual Behavior
The installation of usrmerge fails. This bug effectively breaks the entire install of Debian Bookworm on WSL 1.0, because usrmerge is now a required dependency of the essential/system-critical package init-system-helpers, as of version 1.65~exp1 through the current version (1.65.2) of that package.
Diagnostic Logs
Setting up usrmerge (31) ... mv: cannot move '/lib/x86_64-linux-gnu/security' to '/usr/lib/x86_64-linux-gnu/security': Permission denied
FATAL ERROR: mv --no-clobber /lib/x86_64-linux-gnu/security /usr/lib/x86_64-linux-gnu/security: rc=1
You can try correcting the errors reported and running again /usr/lib/usrmerge/convert-usrmerge until it will complete without errors. Do not install or update other Debian packages until the program has been run successfully.
E: usrmerge failed. dpkg: error processing package usrmerge (--configure): installed usrmerge package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: usrmerge E: Sub-process /usr/bin/dpkg returned an error code (1)