Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×
Microsoft Linux

Bored Developer Creates 'DOS Subsystem For Linux' (itnews.com.au) 56

Long-time Slashdot reader Bismillah quotes iTnews: A software engineer in Melbourne is whiling away the city's lockdown by creating a tool that DOS users so far have lacked: an integrated Linux environment similar to what Windows 10 users enjoy...

"I first started out just seeing if I could get Linux booting from the DOS command line, and that turned out to be straightforward enough so I thought it'd be fun to see if I could continue executing DOS once Linux was running," Charlie Somerville said. "I'm mostly surprised by how smoothly the whole thing works given how *dodgy* it all is haha," he added. DOS Subsystem for Linux runs a real copy of MS-DOS under the QEMU virtual machine, and starts up from that, Somerville said...

"Helpfully Linux seems to leave the first megabyte of memory (where DOS lives) intact during its own boot process, so it's just a matter of jumping back to the right place to continue DOS execution," he added. Somerville had it pointed out to him that this approach of running DOS under vm8086 is actually how early Windows worked.

"Kinda cool to rediscover the technique so many years later," Somerville said.

This discussion has been archived. No new comments can be posted.

Bored Developer Creates 'DOS Subsystem For Linux'

Comments Filter:
  • 640K (Score:4, Funny)

    by awwshit ( 6214476 ) on Saturday September 26, 2020 @01:36PM (#60546194)

    Because 640K is enough memory for anyone, right?

    • We all know Gates denies having said this, but, I recall reading an article in Byte way back where John Roach (then CEO of Tandy) said something along the lines of "4K should be enough for anybody" in reference to the TRS-80 Model 1. I would almost bet that's the actual origin of this quote, but I can't find the original article to save my life.
      • Hey, As a high school kid - I wrote payroll and inventory systems which ran on a Trash-80.

        • Cool, but likely not on a "Level I" 4K TRS-80, though.

          More likely a Level II 16K TRS-80 - Or a 48K unit with the Expansion Interface.
          • by ebvwfbw ( 864834 )

            Didn't know there was a 4K trs-80. I worked on a 4K Ohio Scientific Challenger. It was never enough space except for beginner stuff. However that's what we could afford.
            Then it was back to figuring out nitrates and nitrides....

      • In this case, 4G is really not enough for anybody.

    • Because 640K is enough memory for anyone, right?

      It's an absolutely true insight. Even if Bill Gates (probably) never said it.

      In 1981, anyone looking to spend less than $10K on a computer for their home or office is not going to need more than 640K. Doubly so when most of these early PCs were purchased to replace an electronic typewriter and do some lightweight accounting tasks. IBM PC was around $1500 but fully loaded more like $6K, the main thing you could buy for it was a second floppy drive and more RAM (I think 256K before you had to use some ISA car

      • That doesn't mean it's "enough", just what was available at the time given the current technology at the price a home user could afford. It certainly wasn't hard to run up against the limits on the Commodore 64, though admittedly 64K was 10 times less memory than a fully loaded IBM PC. I also remember using an IBM PC loaded up with 640K of memory. With DOS 3, Wordstar, and Lotus 123 I don't remember memory ever being an issue, though the IBM PC was certainly not as much fun than the Commodore.

        • With DOS 3, Wordstar, and Lotus 123 I don't remember memory ever being an issue, though the IBM PC was certainly not as much fun than the Commodore.

          I used to hang around at Sears dicking with the computers while my mother shopped in the mall, and they had both some kind of PC (with EGA I think) and a C= 64, and a bunch of software for both platforms. ISTR they had some other kind of computer as well, but it currently escapes me what it might have been. And the PC kicked the crap out of the commode. It ought to have, because it was a much more expensive piece of equipment. But games like flight simulators were far superior on it because of the additiona

          • Dollar for dollar the C=64 was a better deal than a PC for gaming. Especially before the introduction of EGA (1984).

            But by 1985, the Amiga 1000 was out and blew the PC away in graphics and sound (at that time it would have been an IBM AT or compatible, with a 286 CPU). Even with an 80286, EGA and an Adlib card, the PC was no match for an Amiga 1000 for gaming. (I believe they would have been similarly priced, depending on exactly how you configured your PC and if you went with a clone instead of a true IBM)

            • I got into the Amiga when it had become cheaper. You could get an A500, three software titles, and a RF encoder for $599. An upgrade to 1MB RAM and a RTC was another $99. No PC under about $1500 could touch its gaming capabilities. The original soundblaster had only a single channel, and 256kB VGA produced far less impressive results than the Amiga could deliver because the performance was so poor. It wasn't until a bit later that PCs even got accelerated 2d video, which was needed to compete with the rate

              • VGA performance is excellent if programmed correctly, where you can read-modify-write 32-bits in a single byte/word access thanks to latch registers.. Naively programmed the performance is abysmal on VGA. It's a similar issue on the Amiga but the naïve method on Amiga is quite a bit faster than naïve VGA programming.

                I think why PC won and Amiga lost is complex. Part of it is the entrenchment of IBM compatibility. Part of it is the management at Commodore dropped the ball. Part of it is the custome

  • Isn't this kinda what DJGPP is? And booting Linux from DOS - syslinux?

  • by valentyn ( 248783 ) on Saturday September 26, 2020 @02:23PM (#60546310) Homepage

    (See subject)

  • My first encounter with Linux was with the distro MonkeyLinux - from 1997. http://projectdevolve.tripod.c... [tripod.com] It run on top of DOS, and it was extracted inside the DOS filesystem, using UMSDOS filesytem (in each directory, there was a file, storing the long filenames, and "permissions") It run reasonably well, better than Win3.11, and even the browsing the Internet with Netscape Navigator was a much better experience :-)
    • by jankoh ( 2547488 )
      sorry, actually, it run instead of DOS, it just booted from DOS partition, without having a special Linux partition, because, why would you use DOS ??? :-)
  • by PPH ( 736903 ) on Saturday September 26, 2020 @02:39PM (#60546352)

    ... boot Linux from inside systemd. That has yet to be accomplished successfully.

    • ... boot Linux from inside systemd. That has yet to be accomplished successfully.

      it's in the next version. Incidentally they're also deprecating Linux in the next version.

      • by PPH ( 736903 )

        they're also deprecating Linux

        So, just launch emacs. If you want Linux, there's a keystroke shortcut.

  • As someone who uses a very old DOS program in production, I'm quite interested. If I somehow get to have a more than half decent DOS environment, as in "works in full screen", can use installed printers/devices and is not painfully slow (I'm looking at you, Win7 DOS!), then I may even move some of my production machines to Linux.

    Must admit I have high hopes for this kind of news. There are several people I know that are, as of today, forced to stay on XP for the DOS support.

    • For ages (1998..2016) i have used "dosemu' for that. The last years it was on Slackware 13.37 32 bit to write, compile, debug and run Borland 7.0 programs in protected mode. These programs where used on commercial production machines in a ,near, realtime mode fast enough to qualify 80 peaces of fruit evert second on weight, size, color, quality and sugar values. Don't know of the latest version dosemu 1.4.0.1 will run on my current Slackware64 14.4 version. BTW i used also qemu 2.6.0 to run windowsXP and wi
    • by dryeo ( 100693 )

      There's OS/2 if you need DOS support on modern hardware. Under UEFI, DOS full screen sessions work surprisingly well. Sees your USB mouse and keyboard fine, will run most DOS drivers as DOS runs in ring 2. Mostly uses CUPS for printing via the OS/2 system.
      Doesn't really support long file names though and can't handle partitions/disks over 2TB (well truncated to 2TB) and they currently need a MBR and cylinder alignment for partitions but I believe real DOS has those same limitions.
      https://www.arcanoae.com/ [arcanoae.com] f

    • by raynet ( 51803 )

      This wont help as this run DOS on the hardware and Linux runs under the DOS, so in your case, XP -> DOS -> Linux.

    • There are several people I know that are, as of today, forced to stay on XP for the DOS support.

      What's preventing you from using some 386-based SBCs, and some kind of actual DOS? I presume the reason you're not just running a bunch of VMs is that you need support for some kind of interface hardware.

  • by Skinkie ( 815924 ) on Saturday September 26, 2020 @02:55PM (#60546394) Homepage
    So this is loadlin [wikipedia.org] with the ability to jump back?
    • Loadlin probably replaces it, but a subsystem may coesixt. Linux starts as DOS program (exe). Initially it disables DOS shell (by calling INTs into lower real-mode memory), just like DOS programs did.

  • It's been always around, https://en.wikipedia.org/wiki/... [wikipedia.org] but probably bitrotten for modern kernels.
  • A software engineer in Melbourne is whiling away the city’s lockdown

    There are places still on lockdown?

    • Yes, to combat a second wave caused by a government fuckup.

      Restrictions may ease soon - New cases have shrunk from 600/day to under 20/day.

  • Gods, I remember having to screw around with interrupt assignments, extended and expanded memory, 8 bit limitations... Eww. If I had to go back to that era I'd either be a bearded wizard hacker and get filthy rich or just shoot myself.
  • But I ended up making a USB stick with Alpine linux and setup mingetty on tty1 as an autologin to pcem inside a fullscreen X session. In the end I wasn't all that happy with the performance on my RPi 2.

    I think with an RPi 4 and a newer PCem, patched DOSbox, or qemu it might be better. Going bare metal is probably not even worth it to me anymore as the smallest USB stick I have is 4GB and my image ended up being only a few hundred megabytes.

    things that didn't work well or I never hacked up but wanted to: usb

  • Loadlin essentially loaded Linux from DOS. However nobody was insane enough to try to continue running DOS inside of it.
    BTW Microsoft does the same with it's "Windows" product line. You can see that when you start a TSR, then start Windows and then start a DOS Window. That Window will have the TSR available.

  • Helpfully Linux seems to leave the first megabyte of memory (where DOS lives) intact during its own boot process, so it's just a matter of jumping back to the right place to continue DOS execution

    It would be interesting to test if a DOS with loaded EMM386 and SMARTDRV will survive this transition. Because this combo needs and uses the high memory (over 1Mb).

  • Can't we create alias for DOS commands in bash shell

"All the people are so happy now, their heads are caving in. I'm glad they are a snowman with protective rubber skin" -- They Might Be Giants

Working...