Live data from Hacker News

DOS Subsystem for Linux

github.com

71–80 of 182 posts

Re: DOS Subsystem for Linux

#71
post #29
post #13

Does it support running 16-bit real mode DOS binaries a la DOSBox?

You don't need it to run DOS binaries on DOS.

It’s not clear if this is DOS or a DOS shell that actually executes Linux binaries. The description is confusing, hence my question.

Re: DOS Subsystem for Linux

#72

Earlier quoted context omitted.

Thanks, I thought it is running DOS under Linux before I saw you comments.

> running DOS under Linux What about DOSBox?

DOSBox would be the "Linux Subsystem for DOS" using this contorted naming scheme. Aren't we having fun now? :-)

Re: DOS Subsystem for Linux

#74
post #20
post #15

Earlier quoted context omitted.

Well, no... WSL runs Linux inside Windows. DSL runs Linux inside DOS. So there's no stacking that makes sense here. (I think we're seeing just how confusing the "Subsystem for Linux" naming is. "Foo Subsystem for Linux" sounds like a way to run Foo under Linux, but it's the opposite...)

Windows -> Dosbox -> DSL -> Wine?

We have to go deeper.

Re: DOS Subsystem for Linux

#75
post #35
post #12

Earlier quoted context omitted.

Is this explained somewhere? I'd love to read how it works (without trying to understand the source code).

Author here. I am planning to do an in depth write up of how this works, but it seems Hacker News found it sooner :) When DSL is first invoked at the command line it boots up the Linux kernel which takes over control of the computer from DOS. Now here’s the trick: DSL makes use of a processor feature called VM8086 which allows for a 32 bit operating system to run legacy 16 bit code mostly natively. This feature is ho…

Wow you weren't kidding about "largely undocumented". https://man7.org/linux/man-pages/man2/vm86.2.html

Would be really cool if someone contributed a proper man page, I bet it would be a fascinating read.

Re: DOS Subsystem for Linux

#76

Just wondering. Since "Windows subsystem for Linux" is running Linux on Windows, shouldn't it be named "Linux subsystem for DOS"?

The abbreviation would make sense, if it weren't for workplace restrictions on use of controlled substances.

On a more serious note, the hack described by the author [0] is quite ingenious.

[0] https://news.ycombinator.com/item?id=24556801

Re: DOS Subsystem for Linux

#77
post #35
post #12

Earlier quoted context omitted.

Is this explained somewhere? I'd love to read how it works (without trying to understand the source code).

Author here. I am planning to do an in depth write up of how this works, but it seems Hacker News found it sooner :) When DSL is first invoked at the command line it boots up the Linux kernel which takes over control of the computer from DOS. Now here’s the trick: DSL makes use of a processor feature called VM8086 which allows for a 32 bit operating system to run legacy 16 bit code mostly natively. This feature is ho…

Very cool! Can it use multiple processors under Linux or is it limited to 1 CPU because of some tricks for the DOS compatibility?

Re: DOS Subsystem for Linux

#78
post #37
post #12

Earlier quoted context omitted.

Is this explained somewhere? I'd love to read how it works (without trying to understand the source code).

From a quick skim through the code: - it first, if not yet present, starts Linux, via normal Linux kernel load. It passes over some pointers from DOS into /init arguments so that /init can know about DOS' context when Linux was first loaded - Linux's /init then uses VM86 [1] to call back into DOS, back to the function that was run in DOS before Linux was loaded (vm86_return). This is a bit of a 'draw the rest of the…

Please elaborate on the owl reference!

Re: DOS Subsystem for Linux

#79
post #52
post #27

There are a ton of comments here that seem to be misunderstanding what this software is. This creates a WSL-like environment on a DOS host system. It does not create a DOS environment on a Linux host. I'm not sure where this misunderstanding even comes from; the name is perfectly analogous to WSL.

I would imagine it's because WSL is a terribly confusing name itself for a lot of people. There are two ways to read "Windows Subsystem for Linux": 1. This is a subsystem that runs on Windows that enables Linux binaries. 2. This is a subsystem that runs on Linux that enables Windows binaries. The confusion comes in the fact that when I write those two sentences, I naturally want to write "This is a subsystem FOR Wind…

It's really confusing. Windows Linux Subsystem would be more clear. Windows Subsystem for Linux always hinted me to a Vine competitor. Then I know what it is so I read this DOS Subsystem for Linux in the right way (and right to left!)

Re: DOS Subsystem for Linux

#80
post #56
post #52

Earlier quoted context omitted.

I would imagine it's because WSL is a terribly confusing name itself for a lot of people. There are two ways to read "Windows Subsystem for Linux": 1. This is a subsystem that runs on Windows that enables Linux binaries. 2. This is a subsystem that runs on Linux that enables Windows binaries. The confusion comes in the fact that when I write those two sentences, I naturally want to write "This is a subsystem FOR Wind…

The WSL terminology really only makes sense if you are aware that Windows has the concept of subsystems - and which is why swapping other labels makes even less sense. I.e. the run-Windows-on-Linux thing would probably not be called Linux Subsystem for Windows, because what is a "Linux Subsystem"? And of course WSL2 isn't a subsystem anymore, but is stuck with the product name. ¯\_(ツ)_/¯

A "Linux subsystem" is a Linux system that is a part of a bigger system. And "Linux audio subsystem" is an audio system that is a part of Linux. And if you swap the words, you get "audio Linux subsystem" which doesn't make sense, not really.

So the proper name would be "Windows Linux subsystem", but I concede that it does sound really weird (because both Windows and Linux are the same kind of things, they're OSes).

And of course, if it was named "Windows's Subsystem for Linux", there would be much less confusion, but apparently the English for some reason doesn't use the possessive case here (although that's the perfect place for it) and prefer to use the noun as a possessive adjective.

Post reply on HN