Slashdot Mirror


File System Improvements To the Windows Subsystem for Linux (microsoft.com)

An anonymous reader shares a new article published on MSDN: In the latest Windows Insider build, the Windows Subsystem for Linux (WSL) now allows you to manually mount Windows drives using the DrvFs file system. Previously, WSL would automatically mount all fixed NTFS drives when you launch Bash, but there was no support for mounting additional storage like removable drives or network locations. Now, not only can you manually mount any drives on your system, we've also added support for other file systems such as FAT, as well as mounting network locations. This enables you to access any drive, including removable USB sticks or CDs, and any network location you can reach in Windows all from within WSL.

56 of 110 comments (clear)

  1. good by Anonymous Coward · · Score: 4, Funny

    I'm glad to see Microsoft fixing basic Linux problems. Perhaps this is the years of Linux on Windows on the desktop.

    1. Re: good by Anonymous Coward · · Score: 1

      This is MS fixing MS problems on Linux. Linux can already mount all those disk types just fine.

  2. Windows turning into another Linux distro? by Anonymous Coward · · Score: 5, Funny

    Seems like Microsoft is headed rapidly towards migrating towards full Linux compatibility. Soon we'll be able to run WINE under Windows.

  3. Vile company, vile methods by Ferocitus · · Score: 1

    Where will MS put their spyware after you've been "allowed" to do that all by yourself?

    --
    USB, USB, USB!
    1. Re:Vile company, vile methods by SirSlud · · Score: 1

      Allowed to do what?

      --
      "Old man yells at systemd"
  4. Any chance we can port this out by Anonymous Coward · · Score: 1

    ntfs-3g is terrified of touching a NTFS filesystem due to the risk involved with the journal not agreeing with the changes. Any chance we can reverse-engineer how WSL does it?

    1. Re:Any chance we can port this out by The+MAZZTer · · Score: 1

      It probably translates all the Linux calls into Windows calls straight into Windows' NTFS driver. So, probably not useful for what you're thinking.

    2. Re:Any chance we can port this out by tlhIngan · · Score: 4, Informative

      It probably translates all the Linux calls into Windows calls straight into Windows' NTFS driver. So, probably not useful for what you're thinking.

      Indeed that's what it is.

      WSL is effectively "GNU/kWindows" where Linux ELF binaries can run on the Windows kernel using the Linux kernel personality that translates Linux calls into Windows NT Kernel calls and where security, filesystems, etc are handled by the Windows kernel as expected.

      There's no linux code actually in the system (other than perhaps headers translating the syscall numbers into actual system calls). Likewise, networking is done via Windows NDIS networking, as well as all the other kernel services. Several times I had to sit down and figure out what was actually happening - I had to add an /etc/hosts entry and i needed to figure out how it worked. (Hint: WSL is a kernel layer, so what happens is glibc will look at /etc/hosts, so I should edit the ubuntu /etc/hosts, not the Windows one. The Windows one is used by the Win32 resolver, while the Ubuntu one is used by glibc, and the tools I was using use glibc).

    3. Re:Any chance we can port this out by wildstoo · · Score: 1

      Somewhere out there, APK's groin just twitched.

  5. wow by mattyj · · Score: 4, Funny

    They ported the 'mount' command to Linux! How novel!

    What's next, 'dir'?

    1. Re:wow by Carewolf · · Score: 1

      They ported the 'mount' command to Linux! How novel!

      What's next, 'dir'?

      I think it is the drvfs that is the new thing ;)

      Pretty neat syntax and rather flexible.
        mount -t drvfs D: /mnt/d
        mount -t drvfs "\\server\share" /mnt/sambashare

    2. Re:wow by The+MAZZTer · · Score: 1

      Actually the Windows command is "mountvol".

    3. Re:wow by Anonymous Coward · · Score: 1

      Let me know when they're done porting it.

      I'm not surprised that the Windows subsystem for Linux can mount a windows file system.
      It was almost interesting when I saw it could mount "other" filesystems, but they clarified that to mean "FAT" (as opposed to vFAT and NTFS I guess?).
      At what point will it be able to mount ext4, xfs, reiserfs, btrfs, jfs, etc. And, further, the fancier layered ones that add encryption and/or compression, LVM, mdraid, glusterfs, ceph, etc.

    4. Re:wow by Blaskowicz · · Score: 2

      Does Drvfs have a loop device? (or, if the question is wrong, does WSL have a loop device, working with no trouble on files on Drvfs volumes)
      Does WSL have FUSE? If so there are a number of things that should be doable, some rather basic stuff like sshfs and curlftpfs for a start. There's a ceph-fuse package for example, so while you might not want to run a ceph node, unless you don't care about speed / CPU or warts I don't know about, I assume it might be usable to access data on a ceph data store.

      Will Drvfs access "RAW" partitions that Windows doesn't know about or give a damn about? Then there's ext2 on FUSE, ZFS on FUSE, will those work?

      But all the stuff in the linux kernel, I guess that won't work, nor will MS implement everything. That's some amount of work, with data corruption or a lot of loss if buggy. There are likely other workarounds : use hardware raid, Windows software raid, use a linux VM on Hyper-V, if that works with Vt-d / IOMMU access to a SATA/SAS controller.

  6. Linux is sadly becoming irrelevant. by Anonymous Coward · · Score: 1, Funny

    I think we're seeing Linux becoming increasingly irrelevant.

    Linux had an important place in the 1990s. Back then, both Windows and Mac OS offered systems that were nothing like traditional UNIX. So Linux stepped in and provided a robust, reliable, and very capable OS back when its main competitors didn't (Windows and Mac OS), were expensive (commercial PC UNIXes), very limited (Minix), or tied up in a legal quagmire (the BSDs).

    But times change.

    Mac OS X and now macOS have brought us an extraordinarily high quality workstation OS built upon proven UNIX-style technologies, but while still offering a superb GUI environment.

    We've increasingly seen the robustness of Windows increase, and now we're even seeing it get better UNIX-like support than it has had in the past.

    The commercial UNIXes are quite irrelevant these days, outside of certain corporate niches.

    Minix has become irrelevant.

    The BSDs are doing well, and are seen as among the most trusted server OSes.

    These days, Linux finds itself lost and wandering.

    It still doesn't offer a desktop environment that's as pleasant to use as Windows and macOS are, while they offer a suitable enough UNIX-style environment. It still doesn't deliver the extraordinarily high degree of reliability that the BSDs offer.

    Linux has become a second-tier player across the board. It's nobody's first choice for a desktop environment. It's nobody's first choice for a server environment. Even in the mobile/embedded department, it tends to only be the kernel that's used, and even then it's buried under many layers of proprietary or custom software (like in Android).

    At this point, if you want a workstation OS you use macOS, or Windows, or FreeBSD.

    If you're running a server, you use FreeBSD or OpenBSD.

    If you're working on embedded software, you use NetBSD or just the Linux kernel as a simple hardware abstraction layer (and almost totally replace the userland).

    The need for traditional Linux distributions is coming to an end. I think that's why we've seen so much consolidation and so much thrashing around. Systemd, GNOME 3, Unity, Wayland, and PulseAudio are symptoms of Linux trying to stay relevant, but failing to do so. None of this software is as good as its competitors. There's no compelling reason to use any of it.

    I really don't like saying this, but I think Linux has lost its reason to exist. There are better workstation OSes. There are better server OSes. There are better mobile/embedded OSes. Traditional Linux distros have no place. They have no reason to exist.

    1. Re:Linux is sadly becoming irrelevant. by Alain+Williams · · Score: 2

      Stopped reading here, you're delusional.

      The pay cheque that he will get from some MS front will be very real.

    2. Re:Linux is sadly becoming irrelevant. by LVSlushdat · · Score: 4, Insightful

      Man, you ARE delusional.. Linux is the ONLY OS that doesn't treat *your* data as belonging to either Microsoft or Apple.. I used/supported Windows for 20 years as a sysadmin but when I retired I decided I was DONE with anything MS.. And after seeing what a nightmare shitfest Windows 10 is, I thank my lucky stars that something like Linux exists..

      --
      THANK YOU, Edward Snowden!! Americans owe you a debt of gratitude (whether they know it or not..)
    3. Re:Linux is sadly becoming irrelevant. by chipschap · · Score: 4, Insightful

      It still doesn't offer a desktop environment that's as pleasant to use as Windows .../p>

      I wouldn't characterize the Windows desktop environment as "pleasant to use" in any way, shape or form. I realize it's a matter of individual taste, but I've heard very few people (other than someone on the MS payroll) describe Windows as pleasant.

      Now, I don't know that I'd describe the various Linux desktops as necesarily "pleasant" but I would describe many as highly usable and an enabler in getting work done. I wouldn't describe Windows in such a way, either.

    4. Re:Linux is sadly becoming irrelevant. by Neuronwelder · · Score: 1

      Thanks for you comment. I was beginning to feel that I was alone. Feeling uneasy with the reaching of any OS into Linux. I fear security will be compromised, somehow..

    5. Re:Linux is sadly becoming irrelevant. by Anonymous Coward · · Score: 1

      I'm going join the chorus calling BS on this post, but since it has already been picked over, I'll just take these scraps:

      if you want a workstation OS you use macOS, or Windows, or FreeBSD.

      Plenty of developers that I have met and worked with prefer some flavor of Linux because they get a *nix-based system to test on that matches or closely approximates the platform they'll be deploying on, and, unlike macOS, they can customize the desktop environment to their workflow rather than conforming their workflow to the desktop environment. And WSL is still a sad April Fools joke to them.

      If you're running a server, you use FreeBSD or OpenBSD.

      You don't work anywhere near IT, do you? Of the servers I've stood up for corporate or client requests in the last 5 years, I'd say the breakdown has been about 80% RHEL, 20% Ubuntu, and a maybe a handful of BSD servers, most of which were basically networking appliances that happened to be built on BSD. I'm sure BSD stuff makes for a fine server, but to claim that BSD dominates Linux in usage in the server space is just delusional.

    6. Re:Linux is sadly becoming irrelevant. by Anonymous Coward · · Score: 1

      Linux is the ONLY OS that doesn't treat *your* data as belonging to either Microsoft or Apple.

      I would like to see some actual evidence of these assertions, it seems that the existence of telemetry then got extrapolated by some people to mean that everything on your computer belongs to the OS vendor when there is actually no evidence of this whatsoever. It's just hyperbole pushed by sensationalists.

      If I put a document on my C: then precisely how does this belong to Microsoft?

      Have you read the privacy policy?

      "We will access, disclose and preserve personal data, including your content (such as the content of your emails, other private communications or files in private folders), when we have a good faith belief that doing so is necessary to protect our customers or enforce the terms governing the use of the services."

    7. Re:Linux is sadly becoming irrelevant. by LordWabbit2 · · Score: 1, Troll
      Who the fuck modded you up? Linux is a pain to configure, 90% of anything needs to be done via the command line, that is not "pleasant".
      Reminds me of a quote from bash.org

      it only takes three commands to install Gentoo
      cfdisk /dev/hda && mkfs.xfs /dev/hda1 && mount /dev/hda1 /mnt/gentoo/ && chroot /mnt/gentoo/ && env-update && . /etc/profile && emerge sync && cd /usr/portage && scripts/bootsrap.sh && emerge system && emerge vim && vi /etc/fstab && emerge gentoo-dev-sources && cd /usr/src/linux && make menuconfig && make install modules_install && emerge gnome mozilla-firefox openoffice && emerge grub && cp /boot/grub/grub.conf.sample /boot/grub/grub.conf && vi /boot/grub/grub.conf && grub && init 6
      that's the first one

      --
      There are three kinds of falsehood: the first is a 'fib,' the second is a downright lie, and the third is statistics.
    8. Re:Linux is sadly becoming irrelevant. by jimtheowl · · Score: 2

      I don't want to give too much credence to your 90% statement as statistics are 97% made up. I mostly use BSD, but Linux comes across as quite usable from the desktop; much more than Windows where they keep changing everything around with every version. The first thing I have to do when opening the Control Pannel is type what I want in the search field.

      But what is impressive in your statement is that you actually can do this stuff from the command line. You see, computers are all about automation, and that means the ability to re-use your work. You can put it in a script so you don't have to type it again and share it with the world. Mouse clicks are forever wasted.

    9. Re:Linux is sadly becoming irrelevant. by Highdude702 · · Score: 1

      My hatred for Microsoft products comes from the plethora of exploits after EVERY update. Yes its possible on Linux also, but is very few and far between and they get fixed almost instantaneously not "next month" like Microsoft does.

    10. Re:Linux is sadly becoming irrelevant. by mcswell · · Score: 1

      I run a Windows desktop at home, and Windows at work. (For various reasons, one of which is I have a self-written keyboard remapper that would be hard to port to Linux because of the way it hooks into the OS. At least I've never figured out how to do it.)

      But I do all my software development on Linux. It's just easier than on Windows. And from what I've heard, I'm the kind of person bash-in-Windows is intended for. I've already gotten rid of CygWin on my home Windows machine in favor of this new bash-in-Windows. If I had bash and other Linux utilities on my work computer, I could dispense with most of the need for logging into a separate Linux computer from Windows, using sftp (which btw broke the other day for Java-based programs, after we did a Java update; unclear as yet why).

      So at this point Linux is definitely not irrelevant to me. When this Linux-in-Windows becomes available on my work computer, I may no longer need a separate Linux computer for most of what I do. (It would still be useful for heavy duty compiles, large data processing, etc.)

      I will also say that I find Windows 10 terminally ugly, as compared with Win7 and XP. I'm guessing I would find some Linux desktop easier on the eyes, but I haven't experimented enough with that, and I suppose that's not a major consideration.

    11. Re:Linux is sadly becoming irrelevant. by mcswell · · Score: 1

      Someone else (me) said that if Windows were an Indiana Jones movie, then Win7 and XP would star Harrison Ford, while Win10 would star Lego blocks. I do find it terminally ugly, not to mention the fact that it goes out of its way to prevent you from telling by looking which window has keyboard focus.

    12. Re:Linux is sadly becoming irrelevant. by chipschap · · Score: 1

      Who the fuck modded you up? Linux is a pain to configure, 90% of anything needs to be done via the command line, that is not "pleasant".

      Well, at least you're not an AC. But if you read my post correctly, you'd see that I didn't describe Linux as necessarily pleasant. I did describe it as highly usable and an enabler for getting work done. I can't dispute your 90% figure either way, but there is little doubt that the command line is efficient, usable, and enables you to do a lot in a short time. Of course, you have to bother to learn to use it. I find that bother much more profitable a use of my time than trying to figure out where MS hid things with their ongoing UI changes. Charms bar, indeed.

    13. Re:Linux is sadly becoming irrelevant. by chipschap · · Score: 1

      You see, computers are all about automation, and that means the ability to re-use your work. You can put it in a script so you don't have to type it again and share it with the world.

      And this is an incredibly relevant point, thank you for making it. Reusable scripts for a large variety of common tasks create enormous work efficiency. It takes a little time to set up a script, perhaps, but then over the next thousands of times you use it you reap the benefits.

      Just as an example --- the University of Hawai`i wifi requires a login pretty much every time you connect. I don't need to start up my web browser and click through things. I took an hour to make and debug an 'expect' script that automates the process. It saves me maybe a minute every time I use it, which is sometimes many times in a day. Payback? Enormous over time. And that's only one script for one use.

    14. Re:Linux is sadly becoming irrelevant. by LordWabbit2 · · Score: 1

      Look, I wasn't trying to be a troll and bash linux (pun intended) I use Linux at home for my media center and file storage, and Linux has gotten more friendly - but it still has a long way to go before it's as user friendly as Windows.

      A LOT of people do not want to use, or learn how to use, the command line.

      Until the Linux developers figure that out (Mark tried with Ubuntu) Linux is not going to replace windows. It's that simple. You can spout the incredibleness of scripting and stuffs but if the windows person you are selling it to doesn't give a fuck you are wasting your time. BTW all of this scripting goodness can be done in windows, I always have a power shell open, haven't played with bash on windows yet.

      And just to clarify I use the command line all the time, be it in windows or linux.

      --
      There are three kinds of falsehood: the first is a 'fib,' the second is a downright lie, and the third is statistics.
    15. Re:Linux is sadly becoming irrelevant. by chipschap · · Score: 1

      A LOT of people do not want to use, or learn how to use, the command line.

          Until the Linux developers figure that out (Mark tried with Ubuntu) Linux is not going to replace windows. It's that simple.

      Actually, even as a Linux fan, I have to take the other side and say Linux is NEVER going to replace Windows. And I don't even try to sell it to established Windows users. Linux attracts its own audience, which will stay a minority. I'm okay with that.

      (This is not an elitist thing, by the way. To each his own. Linux appeals to me, Windows does not, end of story.)

  7. What is it? by freeze128 · · Score: 2

    What is the Windows Subsystem for Linux, and why would I want to use it? Can't linux already mount SMB shares? I don't understand this.

    1. Re:What is it? by markhb · · Score: 3, Informative

      It's an Ubuntu subsystem on Windows 10 that allows you to run (some) ELF binaries directly from within the Windows environment.

      --
      Save Maine's economy: write stuff down. All comments are exclusively my own, not my employer.
    2. Re:What is it? by brianerst · · Score: 3, Informative

      It's basically an Ubuntu (?) distribution that runs within Windows - not as an emulation / WM but as a subsystem that converts the Linux ABI into Windows calls. A very large chunk of the user space Linux stuff will run in Windows now.

    3. Re:What is it? by Anonymous Coward · · Score: 1

      Call it "LINE" for "LINE Is Not an Emulator", and it makes slightly more sense. LINE for Windows is kinda-sorta-not-really like WINE for Linux. Embrace Extend Extinguish continues.

    4. Re:What is it? by wjcofkc · · Score: 1, Informative

      You can now use any Linux distro as a subsystem. All-in-all, it's pretty great.

      --
      Brought to you by Carl's Junior.
    5. Re:What is it? by wjcofkc · · Score: 1, Insightful

      I should also point out that you can run X-Windows under MS Windows. In combo with the subsystem, I have had no problem running Linux X apps under MS Windows.

      --
      Brought to you by Carl's Junior.
    6. Re:What is it? by OrangeTide · · Score: 4, Insightful

      Oh my, how you youngsters so quickly forget the Halloween documents.

      --
      “Common sense is not so common.” — Voltaire
    7. Re:What is it? by aliquis · · Score: 1

      There's no such thing as X-Windows.

      The system is called X Window System, the last (large) version is 11, hence X11 or followed by R and the revision number.

      The most used implementations today is X.Org and XFree86.
      Wayland is in alternative to X Window System (as in not X Window System)

    8. Re:What is it? by wjcofkc · · Score: 1

      Xming

      --
      Brought to you by Carl's Junior.
    9. Re:What is it? by wjcofkc · · Score: 1

      If I wasn't drunk I would say clearly you haven't been using Linux for a quarter of a century but I am so I won't otherwise I would get modded down.

      --
      Brought to you by Carl's Junior.
    10. Re:What is it? by dunkelfalke · · Score: 1

      Since the Halloween documents there have been two CEO changes at Microsoft. It is not quite the same company now.

      --
      "It's such a fine line between stupid and clever" -- David St. Hubbins, Spinal Tap
    11. Re:What is it? by OrangeTide · · Score: 1

      Sure, it is entirely possible that Microsoft has amended their bad ways and are on a straight and narrow course.

      But with the long history it is quite reasonable for us to be skeptical of every action from them. I refuse to take what Microsoft says at face value alone.

      --
      “Common sense is not so common.” — Voltaire
    12. Re:What is it? by OrangeTide · · Score: 1

      And the Vietnam War ended over 40 years ago, and people still question the US's motives in international politics.

      Time may heal all wounds, but it doesn't guarantee trust, trust has to be earned.

      --
      “Common sense is not so common.” — Voltaire
    13. Re:What is it? by freeze128 · · Score: 1

      That's why I was confused. Microsoft also had some software that allowed you to map Novell drives on Windows, and they called it something like "Windows support for Novell", when it really should be "Novell support for Windows". I guess they just wanted the "Windows" name first.

    14. Re:What is it? by mcswell · · Score: 1

      Your real name wouldn't be Richard Stallman, would it?

  8. Re:who is it for? by ThePawArmy · · Score: 1

    And, you know, serial support... https://blogs.msdn.microsoft.c...

  9. Re:Yet another decades-old Windows limitation. by Blaskowicz · · Score: 1

    This might be a common theme in Windows, e.g. a printer or network driver implements rather high level features instead of a system wide layer doing it for everyone.
    This might be backwards, have roots to 1993 or earlier, I don't know but a decade of driver compatibility isn't unheard of and the typical effect was : you use the driver CD included with your hardware, and you get your recto verso printer working, your scanner scanning, your tuner can tune channels or stations, your network card can do ethernet bonding (well, some high end Intel I guess), your graphics card comes with a GUI panel for triple buffering, vsync, brightness, gamma, texture filtering etc.

    While under linux, you seemingly need an internet connection to install a word processor. Did you know, before broadband and on this side of the Atlantic, spending days downloading things from the internet would have quickly enough run a phone bill over $1000, what with there being 1440 minutes in a day.

  10. ZFS in Windows by aliquis · · Score: 1

    Please Microsoft.

    Or any other file-system with checksums.

    1. Re:ZFS in Windows by Blaskowicz · · Score: 1

      They're introducing ReFS in Windows 10, or un-hiding it.
      It lacks quotas, compression, lacks quite a few things but checksums is what it is for.

    2. Re:ZFS in Windows by aliquis · · Score: 1

      It can also correct errors? Not just detect them?

    3. Re:ZFS in Windows by Blaskowicz · · Score: 1

      I think so, yes. Data scrubbing. I even saw a screenshot where in the GUI for checking a drive, you get a popup that tells you you can't run the drive check nor need it (in drive properties, whatever)

      Maybe you have Storages Spaces for "RAID 1" or spanning drives with some parity, I don't know the details of that.
      Don't look for NTFS specific features etc. though.

  11. Cygwin by MrKaos · · Score: 2

    Meanwhile Cygwin already does this and much more. Essentially bash on Win 10 that seems like an admission that powershell, whilst powerful, is about as an inelegant and clunky as it gets.

    As a fallback my colleague did a installation of cygwin on Windows 10 and it seems to be broken after working flawlessly since XP. I've got a new install of Win10 for testing cygwin on as the Microsoft offering is pretty primitive. I don't understand why microsoft doesn't get behind the cygwin project and make it better as it already does what they are attempting to do, only better.

    --
    My ism, it's full of beliefs.
    1. Re:Cygwin by Anonymous Coward · · Score: 2, Informative

      Because you can't fork() from win32. The cygwin1b.dll implements emulated fork functionality but it is slow as shit after decades. By creating a native subsystem, you can fork/exec at the same speed of CreateProcess with the added benefit of being fully binary compatible.

      There was an effort to add Linux ABI support on top of cygwin years ago, it worked for linux32 applications, it was called LINE.

      A real subsystem is better in every way.

    2. Re:Cygwin by MrKaos · · Score: 1

      for my purpose of logging into my more serious Linux boxes from my gaming computer, it is definitely doing a fine enough job.

      Thanks for the info. Coincidentally, that is *exactly* what I am doing.

      --
      My ism, it's full of beliefs.
    3. Re:Cygwin by thevirtualcat · · Score: 1

      I was going to reply with "CreateProcess() isn't exactly fast." When compared with fork() in modern Linux, it isn't. But when I started digging into the Cygwin source to find the CreateProcess (or NtCreateProcess) that I knew it would inevitably call, I found it buried a lot deeper than I expected.

      https://cygwin.com/git/gitweb....

      Obviously, since WSL isn't open source, I can't dig into it and see what they're doing. But if I had to guess, I'd imagine they're doing something in kernel space that makes fork() at least as fast as CreateProcess().

  12. Re:Yet another decades-old Windows limitation. by drinkypoo · · Score: 1

    While under linux, you seemingly need an internet connection to install a word processor.

    If you're willing to jump through some hoops, you can get around that. You can manually bring home packages files, generate download lists, and then take them to some other location to make your download. It's pretty painful, though.

    --
    "You're right," Fisheye says. "I should have set it on 'whip' or 'chop.'"