Run Linux programs on DOS

Overview

DOS Subsystem for Linux

A WSL alternative for users who prefer an MS-DOS environment. DOS Subsystem for Linux integrates a real Linux environment into MS-DOS systems, allowing users to make use of both DOS and Linux applications from the DOS command prompt.

Building

  • You will need a cross toolchain targeting i386-linux-musl on PATH.

    https://github.com/richfelker/musl-cross-make is a tool that can build one for you with minimal hassle. Set TARGET to i386-linux-musl.

  • Build the prequisites (Linux and Busybox) by running J=xxx script/build-prereq, replacing xxx with the desired build parallelism.

  • You will need a hard drive image hdd.base.img with an installed copy of MS-DOS on the first partition.

  • Run make

    This will produce a new hard drive image hdd.img with DOS Subsystem for Linux installed. Invoke C:\doslinux\dsl to run Linux commands. C:\doslinux can also be placed on your DOS PATH for greater convenience.

Issues
  • Add mtools requirement and notify issue with older nasm

    Add mtools requirement and notify issue with older nasm

    Older versions of nasm have bug:

    doslinux.asm:370: error: invalid combination of opcode and operands doslinux.asm:372: error: invalid combination of opcode and operands doslinux.asm:377: error: invalid combination of opcode and operands doslinux.asm:379: error: invalid combination of opcode and operands doslinux.asm:388: error: invalid combination of opcode and operands doslinux.asm:390: error: invalid combination of opcode and operands

    opened by warpcoil 4
  • Add support for Linux 2.4

    Add support for Linux 2.4

    Linux 2.4.37.11 was the last version of a kernel to (reliably) support UMSDOS, which adds Linux permissions to FAT partitions. There's also a site to add UVFAT (UMSDOS combined with VFAT == LFN) support to the 2.4.19, which patches successfully on 2.4.24 and requires some renaming on 2.4.25-2.4.37.11.

    Considering DOS == FAT, this can make implementing rootfs much easier.

    opened by mariuszkurek 3
  • I'm bit confused by what this is ?

    I'm bit confused by what this is ?

    Can some more information be added to the README ?

    Is the name a pun, or does this run in WIndows, a bit like WSL ?

    The screenshot shows it running in QEMU, I'm confused...

    opened by stuaxo 2
  • Cannot initialize 'C:'

    Cannot initialize 'C:'

    Tried this with a qcow image i generated via http://gunkies.org/wiki/Installing_MS-DOS_on_Qemu - which resulted in:

    ➜ make nasm -o doslinux.com -f bin doslinux.asm i386-linux-musl-gcc -m32 -static -Os -Wall -Wextra -o init/init.o -c init/init.c i386-linux-musl-gcc -m32 -static -Os -Wall -Wextra -o init/vm86.o -c init/vm86.c i386-linux-musl-gcc -m32 -static -Os -Wall -Wextra -o init/panic.o -c init/panic.c i386-linux-musl-gcc -m32 -static -Os -Wall -Wextra -o init/kbd.o -c init/kbd.c i386-linux-musl-gcc -m32 -static -Os -Wall -Wextra -o init/term.o -c init/term.c i386-linux-musl-gcc -m32 -static -Os -Wall -Wextra -o init/init init/init.o init/vm86.o init/panic.o init/kbd.o init/term.o cp hdd.base.img hdd.img MTOOLSRC=mtoolsrc mmd C:/doslinux init C: non DOS media Cannot initialize 'C:' make: *** [Makefile:19: hdd.img] Error 1

    opened by ri0t 1
  • Please add a license to this repo

    Please add a license to this repo

    First, thank you for sharing this project with us!

    Could you please add an explicit LICENSE file to the repo so that it's clear under what terms the content is provided, and under what terms user contributions are licensed?

    Per GitHub docs on licensing:

    [...] without a license, the default copyright laws apply, meaning that you retain all rights to your source code and no one may reproduce, distribute, or create derivative works from your work. If you're creating an open source project, we strongly encourage you to include an open source license.

    Thanks!

    opened by mbrukman 1
  • doskey is supported?

    doskey is supported?

    doskey is supported? Could the README mention this briefly?

    I ask because I autogenerate a valid doskey file which I use on my win10 laptop

    • cmd.exe. Would be nice if this works on doslinux-DOS too (I am mostly caring about my custom cd-aliases for faster file navigation.)
    opened by rubyFeedback 0
  • Failed to load bzImage

    Failed to load bzImage

    I've tried both one I compiled and a pre-compiled one I found. A side note: both don't work without the memory manager being disabled, I'm surprised nobody mentioned this but it would be very nice to have HIMEM support. But it doesn't matter as of now because both of those versions report that the bzImage could not be found. I've tried on both DOSBOX-X and my real 98 machine, it works on neither. I've admittedly never built a Linux distro before so if there's any files that I should provide please let me know. Otherwise, I have nothing to provide.

    opened by IoIxD 1
  • Boot faster on older hardware with LZ4

    Boot faster on older hardware with LZ4

    LZ4 kernel images will be slightly larger (15%-ish) but can decompress the kernel much faster than gzip [0]. This will improve overall boot time.

    [0] https://www.phoronix.com/scan.php?page=news_item&px=LZ4-Initramfs-Ubuntu-Go-Ahead

    opened by lpsantil 0
Owner
Hailey Somerville
Hailey Somerville
PoC (DoS) for CVE-2021-40449 - Win32k Elevation of Privilege Vulnerability (LPE)

CallbackHell DoS PoC for CVE-2021-40449 (Win32k - LPE) CallbackHell Description Technical Writeup PoC References Description CVE-2021-40449 is a use-a

Oliver Lyak 406 Jun 21, 2022
A ZX Spectrum-like library built for "dos-like" by Mattias Gustavsson.

ZX-Like A ZX Spectrum-like library built for "dos-like" by Mattias Gustavsson. It allows for the creation of ZX Spectrum like screens for demos, games

Oli Wilkinson 3 Oct 20, 2021
Armazena a tabela nutricional dos alimentos em um banco de dados (SQLITE), salva as quantidades em um arquivo EXCEL, informando se a meta diária foi batida.

QT-Controle-de-Dieta Armazena a tabela nutricional dos alimentos em um banco de dados (SQLITE), salva as quantidades em um arquivo EXCEL, informando s

null 1 Oct 26, 2021
Resolve DOS MZ executable symbols at runtime

NtSymbol Resolve DOS MZ executable symbols at runtime Example You no longer have not have to use memory pattern scan inside your sneaky rootkit. Pass

Kento Oki 76 Jun 26, 2022
Use DOS object files (OMF) as patch files

omfpatch - Use Intel/Microsoft .OBJ files as binary diffs Overview This tool makes it possible to use MASM / TASM / JWasm / nasm as tool to write patc

Michael Karcher 2 Jan 30, 2022
Adjust Cirrus Logic CL-GD542x memory clock (DOS tool)

clmclk This is a tool for DOS to adjust Cirrus Logic CL-GD542x memory clock. This tool works on ISA and VL graphics cards with the CL-GD542, CL-GD5426

Michael Karcher 3 Apr 6, 2022
DOOM ported to the dos-like framework

doom-for-dos-like This is a quick but fairly complete version of the original DOOM ported to the dos-like framework. The data included is for original

Mattias Gustavsson 25 Jun 21, 2022
Patch for Titanfall 2 that helps prevent disconnects while the servers are being attacked by a DoS attack.

Titanfall2 DeltaBuf patch This patch for Titanfall 2 helps prevent disconnects while the servers are being attacked by a DoS attack. Disclaimer This i

null 5 Jun 11, 2022
Alice Pascal for MS-DOS

Alice Pascal This is the Root of the Alice Source tree. You really want to go into src To find alice source and build it and install apin To build

DosWorld 5 Apr 10, 2022
A DOOM 32 extension for DOS using increased limits beyond what DOOM32 provides.

DOOM128 A DOOM 32 extension for DOS using increased limits beyond what DOOM32 provides. Why Because having a DOS compatible DOOM source port that incr

Gibbon 10 May 5, 2022
A draft C++ app to run Linux files, made in UWP for my own learning experiment

FLinux : Uncompleted port of FLinux to UWP... About A draft C++ app to run Linux files, made in UWP for my own learning experiment What is it? As a wa

Media Explorer 1 Jan 26, 2022
a tool to count accesses to member variables in c++ programs

access_profiler access_profiler is a heavy-weight class field access profiler, implemented as C++ library. to use this profiler, include "access_profi

Arvid Norberg 68 May 31, 2022
collection of C/C++ programs that try to get compilers to exploit undefined behavior

------------------------------------------------------------------------------- UB Canaries: A collection of C/C++ programs that detect undefined beh

John Regehr 160 Jun 27, 2022
Backtrace support for Rust `no_std` and embedded programs.

mini-backtrace This crate provides backtrace support for no_std and embedded programs. This is done through by compiling LLVM's libunwind with certain

Amanieu d'Antras 23 Jun 24, 2022
Create a Jupyter Kernel for 8085 Microprocessor assembly language that can interpret assembly-level programs right from the Jupyter notebook.

Create a Jupyter Kernel for 8085 Microprocessor assembly language that can interpret assembly-level programs right from the Jupyter notebook.

Sarita Singh 5 May 11, 2022
Several GX2 test programs to compare it with OpenGL. (With additional GLFW+OpenGL implementation provided)

GX2-Tests Provided are GX2 test programs and samples for comparison with OpenGL and with additional GLFW+OpenGL implementation for test on PC. These s

AboodXD 1 Nov 15, 2021
Optimize small uxntal programs via brute-force

Uxnbruteforce A small C program to optimize little pieces of uxntal code. It is a work in progress, a little bit messy for the moment :) I had the ide

Maxime ANDRÉ 6 Jan 9, 2022
Grand Programs for every Data Structure including all their operations

Grand-Programs-UE20CS203 Grand Programs for every Data Structure including all their operations Some idioms that I use, so you won't get confused I pr

Aditya Rao 1 Apr 1, 2022