Linux subsystem updating itself?

Today when I sat down in front of my laptop, much to my surprise I found bash open.

I definitely did not start it and nobody else has been in the room since I left my laptop there.

Bash was downloading some packages but it finished and the terminal closed before I could look into it.

I opened bash and I saw the picture I attached. http://imgur.com/H4IE5cx

How can I find out what was downloaded?

Posted Aug 9, 2016, 7:13 PM UTC · edited

1744
wilun•

I just saw the same thing. It's a Windows scheduled task which basically triggers an "apt-get update" in a new console when the computer is idle. The task is Microsoft/Windows Subsystem for Linux/AptPackageIndexUpdate. I opened an issue, because I don't think this behavior is optimal...

https://github.com/Microsoft/BashOnWindows/issues/841

7
MacHaggis•

I opened an issue, because I don't think this behavior is optimal..

I don't know. Is this any different from a native Ubuntu system?

2
[deleted]•

[deleted]

3
outzider•

Ubuntu absolutely does a periodic index update, but you can turn it off, just like here.

5
MacHaggis•

auto updates? Do you know what apt-get update does?

Ubuntu definitely notifies you by default when there are new updates ready to download and install.

4
hrlngrv•

FWIW, Linux Mint autoruns Mint Update at GUI user login.

1
[deleted]•

[deleted]

1
hrlngrv•

I've seen this too.

If it's only apt-get update, NBD. Similar to Mint Update on Linux Mint systems.

My much greater irritation is the inclusion of packages like systemd, udev, and initramfs in WSL, which show up in apt-get upgrade but fail upgrade under WSL. FWIW, crouton under Chrome OS works a lot better than WSL.

4
wilun•

WSL is still in Beta. It works impressively well for beta software, and the progress made during the Insider period was also very impressive. It still has a number of know bugs and limitations, and some of them are annoying, but it will probably be even better than it is today in the next Windows release.

5
hrlngrv•

Windows NT 4 had a POSIX subsystem back in the 1990s, and cygwin has been around for about as long. Using those for perspective, WSL is so-so.

Anyway, case-sensitive filename support isn't a mark of beta quality, nor is it a bug in either WSL or Windows. It's an incompatibility between Linux and Windows file system support and system calls. The most practical resolution would be adding code to WSL's underlying NTFS file system interface to raise errors upon case-INSENSITIVE filename collisions, maybe with an option to overwrite aa with aA as collisions occur.

-1
wilun•

WSL is mostly about Linux compat. Posix could afford to for example use NT pipe for Posix pipes. And I don't see where we were talking about case-sensitivity. FYI it has been "added" in DriveFS (well, not prevented) during the Insider period. If you have concrete problems with it (not just: OMG it's incompatible by design, we all gona die), you can open an issue on the WSL bugtracker:

https://github.com/microsoft/bashonwindows

2
hrlngrv•

Take a look at my original post at the top, where filename case-sensitivity was introduced. I don't have problems with it.

I'm used to VMs and chroots, and I played with Lindows years ago. Putting WSL's rootfs in %LOCALAPPDATA% as part of the Windows file system strikes me as a bad design decision compared to alternatives.

As for WSL being impressive, Midnight Commander was unusable with default settings. By default, WSL sets TERM as xterm. OTOH, the Linux distribution I've used recently all set TERM=linux. After setting TERM=linux in .bashrc in WSL, Midnight Commander worked the same as it does under Linux. Maybe various distributions use default terminals for which TERM=xterm is correct and appropriate, but Windows runs WSL/bash in the same type of console window as CMD.EXE, and the default Windows console is most definitely not xterm-compatible. So negligence or intention as to why MSFT screwed this up?

-5
mr_daemon•

VolFS (rootfs, home, etc) maintains case sensitivity, DrvFs (i.e. anything under /mnt) doesn't and goes by NTFS semantics. It also doesn't store the unix metadata.

Additionally, VolFS will support unix-like semantics, such as copy on write for files (i.e. no windows-like file locking, etc).

It's more than just "herp derp case sensitive filesystem", it's actually The Solution to the problem, and isn't a completely horrifying one either.

Having actually used interix and cygwin extensively, wsl is incredibly more elegant in every possible way. Just more immature.

Suggested reading:

https://blogs.msdn.microsoft.com/wsl/2016/06/15/wsl-file-system-support/

https://blogs.msdn.microsoft.com/wsl/2016/06/08/wsl-system-calls/

https://blogs.msdn.microsoft.com/wsl/2016/05/23/pico-process-overview/

I don't know about you, but it certainly strikes me as well designed, with elegant solutions to the problems at hand instead of expensive, slow kludges requiring retargeting.

1
madlobsterr•

DrvFS does maintain case sensitivity. I've created separate files named TEST and test on /mnt/c/Users/myname/Desktop. It worked, but Windows programs have problems accessing both files. (Windows programs really had a problem with files named CON and con)

1
hrlngrv•

See https://www.reddit.com/r/bashonubuntuonwindows/comments/4ws7ny/a_little_filename_weirdness/

WSL can produce multiple files under the same subdirectory under /mnt with the same case-insensitive filename. Maybe it shouldn't be able to, but it can. Linux can too, FWIW. Empirical evidence seems to show NTFS can support case-sensitive filenames, but Windows itself ingnores case-sensitive filenames or, if you will, lacks the ability to distinguish between them.

This is a good time to ignore documentation and see what actually happens. If there was no intention to allow WSL to produce multiple files with the same case-insensitive filename outside WSL's root filesystem, then I suggest WSL has a bug.

1
currentYearBro•

Windows 10.

I turned my PC off last night because I've been working so much, figured give the hvac a break. Turned all my computers off. Powered on in the morning and grabbed my netbook to work outside my office. Came back at 2:00pm and Windows 10 was applying an update. Slammed my virtual machines shut, ended all tasks, and decided it was time to apply a patch.

Now that WSL is known to do this too, we need to let MS know this is unacceptable. They are literally botting my PC. They finally earned back my business, and now they are really doing a good job of scaring me away.

4
Win8Coder•

I think some people are going to find this behavior, not only acceptable, but they will demand it.

I'm tired of hearing people had viruses, etc. only later to find out they haven't applied updates for months because they had it set on manual and just forgot.

Or, their machine got turned into a botnet.

Or, they tampered with the updates (installed some, didn't install others) and the machine had small issues they couldn't figure out and blamed MS (and called support) or whine about it and post blogs about how unstable Windows is.

All of this needs to be stopped.

I'm sure they would love to hear your suggestion about how to stop all of the above, but yet let power users like us take some control.

I honestly don't know how to do it.

But I think the auto-updating is 'better' for the majority of the 400m users of Windows 10 than the inconvenience to power users.

Especially since updates can be scheduled at a fixed time... sounds like you didn't do that given your surprise.

I've never had a problem personally with updates since I just schedule.

7
currentYearBro•

I have full faith and confidence in software engineering. This is a software problem. MS will refine the tech, and introduce some intelligence into the process. That's all I'm looking for.

My mini-dev server in my office does a cron yum automatic update job. It isn't production, it's what I throw dev projects on and abuse, but my point is that it is nice knowing that thing is always up to date and I am familiar with automated updating.

If MS can get it to where it handles the reboot in a better way, I'll be satisfied. OSX has no issue with closing programs and reopening them in the exact same state. MS just needs to get this all sorted out.

1
Win8Coder•

I run MacOS also, and it definitely gets glitchy sometimes if you don't reboot.

Granted, we do iPad dev with xcode so we use MacOS a bit more than the average person, but it definitely has its issues.

At work, we build a large simulator that requires lots of daily patches for new features and fixes... and that system has tons of problems and issues. We are probably building something that is 1/10000 the size of Windows 10.

I can only imagine MS' Windows build/patch/update process.

One thing is for certain, letting 'normal' users muck around with OS level patches is not going to end well.

2
currentYearBro•

It must be insane. The Windows Insider program though demonstrates that they must have some really cool processes in place. They have been rolling out fixes and updates at a crazy pace considering their codebase my be millions and millions LOC. Win10 Build 14393.10 is excellent, in my opinion. So solid and fast. Granted my machine is a beast, but still it is lighting fucking quick. Finally as quick as my Linux installs on same hardware (anecdotally speaking).

1
hrlngrv•

WSL automatically running apt-get update automatically is NBD, but MSFT would have been wiser either to have hidden (not just started minimized) the window running it or to have provided an EASY TO FIND option to disable it.

For people LIKELY to use WSL, I figure most would understand how to add the appropriate apt-get commands to their .profile and/or .bashrc. TBH, if they don't know how to do that, maybe they shouldn't be futzing around with WSL.

1
Win8Coder•

Oh sorry - yes I absolutely agree for WSL. This is a dev feature, updates should be done by the dev!

I was talking about Windows 10 auto updates for the OS itself.

:)

1
benheliozWSL Developer•

The task is just updating the apt-package index. That being said, I'm not a fan of this maintenance task and am fighting to get it removed as we speak.

Trust me when I say that the Windows Update behavior you described drives me crazy as well...

3
surface_book•

Do you see a difference between "update" and "upgrade" though? I don't know enough about Ubuntu (more of a Fedora), but this seems like it's just updating what the latest packages are, not actually upgrading any of them?

Why aren't you a fan?

1
benheliozWSL Developer•

Yeah "update" only updates the package list, it doesn't download or install the packages.

I'm not a fan of the task because of the hokey task scheduler interface (no way to hide the task etc).

1
edoantonioco•

I have noticed that if I put my laptop to sleep (running W10) it sometimes turns on by itself on the night, I wonder if its related to this.

1
JPN2214•

You just gotta run the ol' metered connection trick I guess.

1
currentYearBro•

I just don't use my PC for work. I have a few systems attached to my desk workspace and can use any one or many on my screens. Win10 is still just for gaming. Big fuck up for ms, they had me back.

1
JPN2214•

Linux systems?

1
currentYearBro•

A centos server, couple Linux boxen (Linux mint on one, Manjaro on another), and a 15" MacBook Pro and a 13" MacBook Pro. Three 27" monitors, 2x1080 and 1x4k.

Oh and win10 lol. Like I said it is just for gaming again. I had started using it for dev again, but I have the pleasure of being able to ignore an OS if it fucking reboots autonomously.

1
MrAmos123•

Sorry to revive this post however in the past 1.5 Years on using Windows 10, (And it's preview) I've not once experienced this problem.

I switch my computer off every single night before I go to bed.

If needs be I click the 'Shut down and Update' button, found when going to START>Shutdown.

I'd hate this if I had to experience what you're experiencing but as I've said, I've never had it happen.

1
currentYearBro•

So? What's your point? It is a known behavior of Windows 10.

0
MrAmos123•

There isn't a point, I can only suggest you turn your PC off ever 1-2 days, or at least restart it manually. You get prompted multiple times before it just 'starts applying updates' so it's not like you were not warned.

I've been fine, never had it happen I can hardly call this a problem or concern that needs to be voiced to Microsoft. You installed Windows 10 Home/Professional/etc, not Windows Server 2016. You should expect updates, however, I do agree that they should not be forced down your throat, I believe the Windows 7 update approach was decent.

Would be nice to control it, but we can't (easily, you can with GPO/Regedit). So learn to restart your machine more frequently or just live with it.

1
currentYearBro•

I'm sorry but your anecdotal experience does not apply to me, and likely very many users. I reboot often enough, and power down my systems at different intervals.

Windows 10 does not repeatedly ask me to update and finally do it itself. It just randomly does it.

Look I'm not interested in this conversation anymore. You're trying to help someone who doesn't need it, nor does your advice apply to me.

0