Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Having issues with a missing uppercase from in ubuntu 16.04.2 tar file #21

Closed
lewisdonofrio opened this issue Feb 7, 2018 · 72 comments
Closed

Comments

@lewisdonofrio
Copy link

Anyone know why lxoffline would be looking for a capital TTL when only lowercase exists? https://1drv.ms/i/s!AsBlZbBf72iNoL5YhDgFZt47nBHROQ (skip onedrive login - unneeded)

@VMinute
Copy link

VMinute commented Feb 7, 2018

I have the same issue with both the MS download and the one from ubuntu website (different file name, same issue with case).
I installed it on a different PC two weeks ago and didn't had any issue, by the way.

@lewisdonofrio
Copy link
Author

I'm even trying the wslbridge way and all I get is https://1drv.ms/i/s!AsBlZbBf72iNoL5ZppPELS-VXYMrEA ;(

@lewisdonofrio
Copy link
Author

used to "just work" but without the store (like most smart corps will do - not install or GP lockout the store to control application footprints) I was following my older guide from last year - http://www.tinyurl.com/donofrioworkdesk (again ignore onedrive unneeded login) but I cannot get past the lxrun parts now ;(

@VMinute
Copy link

VMinute commented Feb 7, 2018

I think that the issue is related to the fact that you actually have two files with same name and different case. This work in the installation path of the WSL subsystem, but does not seem to work (anymore) when you use lxrunoffline.
I am creating my root folder on an NTFS disk and it should support case-insensitive names.
I debugged the code and seems that the call to NtCreateFile in GetFileHandle (LxRunOffline\LxssFileSystem\LxssFileSystem.cpp) fails, even if the flags passed via OBJECT_ATTRIBUTES struct are correctly set to 0 (you should set OBJ_CASE_INSENSITIVE to force case-insensitive matching).
I also checked the registry entry described here:
http://www.nicklowe.org/2012/02/understanding-case-sensitivity-in-windows-obcaseinsensitive-file_case_sensitive_search/
and my system seems to be correctly configured to be case-insensitive.
I can't access the PC I used last week, installing multiple times the ubuntu image with no issues. I'll check as soon as I'll be able to access it again.

@lewisdonofrio
Copy link
Author

Well I do not have two files same name, it's looking for the opposite case file than what its says, the error states "cannot locate TTL" in caps when you can seen from first screengrab that indeed the file listed is "ttl" in lowercase....I have machines to test with just need to know what to do to get this working again.

@VMinute
Copy link

VMinute commented Feb 7, 2018

If you check inside the tar.gz you have two files with same name inside that folder (under rootfs).
It creates the first one and fails when trying to create second one.
But the interesting thing is that I just rebooted my PC (I didn't reboot it after installing lxrunoffline using chocolatey) and now it works. Same source file, no windows updates in between.
I hate to say "can you try to reboot", but this seem to fix the issue, for me at least.

@lewisdonofrio
Copy link
Author

I rebooted but have not used choco to run lxoffline just grabbed the zip file did the dance and rebooted and returned and it didn't seem to know that is was set, I'll check on another box in an hour'ish (anyone know if this good project has an irc room on some server?)

@DDoSolitary
Copy link
Owner

DDoSolitary commented Feb 8, 2018

@VMinute Either during choco install/upgrade lxrunoffline or lxrunoffline install console output would mention rebooting your PC to let registry changes take effort.

https://github.com/DDoSolitary/LxRunOffline/blob/master/choco/tools/chocolateyInstall.ps1#L12

https://github.com/DDoSolitary/LxRunOffline/blob/master/LxRunOffline/Utils.cs#L77-L79

@DDoSolitary
Copy link
Owner

@lewisdonofrio

the error states "cannot locate TTL" in caps when you can seen from first screengrab that indeed the file listed is "ttl" in lowercase....

What happens here is that:

  1. libipt_ttl.so was extracted
  2. LxRunOffline tried to extract another file named libipt_TTL.so.
  3. It found out that there was already a libipt_ttl.so.

@DDoSolitary
Copy link
Owner

DDoSolitary commented Feb 8, 2018

@lewisdonofrio Could you please provide the following information:

  • Your Windows 10 version.
  • The value of the registry key HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Kernel\obcaseinsensitive.
  • Is the error message same as that before rebooting?

@VMinute
Copy link

VMinute commented Feb 8, 2018

Sorry, I missed the message. My fault.

@lewisdonofrio
Copy link
Author

w10 enterprise version is 1709/16299.192 and regedit shows obcaseinsensitive = 0

@DDoSolitary
Copy link
Owner

Then could you please check this group policy value: Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options\System objects: Require case insensitivity for non-Windows subsystems

@lewisdonofrio
Copy link
Author

The setting is set to "Enabled"

@lewisdonofrio
Copy link
Author

are you good folks on iirc

@lewisdonofrio
Copy link
Author

I'm on #ubuntu-on-windows @ freenode fwiw..... ;)

@DDoSolitary
Copy link
Owner

DDoSolitary commented Feb 9, 2018

The setting is set to "Enabled"

That's really strange. This group policy setting simple depends on the obcaseinsensitive registry value but now these two have opposite values. Please try setting it to "Disabled", reboot your system and then run LxRunOffline.

are you good folks on iirc

I rarely use irc rooms because I'm not confident enough about my English to chat in realtime.

@lewisdonofrio
Copy link
Author

I seen you just then on freenode, thanks for trying, even if english bad it's always good to talk with you on irc and here, I'll try you suggestion now.

@lewisdonofrio
Copy link
Author

When I set it to 0 and reboot I get this ;(

PS C:\Users\donofrio\Downloads> LxRunOffline.exe install -n Ubuntu -f 'C:\Users\donofrio\bionic-server-cloudimg-amd64.tar.gz' -d %localappdata%\lxss
[ERROR] The registry value "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Kernel\obcaseinsensitive" has been set to "1" to make sure this operation works properly. Please restart your system and then rerun the command.
PS C:\Users\donofrio\Downloads>

@DDoSolitary
Copy link
Owner

DDoSolitary commented Feb 9, 2018

Oh, I just spotted a problem in the error message, the registry is actually set to "0" but the message says it is set to "1". But it is irrelevant to your problem.

When I set it to 0 and reboot I get this

Well, please make sure that the registry value is set to "0" and the group policy is set to "Disabled" and then reboot. Remember to check the registry value after changing the group policy. Generally, such error message should only be displayed when obcaseinsensitive is "1".

@DDoSolitary
Copy link
Owner

On my PC, obcaseinsensitive is automatically set to "0" after setting the group policy to "Disabled"...

@lewisdonofrio
Copy link
Author

ok how do I get this to work if that group policy setting is greyed out even when I have admin privs?

@lewisdonofrio
Copy link
Author

what do I want the setting to be for "obcaseinsensitive" 1 or 0 cause when 0 the lxinstaller throws that error?

@DDoSolitary
Copy link
Owner

what do I want the setting to be for "obcaseinsensitive" 1 or 0 cause when 0 the lxinstaller throws that error?

Well, I guess the registry value would be reset by the group policy.

ok how do I get this to work if that group policy setting is greyed out even when I have admin privs?

Is this computer under a domain? You may have to edit group policy settings on the domain controller.

@lewisdonofrio
Copy link
Author

Ok so did you update the code to work around this setting? I noticed a diff that looked like you changed something around this issue. I have no access to anything ads at all.

@DDoSolitary
Copy link
Owner

No, I didn't. And I think I can't help you if the group policy is set in the domain. I'm not intelligent enough to work around a Microsoft's security mechanism when you don't have enough privilege. 😅

@lewisdonofrio
Copy link
Author

So I'm lost - do I need to set this to 1 in the registry or is that what happens after reboot? Just wanting to rebuild my left w10 system, from that onedrive link, I'm on right system now. I'm wondering if this is already enabled from gpo (hence the "Enabled" for the "System objects: Require case insensitivity for non-Windows subsystems" in the current group policy.)

@refparo
Copy link

refparo commented Feb 11, 2018

I just ran into the same issue when trying to install Arch Linux.

Images

default
default
default
default
default

@DDoSolitary
Copy link
Owner

@lewisdonofrio
Copy link
Author

lewisdonofrio commented Feb 15, 2018

ok it worked, but where is my user? I do not want access to root unless I sudo to root....

Command line output
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS H:\> wsl
Windows Subsystem for Linux has no installed distributions.
Distributions can be installed by visiting the Windows Store:
https://aka.ms/wslstore
PS H:\> c:
PS C:\> cd C:\tools\lxrunoffline\
PS C:\tools\lxrunoffline> .\LxRunOffline.exe run -n Ubuntu
root@WSAL0013:/mnt/c/tools/lxrunoffline#

@DDoSolitary
Copy link
Owner

@lewisdonofrio You should add the user in the Linux environment with the adduser command, lookup the user's ID in /etc/passwd and then set it as the default user via LxRunOffline config-uid -n Ubuntu -v <your UID here>.

@lewisdonofrio
Copy link
Author

YES :)

PS C:\tools\lxrunoffline> .\LxRunOffline.exe run -n Ubuntu
donofrio@WSAL0013:/mnt/c/tools/lxrunoffline$

@lewisdonofrio
Copy link
Author

Now back full circle what am I doing wrong?
PS C:\tools\lxrunoffline> .\LxRunOffline.exe install -n bionic -f 'C:\Users\donofrio\Downloads\bionic-server-cloudimg-amd64.tar.gz' -d C:\Users\donofrio\bionic
PS C:\tools\lxrunoffline> .\LxRunOffline.exe run -n bionic
Error: 0x80070002

@DDoSolitary
Copy link
Owner

@lewisdonofrio #21 (comment)

You're even using the wrong .tar.gz file. See Wiki to get a correct one.

@lewisdonofrio
Copy link
Author

I'm trying to get a new instance now that 16.04 is working again

@lewisdonofrio
Copy link
Author

and I'd like to not to anything with docker at this time, that is why I'm trying the server bionic

@DDoSolitary
Copy link
Owner

DDoSolitary commented Feb 15, 2018

You don't need to use Docker. You simply download the tar files built for Docker, which essentially contain the same "Ubuntu" as the files downloaded from https://cloud-images.ubuntu.com.

BTW, I don't recommend installing bionic on W10 v1709. It still has a lot of compatibility issues and you can't even make apt-get work properly. I think the next release of W10 (the RS4 branch) would solve most of them.

@lewisdonofrio
Copy link
Author

lewisdonofrio commented Feb 15, 2018

and with that success I thank you and I'm going to bed now - yawn

Command line output
PS C:\tools\lxrunoffline> .\LxRunOffline.exe install -n bionic -f 'C:\Users\donofrio\Downloads\ubuntu-bionic-core-cloudimg-amd64-root.tar.gz' -d C:\Users\donofrio\bionic
[WARNING] Ignoring the file "dev/null" of unsupported file type '3'.
[WARNING] Ignoring the file "dev/tty" of unsupported file type '3'.
[WARNING] Ignoring the file "dev/zero" of unsupported file type '3'.
PS C:\tools\lxrunoffline> .\LxRunOffline.exe run -n bionic
root@WSAL0013:/mnt/c/tools/lxrunoffline# cat /etc/*release*
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu Bionic Beaver (development branch)"
NAME="Ubuntu"
VERSION="18.04 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu Bionic Beaver (development branch)"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
root@WSAL0013:/mnt/c/tools/lxrunoffline#

@lewisdonofrio
Copy link
Author

wait what? why does sudo do this?

PS C:\tools\lxrunoffline> LxRunOffline config-uid -n bionic -v 1000
PS C:\tools\lxrunoffline> .\LxRunOffline.exe run -n bionic
donofrio@WSAL0013:/mnt/c/tools/lxrunoffline$ sudo su -
bash: sudo: command not found
donofrio@WSAL0013:/mnt/c/tools/lxrunoffline$

@DDoSolitary
Copy link
Owner

DDoSolitary commented Feb 15, 2018

Because you haven't installed sudo. 😓 apt-get install sudo

The "core" version of Ubuntu is a barebone environment. You have to manually install many packages that you use every day on "server" or "desktop" releases.

@lewisdonofrio
Copy link
Author

K, had to fix sudo on 16.04 lol, say what is script that would add me to all the default groups like cdrom and such?

@lewisdonofrio
Copy link
Author

looks like lots is missing from 18.04 tar, wondering if I can do apt-clone to add needed packages like nano and the like :) from 16.04 to 18.04 install

@DDoSolitary
Copy link
Owner

DDoSolitary commented Feb 15, 2018

Simply install some packages.

apt-get install ubuntu-minimal ubuntu-standard ubuntu-server

@lewisdonofrio
Copy link
Author

last'ish question - how to I get bash to run like it did when installed like it was in 1703 (that I'd see a little "Bash" icon on the start menu, so far I'm starting bash session from powershell?

@lewisdonofrio
Copy link
Author

also how do I resolve this resolve.conf issue :(
https://apaste.info/vSjK

@lewisdonofrio
Copy link
Author

Anyone got time to help me get past this issue: (https://apaste.info/FuPD)
Setting up systemd (235-3ubuntu3) ...
[/usr/lib/tmpfiles.d/tmp.conf:15] Failed to replace specifiers: /tmp/systemd-private-%b-*
[/usr/lib/tmpfiles.d/tmp.conf:16] Failed to replace specifiers: /tmp/systemd-private-%b-/tmp
[/usr/lib/tmpfiles.d/tmp.conf:17] Failed to replace specifiers: /var/tmp/systemd-private-%b-

[/usr/lib/tmpfiles.d/tmp.conf:18] Failed to replace specifiers: /var/tmp/systemd-private-%b-*/tmp
dpkg: error processing package systemd (--configure):
installed systemd package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
systemd

@DDoSolitary
Copy link
Owner

DDoSolitary commented Feb 18, 2018

last'ish question - how to I get bash to run like it did when installed like it was in 1703 (that I'd see a little "Bash" icon on the start menu, so far I'm starting bash session from powershell?

See #27 and #24.

Anyone got time to help me get past this issue
also how do I resolve this resolve.conf issue :(

It's not a problem specific to this project. I think it's better to ask at https://github.com/Microsoft/WSL/issues.

@mlkt
Copy link

mlkt commented Feb 22, 2018

英语很烂不好意思 直接用中文说了
我也遇到这个问题 但是把obcaseinsensitive改成0之后重启我这会不断蓝屏重启 看日志好像是说找不到C:\Windows目录 我看了下错误日志应该是系统加载的时候用的是C:\WINDOWS这个全大写的路径 改成大小写敏感之后就找不到了
系统版本是 Windows 10 专业版 1709 16299.248

然后我想了下在wsl里面本来就是不区分大小写的 所以我进到wsl里面手动解压 确实是成功了
执行 LxRunOffline register -n test-sys -f D:\test-sys 注册完成
但是 LxRunOffline run -n test-sys
显示错误: 0x8007054f

请问是怎么回事?

我安装的是 https://github.com/tianon/docker-brew-ubuntu-core/blob/85822fe532df3854da30b4829c31878ac51bcb91/xenial/ubuntu-xenial-core-cloudimg-amd64-root.tar.gz

@lewisdonofrio
Copy link
Author

fow what it's worth on my setup (http://www.tinyurl.com/donofrio1804) I do not use the docker file but the squishfs file then convert to install.tar.gz and just run ubuntu.exe and it setup's up like it always had (only not pulling from ms-store)

@DDoSolitary
Copy link
Owner

DDoSolitary commented Feb 22, 2018

@mlkt 麻烦解释下你是怎么进wsl解压的。。如果你是指用别的wsl环境解压到/mnt/d/test-sys的话那是不行的,因为通过/mnt写入的文件不带有wsl内部文件所需的NTFS扩展属性。

obcaseinsensitive导致蓝屏重启应该是因为有智障驱动在InitializeObjectAttributes()的时候忘记传OBJ_CASE_INSENSITIVE了,微软的官方驱动是不会有这样的问题的。讲道理的话在蓝屏的时候会有显示是哪个驱动出了问题(名字一般是xxx.sys),你可以看看是哪里出了问题。关于这个注册表项的问题我也在和微软沟通( microsoft/WSL#2954 )在微软解决之前你可以先用 @lewisdonofrio 提出的方法。

@mlkt
Copy link

mlkt commented Feb 24, 2018

好的,谢谢。只是我那个蓝屏上面只显示了SYSTEM_THREAD_EXCEPTION_NOT_HANDLED,没有显示是哪个驱动的错误...日志里输出来的错误代码google了之后一个结果都没有...

@lewisdonofrio
Copy link
Author

fwiw here is a powerpoint presentation about my setup http://tinyurl.com/donofrio1804 (ignore unneeded onedrive logins)

@prabirshrestha
Copy link

Got ArchLinux working for me in Microsoft Windows [Version 10.0.16299.248].

image

  1. run in powershell as admin the following command.
New-ItemProperty -Force -Path 'HKLM:\System\CurrentControlSet\Control\Session Manager\Kernel' -Name 'obcaseinsensitive' -Value 0 -PropertyType Dword
  1. Restart computer
  2. Verify Computer Configuration\Windows Settings\Security Settings\Local Policies\Security Options\System objects: Require case insensitivity for non-Windows subsystems is Disabled in group policies.
  3. Verify HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\kernel\obcaseinsensitive is 0.
  4. Download the .tar.gz file and run the following command
LxRunOffline.exe install -n ArchLinux -f "archlinux-bootstrap-2018.02.01-x86_64.tar.gz" -d d:\wsl\ArchLinux -r root.x86_64

@lewisdonofrio
Copy link
Author

fwiw

"Build 17110
For general Windows information on build 17110 visit the Windows Blog.

WSL
Allow /init to be terminated from Windows [GH 2928].
DrvFs now uses per-directory case sensitivity by default (equivalent to the “case=dir” mount option).
Using “case=force” (the old behavior) requires setting a registry key. Run the following command to enable “case=force” if you need to use it: reg add HKLM\SYSTEM\CurrentControlSet\Services\lxss /v DrvFsAllowForceCaseSensitivity /t REG_DWORD /d 1
If you have existing directories created with WSL in older version of Windows which need to be case sensitive, use fsutil.exe to mark them as case sensitive: fsutil.exe file setcasesensitiveinfo enable
NULL terminate strings returned from the uname syscall."
(https://docs.microsoft.com/en-us/windows/wsl/release-notes#build-17110)

@DDoSolitary
Copy link
Owner

Fixed in v3.
#36

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants