WSL: Initial install fails with 0x8007001f
Performing the initial install of the bare Ubuntu system fails.
C:\>bash
-- Beta feature --
This will install Ubuntu on Windows, distributed by Canonical
and licensed under its terms available here:
https://aka.ms/uowterms
Type "y" to continue: y
Downloading from the Windows Store... 100%
Extracting filesystem, this will take a few minutes...
Please create a default UNIX user account. The username does not need to match your Windows username.
For more information visit: https://aka.ms/wslusers
Enter new UNIX username: DrPizza
Creating UNIX user failed, this can be done later by running lxrun.exe /setdefaultuser
Installation successful!
The environment will start momentarily...
Documentation is available at: https://aka.ms/wsldocs
Error: 0x8007001f
I’m on 14393.5
I turned on the Linux subsystem (the PC was already in developer mode), rebooted, and ran bash at an Administrator command prompt.
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Reactions: 3
- Comments: 37 (8 by maintainers)
Oh well, would you look at that.
Changing the policy and running gpupdate confirms it; this is what’s messing with the key.
Probably a relic of the SUA/Interix days, where I wanted to ensure that case sensitivity was allowed. I’m guessing that the value will stop getting changed now.
Now, I still feel that it should be working regardless of the value, especially as @benhillis says that it was working for him regardless (presuming he rebooted between each trial? The value only gets read at system start). It seems a little peculiar that enabling case-sensitive subsystems should break a case-sensitive subsystem.
Some programs bypass the Windows API, via the NT API or device drivers, and fail to set
OBJ_CASE_INSENSITIVEin a system call’sOBJECT_ATTRIBUTES. From what I can tell, rather than fix this code, XP (NT 5.1) added theObCaseInsensitiveregistry setting, which is enabled by default. Is that the rationale? If not, I wish someone on the kernel team would write an article explaining the rationale for this change. It breaksFILE_FLAG_POSIX_SEMANTICS(CreateFile),FIND_FIRST_EX_CASE_SENSITIVE(FindFirstFileEx), and the older POSIX subsystem (and Cygwin). It was never even documented that the default configuration in XP and later breaks these WinAPI flags.Please, try to fix your code to work when the
ObCaseInsensitivesetting is disabled. Drivers and NT API programs that need case-insensitive access should specifyOBJ_CASE_INSENSITIVEwhen opening objects by name. Anything else is a bug.I disabled the protection on the svchost.exe process to attach a debugger and track the problem to an
NtDeviceIoControlFilesyscall directed at\Device\lxsswith I/O control code 0x00220073 (function 28). The call has the following stack trace:It fails with the generic status code
STATUS_UNSUCCESSFUL(0xC0000001), which maps to theHRESULTcode 0x8007001F, i.e. the Windows error (0x8007)ERROR_GEN_FAILURE(0x001F).I get the same error, but only if I disable caseinsensitivity in windows by setting
HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\ dword:ObCaseInsensitiveto0(see https://technet.microsoft.com/en-us/library/cc725747.aspx) (I use this setting this for cygwin, see https://cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-casesensitive)This Problem was also mentioned here: https://github.com/Microsoft/BashOnWindows/issues/101 But that issue is closed now, because /mnt/* is now case sensitiv by default.
If I set ObCaseInsensitive to
1: => Ubuntu on Windows works fine, but cygwin isn’t casesensitiv any more.How glorious.
My previously working WSL has now stopped working with, guess what, error
0x8007001f.And so I look in the registry and… something has flipped obcaseinsensitive to 0. What changed it? Who knows!
On the one hand, I wish I could figure out why the object manager keeps being reverted to the case sensitive mode. I think the default was switched around XP time, and since I don’t need any other behaviour it’s probably better to stick with the default.
On the other hand, I figure that at least for the short term people are gonna want to mix and match Cygwin and WSL, and having Cygwin be case-sensitive probably helps this. It seems really kind of weird that a Linux-like subsystem, of all things, should throw a fit when the Object Manager is doing case sensitive lookups!