Live data from Hacker News

Ubuntu on Windows

blog.dustinkirkland.com

441–450 of 933 posts

Re: Ubuntu on Windows

#441

Can someone explain how is an "NT subsystem" or "NT personality" (which the linux ABI is supposedly an example of) different than any other library? Answers I've received before is "it can call the native API", but any program can call the native API. So, what's in a subsystem?

It's mostly a matter of layering. Think of a "subsystem" as a "pluggable system call interface layer". The Win32 layer (mostly) sits on top of the Native layer.

The Native API is mostly implemented by the kernel itself, ntoskrnl.exe, which has a system call table (KiServiceTable). Most of the native API is exposed to userspace via ntdll.dll, which calls through that system call table. This API is available from very early boot.

The Win32 subsystem is mostly exposed by win32k.sys, which is a kernel mode driver. It has a second system call table (W32pServiceTable) which is then consumed by user32.dll and friends. Some parts of the Win32 user-mode API are implemented by calling the Native API via ntdll.dll, though.

Processes which exist in the Win32 subsystem have additional kernel data associated with them (the private state of win32k.sys for that process), had additional win32k.sys code ran during initialization, and can therefore make use of the services of that driver.

If you create a Native process with RtlCreateUserProcess, it won't be able to make Win32 API calls. But it can run in environments where a Win32 process can't -- for example, autochk.exe, which is the version of chkdsk which runs as part of boot before the graphics driver has loaded, is a Native executable.

There's also support in the PE executable format to indicate which subsystem to use, so the loader knows which type of process to create. Obviously, this won't be relevant for running Linux ELF executables.

The layering isn't perfect, especially since while NT was designed to support multiple subsystems (OS/2, Win32, Posix), Win32 is the only one which Microsoft have historically focused on.

Re: Ubuntu on Windows

#442
I have been on Unix(Mac/Linux) atleast for 8 years. A lot of developers are buying mac books these days. At this point, even non-technical people are buying "expensive" mac books. This directly affects microsoft bottomline. Obviously, microsoft cannot port mac utilities into windows to reduce the exodus of developers from windows. The stop-gap solution would be to run all "gnu core-utils" in windows natively, the most important one being apt-get.

I believe at this point microsoft does not have the critical mass to create an app-store. There is not enough momentum. Only Linux, Android and Apple have successful appstores. If microsoft allows debian package manager, it can bring back a lot of developers back to windows. Still there are many companies that still use windows desktops and laptops.

There is potential to evolve this into a microsoft app-store that is compatible with ubuntu. That would be a win-win for microsoft and may potentially boost sales and slow down the decline of their OS.

Re: Ubuntu on Windows

#443

It's time that people stopped using the term 'Windows' for this operating system. The Free Software Foundation created the bulk of the userspace, under terms that allow anyone to share, modify and fork the programs, and then Microsoft came along with the one last missing piece of the puzzle - the kernel, and completed the full operating system, which, to be frank, users find completely unusable and worthless without…

Hm, but GNU/Windows still implies usage of many non-free binary blobs bundles as drivers with the OS. I advocate stripping them out and terming it GNU/NT, affectionately referred to as "Gnewt".

Re: Ubuntu on Windows

#444
There are roughly two ways to differently phrase what has happened:

1. "A multi-billion dollar corporation with almost an omni presence on the desktop computer was seeing it was missing something that was readily available with other competing solutions, and decided to nitpick the greatest parts of those competitors and incorporate it in their own solution. If you can't beat 'em join 'em strategy."

2."Computing and software is becoming more fluid, and an OS doesn't have clear boundaries as it used to have but it is just made up of whatever the best ideas are, ideas that are expressed by software and thus interconnect via API's and can be glued together to make the best possible solution to fit your needs. And that big multi-billion dollar company wants the best solution."

(If you like that last idea, I have news for you. This is exactly the idea behind GNU/Linux, and it already exists. So you know, instead of being excited and giddy for all this you could just install Ubuntu.)

And this is where the sticky part is. The openness of GPL software makes way for their current Microsoft approach, but it also bites itself in the butt. By using bash in such a way and incorporating this Free and Open software within this closed OS is suffocating the ideas of GPL and diluting its purpose. Because Microsoft is not GPL-ing its own code base (sure, small parts), it's just using the best parts and sticking to its own strategy. It's a smart, clever, and tactically strong move and it will be very successful. But GPL thrives and exists because of other GPL software, and this approach works and creates beautiful things (take how GCC made may for Linux, which made way for a gazillion other tools etc.). There is a viral aspect to the GPL that will be completely cut off. I believe GPL software in a non-GPL environment have a harder time in reaching their potential.

But most people will just look at it from a user perspective and think: 'hey, I get best of both worlds'. But they forget that this software only got this far because of exactly this license. It's a fundamental and integral part of it's success.

Since what's happening was completely unheard throughout the 90's and 00's I don't think both sides would have guessed this would ever happen. But it did. Just like a couple of weeks ago Microsoft decided to create its own Linux version to support SQL server on Linux. So even stranger things might happen and I'm trying to keep an open mind.That being said I really think the nature of software is and should be fluid and so it should be able to be stitched together to create what you need. But this only work really well, if all parts of the 'quilt' follow the same rules.

Re: Ubuntu on Windows

#445
post #233

Surprised I don't see anyone else mentioning this. This looks to me like typical Microsoft strategy that they utilized a lot 25 years ago. 1. when not leader in given market, make your product fully compatible with competitor 2. start gaining momentum (e.g. why should I use Linux, when on Windows I can run both Linux and Windows applications) 3. once becoming leader break up compatibility 4. rinse and repeat Happened…

Could you name a single company that doesn't follow where the market is and try to monopolises it later?

Plus, Windows is still the leader in the desktop and laptop market until today. They are facing some tough competition but "not leader in given market" is not true.

Re: Ubuntu on Windows

#446

It's time that people stopped using the term 'Windows' for this operating system. The Free Software Foundation created the bulk of the userspace, under terms that allow anyone to share, modify and fork the programs, and then Microsoft came along with the one last missing piece of the puzzle - the kernel, and completed the full operating system, which, to be frank, users find completely unusable and worthless without…

Now they will be on us to call it Gnu/Windows :-) More seriously though I think this is a terrific insight, if something of a challenge for Linux kernel enthusiasts. If I could run Ubuntu (or Kubuntu) as my user land on a kernel where all the manufacturers of every gee whiz device had already signed up to port drivers, I would use that in a heartbeat. My current pain point is trying to run Kubuntu on a nearly current…

Completely agree. To add another example, Displayport MST on Linux is completely broken on Skylake and Intel have no plan to fix.

Re: Ubuntu on Windows

#447
post #16

Are posix permissions supported/emulated? Or are they set to 777 for all Windows drives in /mnt like shared folders in a VM?

in the demo video https://channel9.msdn.com/Events/Build/2016/P488 it's visible at 05:53 that the files all belong to root:root and have mode 777

reminds me of '90 teleshopping videos..

Re: Ubuntu on Windows

#448
post #443

It's time that people stopped using the term 'Windows' for this operating system. The Free Software Foundation created the bulk of the userspace, under terms that allow anyone to share, modify and fork the programs, and then Microsoft came along with the one last missing piece of the puzzle - the kernel, and completed the full operating system, which, to be frank, users find completely unusable and worthless without…

Hm, but GNU/Windows still implies usage of many non-free binary blobs bundles as drivers with the OS. I advocate stripping them out and terming it GNU/NT, affectionately referred to as "Gnewt".

Going by the official way gnu stuff is supposed to be sounded out, that should be "guh-newt" :)

Re: Ubuntu on Windows

#449
The key question is how does the file system integration work. Cygwin has to do all kinds of tricks to make windows file paths and things like PATH and CLASSPATH variables work. Does Ubuntu see Windows files? If so, how? How then does windows see the Ubuntu files? I would also be very curious if Ubuntu executables can fork windows processes and vice versa. The magic of Cygwin is that - with all the caveats and kludges they have to do to make it work, it mostly pulls this stuff off. But they don't achieve in a manner that I would have thought would be acceptable to Microsoft when shipping a product in their own name.

Re: Ubuntu on Windows

#450
post #244

Earlier quoted context omitted.

> I grew up a Windows user, and switched to OS X because of the unix-like command line environment that more closely matched the servers I was working with in my job environments. Out of curiosity, why would you not just go with a Linux desktop for that?

Same history here. I did actually use Linux for quite a while but ultimately gave up because Linux just isn't good at the one job only an operating system can do, which is to make the hardware available in a reliable and efficient manner. I just got tired of fixing sound issues, trying to make a scanner work or investigating CPU states to fix heat and battery draining issues on yet another laptop. Ultimately, I think…

> Linux just isn't good at the one job only an operating system can do, which is to make the hardware available in a reliable and efficient manner.

It's not the best desktop environment out there, but apart from desktop, linux is the most popular system at every step from small embedded systems to the most powerful supercomputers. That wouldn't be the case if it couldn't make hardware available in a reliable and efficient manner.

Post reply on HN