Giter VIP home page Giter VIP logo

Comments (7)

RoliSoft avatar RoliSoft commented on June 21, 2024

This is actually an issue with WSL, since lxrun is the one running the adduser --quiet command.

One possible workaround for this would be to create a hook script which replaces adduser during installation with a wrapper that removes the unsupported --quiet argument. That, or it updates adduser to one which supports it.

from wsl-distribution-switcher.

thebitstick avatar thebitstick commented on June 21, 2024

Why not use CentOS 7?

from wsl-distribution-switcher.

jdmansour avatar jdmansour commented on June 21, 2024

@thebitstick I'm trying to run some legacy software I use at work. The programs exist in binary form and run on CentOS 6 (well, Scientific Linux 6 which is the same). On every other OS like Centos 7 or Ubuntu, I would have to do a lot of hacks with LD_LIBRARY_PATH and so on. It would be very complicated to compile everything from scratch.

@RoliSoft It's tricky... the hook script only runs after switching to the new OS, which is too late. I can't run bash.exe do do anything with CentOS. I am trying to replace adduser during install.py, but that is quite hard. lxrun doesn't run adduser if it is a script, so I have to compile a binary (on another CentOS 6 system). Also, on CentOS, adduser is a link to useradd, which is a different program on Ubuntu...

from wsl-distribution-switcher.

thebitstick avatar thebitstick commented on June 21, 2024

@jdmansour @RoliSoft you could try adding to the install.py something that checks if installing CentOS 6 or other out-of-date distros and change the command from adduser --quiet to to adduser

from wsl-distribution-switcher.

jdmansour avatar jdmansour commented on June 21, 2024

The adduser command gets called by lxrun, not directly by the installation script. Anyway, I believe this is not the core problem. I can sidestep this issue by using lxrun /setdefaultuser root before running the install script. In this case there is no error message, but I still can't enter WSL. bash.exe doesn't work, nor does anything like bash.exe ls. Strangely enough, lxrun.exe can successfully start binaries (like adduser, usermod, passwd) in the CentOS image, but bash.exe refuses to do anything, and gives no error message.

from wsl-distribution-switcher.

RoliSoft avatar RoliSoft commented on June 21, 2024

@jdmansour Writing to files outside of WSL is very tricky indeed. One thing I found that mostly works, is to not create/delete the file, but rather append to it.

Truncation works with some applications, but not with others. I haven't been able to consistently and successfully truncate files and replace their content from outside of WSL yet.

That being said, files like /etc/passwd are truncated and overwritten by the installer script, and they seem to work.

It would really save a lot of trouble if Microsoft would release some documentation or expose new APIs to write VoIFs metadata to regular files.

from wsl-distribution-switcher.

udif avatar udif commented on June 21, 2024

I'm running into the same problem, for the same reasons (legacy compatibility).
I wounder if this can be bypassed by copying the centos:6.x root under another minimal root and then chroot-ing into the centos:6.x directory?
Yes, this would probably work on 1703/RS2/Creators-Update and forward only.

from wsl-distribution-switcher.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.