Show HN: GentleOS – A pair of hobby OSes for vintage 32-bit and 16-bit PCs

github.com
luke8086
3 days ago
122points
Hello HN,

I've been working on a simple OS for tinkering and running bare metal apps on vintage PCs.

Since I couldn't quite decide whether to target pure 16-bit, or slightly more capable 32-bit machines, I ended up with two separate versions:

- GentleOS/32 (https://github.com/luke8086/gentleos32) works on i386+, requires 4MB of RAM and VGA display supporting 640x480x16 mode or any 256-color VESA mode.

- GentleOS/16 (https://github.com/luke8086/gentleos) works on 80186+, requires less than 192KB of RAM and a CGA display supporting 320x200x4 mode.

You can find more details in the repos.

104 comments

Comments

mysterydip2 days ago
> The only future plans are bugfixes, optimizations, and adding more apps.

Perfect. Nice to see a platform target stability instead of constantly reinventing itself and its APIs. Definitely want to give it a go!

iamnothere2 days ago
This is great, thanks for releasing your work. Very impressive.

You may get some interest from others in the retrocomputing/permacomputing sphere if you implement an Uxn emulator; it is extremely simple and can run on very limited hardware. https://100r.co/site/uxn.html

Vintage hardware would be a great host for Uxn programs, so I suspect this would generate some excitement.

luke8086yesterday
Thank you so much! Somehow I haven't heard about Uxn before, but it seems very cool and I'll definitely look into it.
iamnothereyesterday
You’re welcome. You’d probably appreciate its focus on long-term stability; the authors wanted an environment for their software that would ensure code could stay frozen in a working state forever. The only thing that may need updates is the VM, as the host OS and userland will shift over time, but the VM is designed to be exceptionally easy to implement and maintain. That comes at the cost of some capabilities, but they were specifically aiming for simpler software, so it works out.
sandosyesterday
Heh, the "small virtual machine" was NOT a lie! Is that less than 200 lines? Very nice!

Now I feel like integrating that into various things....

nosioptaryesterday
I think this is fantastic! I love that the code is so clean my dumb ass can understand it despite not using C much.
sixothreeyesterday
The code is cleaner that what I was expecting from a C repo. Also, it's quite a feat to fit this into 4 MB on a 386.
lprovenyesterday
> it's quite a feat to fit this into 4 MB on a 386.

I had 2 different Librex 386SX laptops, with 4MB of RAM, on long-term loan from work around 1992. One was quite chunky, the 2nd was a slimline thing with an off-centre hinge.

I ran OS/2 2.0 on them both.

So I could run multiple DOS apps, and a WinOS2 VM containing Windows 3.0, meaning I could run Win16 apps as well. And native OS/2 apps, although I didn't have many.

Here's a pic of the original Librex:

https://books.google.im/books?id=tDwEAAAAMBAJ&pg=PA27&redir_...

And the 2nd model:

https://www.reddit.com/r/vintagecomputing/comments/10gepdd/l...

TL;DR

A 386 with 4MB is small now but at the time this was a fairly serious workstation-level PC. At the time my work desktop was a 386DX but it had only 1MB of RAM.

In its time a 4MB 386 could run any one of multiple multitasking 32-bit protected-mode OSes, including OS/2 2.x, SCO Xenix, Coherent 3 or 4, DR Concurrent DOS/386, and so on.

This was a high-end bit of kit and with one of these OSes, or even with Quarterdeck DESQview, it could multitask half a dozen large and demanding DOS apps, or maybe a couple of the still fairly new Windows apps such as WinWord 1, or Excel 2.

nosioptaryesterday
That's a wonderful machine. I'd love to see that style of keyboard on new stuff.

Its wild to me to think of how much old computers could do relative to new. WordPerfect for DOS was always responsive and quick wheb I used it. I've seen ms word cludge up machines that should have plenty of power to run a word processor.

lprovenyesterday
> I'd love to see that style of keyboard on new stuff.

OMG yes please. :-)

Yep, WP for DOS was quick. Rather clunky UI compared to MS Word for DOS, IMHO, but fast. A friend of mine used a simple method to demo its speed: on his cheap monochrome 286 home computer, he loaded the book he was working on -- one big file, a few hundred pages -- and just held down the cursor key to scroll through the whole thing. It kept the entire doc in RAM and the text just blurred as it zoomed through the entire book in under a minute.

Compared then (early 1990s) to Windows where a similar text took tens of minutes, as my faster computer struggled to load in pages of text from disk, render the fonts, etc.

In the late 1980s, Amstrad introduced new CP/M machines, the PCW range:

https://www.cpcwiki.eu/index.php/PCW

They sold for over a decade and shifted about 8 million units. A CP/M computer, in the early Windows era.

Maybe it's time to do that again: a very low-spec machine, but with a crisp e-ink screen and a great premium-grade mechanical keyboard, shipping with a modern FOSS DOS, a compilation of free DOS apps, and some nice friendly graphical launcher. Wrapped up as an easy appliance that doesn't do Internet stuff at all, but makes it trivially easy to save your work on USB media or zap it to modern devices wirelessly.

Form factor of a big late-20th-century laptop, with a massive battery so it can double as a power bank for your phone or something.

icedchaiyesterday
My first Linux box was a 386SX with 3 megs of RAM (1 meg on the motherboard plus a 2 meg expansion.) It was a tight fit (SLS Linux, I think?) This would've been around 1992 or 93.
NoGravitasyesterday
I had a 386SX-16 running OS/2 from 2.1 to 3.0. It was usually fine, you could multitask several OS/2 and DOS applications or a WinOS2 session. It was very easy to get it swapping, though, and when it was swapping, it ground to a halt. It helped a lot putting 8MB on it, though 4 of those were on an ISA card and very slow.
lprovenyesterday
Reminds me of my early-1990s home network server: a late-1980s IBM PS/2 Model 80, a 386 tower built with a moulded iron case. Super tough, fancy 32-bit IBM expansion bus. 4MB of RAM on the motherboard, another 4MB in an expansion slot.

I attached a couple of big SCSI drives and ran Windows NT 3.51 Server on it. When not logged in, it only used a couple of megs of RAM for the OS so file serving performance was tolerable -- and the hardware was literally bulletproof. I dropped one down a flight of stairs in my first job. The computer survived but it knocked lumps out of the concrete stairs on the way down.

oso2kyesterday
I have one those Librex as well. It was fun to play with when it came into my hands back in 1997.
sixothreeyesterday
For you to downvote my small comment, and then go on to lecture me about things you have barely any grasp or memory of, is just astounding to me. I currently own at least 5 computers with 4 MB of RAM, part of a collection of computers that is too large to count (hence the project on github).

A 386 with 4MB was the bare minimum to run Windows 3.11, which is considered the first mainstream GUI for PCs. Technically they required 3 MB, but recommended 4 MB.

Topping it all off, you're being disingenuous by suggesting running OS/2 desktop applications with just 4 MB of RAM. OS/2 was _notoriously_ memory hungry. At the very least it required more RAM than Win 3.11 (which recommended 4 MB). While OS/2 required 4 MB, suggested 8 MB as a minimum, but really needed 16 MB to do anything remotely useful.

And for you to not remember that is pretty telling.

haspok13 hours ago
Windows 3.1 was probably the first mainstream version of Windows, with significantly less memory requirements (and it ran no problem on a 286 IIRC). Windows 3.11 came almost 1.5 years later (despite the minor version bump), and mostly added networking, which _was_ memory hungry, but back then, people were happily running their computers isolated, especially at home.

I guess my point is, 4MB was really a lot of memory around 1992, and fitting a windowing environment in 640K was more the norm, and not an especially outstanding feat. Just think about GEOS and how it ran on the C64... or the Amiga (with a preemptive OS running on 256KB), or the Atari ST...

lproven11 hours ago
> and mostly added networking

Careful. You are confusing Windows 3.11 with Windows for Workgroups 3.11. They were different products, at different times.

This is why version 3.11 of the Linux kernel was called Linux For Workgroups:

https://www.linuxfoundation.org/blog/blog/linux-kernel-3-11-...

That "for Workgroups" meant a whole different OS with a networking layer, protocol stacks, additional dialog boxes in File Manager to map and disconnect network drives and more.

WfWg was both a client and a server.

The first version was WfWg 3.1 which could run on a 286.

The one everyone deployed was WfWg 3.11 which despite its minor version bump was a 32-bit only OS needing 4MB of RAM because it only supported 386 Enhanced Mode. This was the version to contain some of the new tech from the forthcoming Windows 4.0, codenamed "Chicago" and later named "Windows 95".

WfWg 3.11 had 32-bit File Access as well as 3.1's 32-bit Disk Access. 32bFA was internally VFAT.VXD and that's why the Linux FAT16/FAT32 driver is called `VFAT.`

It had a 32-bit network stack in a VXD as well, which optionally supported a LAN-only 32-bit TCP/IP stack.

http://www.thenetworkencyclopedia.com/entry/tcp-ip-32-for-wi...

Here's the README. :-)

If you want it for some unimaginable reason, here is a download:

https://winworldpc.com/product/microsoft-tcp-ip-32/tcpip-32-...

NoGravitas11 hours ago
I used a 386sx with 4MB of RAM with OS/2 2.1. It was usable for a lot of things. I certainly used word processors, terminal emulators, and casual games in that config. It did swap something terrible if you pushed it beyond its pretty narrow limits, and unlike Windows 3.1, it had enough promise to encourage you to do so. I found it more useful than Windows 3.1 on the same hardware, because it could reliably run a serial modem download in the background while I did word processing.

With 8MB, it was still pretty easy to send it into swap storms, but the range of what I could multitask was greater. Eventually (very late) I replaced it with a 486 with 16MB, and OS/2 absolutely flew on it. Had lots of headroom beyond what I actually used at the time.

II2IIyesterday
Different people are going to have different experiences, based on what they had and what they used it for.

If you've ever used a 68000 based Macintosh, you were limited to 4 MB RAM and 1 MB seems to have been more typical. It's in a different league to be sure, black and white graphics and multitasking was optional prior to System 7 (and I don't think multitasking was shipped with the System Software until System 6). That removes a lot of the pressure on memory. On the other hand, you had early Amigas supporting both colour and multitasking. The 1000 shipped with 256 kB RAM and 256 kB ROM (though I think 512 MB RAM was more typical). For an Apples to Apples comparison, the original Macintosh had 128 kB RAM and 64 kB ROM.

Windows 3.x and OS/2 2.x were later in the game, so they were designed for systems with more RAM. They also supported virtual memory. That meant there was less pressure on developers to write memory efficient code. I'm not really qualified to judge realistic memory requirements for OS/2 since I only used Warp on a system with 16 MB RAM, but I recall many people using Windows 95 on systems with 4 MB RAM. The requirements for both operating systems were similar. It's also worth noting that Windows 3.11 was rather late in the game. The system requirements were climbing rather quickly at that point.

marssaxmanyesterday
The "MultiFinder" extension allowing cooperative multitasking was actually included with "System Software 5", but I don't think I used it myself until System 6.
lproven11 hours ago
Same here. It was at least marginally more stable on "System Six."
lproven11 hours ago
> For you to downvote my small comment

I didn't. I checked. I have not.

> go on to lecture me about things you have barely any grasp or memory of,

No, this is not true or accurate. It is a personal attack.

I am a tech professional and I was back then as well. I ran Windows 2.0 and deployed 3.0 in production; I deployed and supported Windows 3.0, 3.1, Windows for Workgroups 3.1 (a different product of little importance except historically), 3.11 (a minor service pack), Windows for Workgroups 3.11 (a totally separate product you don't even mention), as well as NT 3.1, 3.5, 3.51, 4, 2000, XP, Server 2003, Vista, and more.

By casually mentioning something that barely mattered -- Windows 3.11 -- you show me that you know less than me about this stuff, and which I recall vividly and clearly. I still run OS/2 today. I reviewed the current version, because yes it is still alive:

https://www.theregister.com/software/2023/09/04/arcaos-51-gi...

I interviewed the company founder:

https://www.theregister.com/software/2023/01/19/os/2-warp-on...

Contrary to your claims, you are attempting to lecture me and I am not putting up with that. I built and supported entire corporate networks of Windows for Workgroups 3.11 computers, and I found bugs in it I personally filed with Microsoft, before Microsoft even had a website.

Windows 3.11 merits a single paragraph on Wikipedia and even that is substantially incorrect.

https://en.wikipedia.org/wiki/Windows_3.1#Windows_3.11

It did not have any peer-to-peer networking: that is the editors confusing Windows 3.11 with the totally separate Windows for Workgroups 3.11. The distinguishing feature of WfWg is peer-to-peer networking.

You claims are factually incorrect.

Windows 3.11 was not the first mainstream GUI for PCs. Neither was Windows 3.1, a different earlier product. If anything it was DR GEM, which I have written about as well.

https://www.theregister.com/software/2022/08/04/the-many-der...

You'll find my name in the release notes for FreeGEM, because I was involved in that project in the 1990s.

Windows 3.0 was the first mainstream version of Windows.

I was there and told my boss he should order as many copies as he could get because it would sell out on the day of launch (May 1990). We had a queue outside the door before we opened at 9AM that morning. We had a grand total of 17 copies. They all sold in the first 2 minutes. I was right; he was wrong, and so are you.

Windows 3.11 or any from 3.0 to the final 3.2 did not require 4MB of RAM.

Windows 3.0, 3.1, 3.11 and Windows for Workgroups ran perfectly well in 2MB of RAM and did not require 4MB, which was a high-end PC in 1992. You can even force Win3.1 to start in 386 Enhanced Mode on a 1MB RAM PC (with the `/3` switch) and I did it at work almost every day.

3.0 ran fine in 1MB and 3.1 was perfectly usable in that little. As I recall, both wanted a minimum of 1MB for Standard Mode, the 286 protect-mode mode, but it could be forced with a command line switch (`/2` or `/s`) and 2MB for 386 Enhanced Mode.

https://forum.winworldpc.com/discussion/9906/windows-3-0-3-1...

OS/2 2.0 in 4MB was a normal config and it's what I used on all 3 or 4 of my machines which ran OS/2: two Librex ones and my own Sunrace 486DX50 (note, not DX2) laptop. I couldn't afford more memory.

You are dead wrong. I remember this very well indeed, thank you, and that's why I do things like go on stage and tell the world's largest FOSS conference that they're doing it wrong.

https://archive.fosdem.org/2018/interviews/liam-proven/

Sure, OS/2 2.0 as a protect-mode 32-bit OS would be better in 8MB and I am sure much better in 16MB, but I never even saw a PC with 16MB of RAM until over a year later. I deployed NT 3.1 in production in 1993, before its first service pack, and then I ordered that user (our brokerage's Head of Research, Eric) a 16MB PC and the thing cost over £5000.

My editor at PC Pro Magazine in 1995, Derek, got the first 32MB upgrade for any of our desktops, and that was so he could run the shiny new Windows 95.

I remember this stuff in a great deal more detail than you do, and what you think you remember is wrong. Every single number you cite is wrong, both version numbers and memory numbers.

Waterluvianyesterday
Kind of an odd statement I think, but I really like the aesthetic of early OS GUIs where you could tell half the tools were pretty much there as developer tools.
Aldipower2 days ago
A pre-build floppy disk image would be great, so I could run it on my IBM PS/1 from a floppy.
Aldipoweryesterday
Ok, I built the floppy image now. dd'ed it on a floppy and powered my IBM PS/1 up. Despite some nasty sounds of the HDD bearings that went away after 30 seconds, the floppy does not boot on this machine. Just a black screen. 386SX-25 2MB RAM. Maybe 2MB RAM too less, but I thought at least something will happen. :-)
luke8086yesterday
Even on 2MB, you should be able to at least see GRUB, which would tell you that it can't load the kernel. Does it go blank before that? This could mean an issue with either GRUB or the floppy.
Aldipoweryesterday
Yes, it goes blank before GRUB and after 2MB count-up. I ruled out a defective floppy too. I suspect GRUB?
luke8086yesterday
Yep, possibly.

In case you have DOS installed on the hard drive, you can also use GRUB4DOS [1] - just put gentleos.elf on C:\, run grub.exe, then `kernel /gentleos.elf`. You may first need to comment out any upper memory managers from config.sys. A bit of an academic exercise since the kernel still won't fit into memory.

Btw. feel free to reach out to me on my profile email. I'll be busy with work for the rest of the week, but later I may look for some workarounds to get it running on 2 megs.

[1] https://sourceforge.net/projects/grub4dos/

valleyer2 days ago
ginko2 days ago
Someone prepare a set of floppy disk images so you can get the proper installation experience.
RobotToasteryesterday
Including the mandatory corruption on the last one.
Aldipower2 days ago
This is a hdd image, I guess.
sillywalkyesterday
I'm curious what model of PS/1? My first PC was a PS/1 model 2011, with a 286@10Mhz.

Also, there's an emulator for PS/1 machines at https://www.ibmulator.org/

luke8086yesterday
For PS/1 you'll need the 16-bit version from https://github.com/luke8086/gentleos. A floppy image is provided in releases. Note you only need to copy the first 64KB, the rest is just padding for emulators.
Aldipoweryesterday
Ah, even though the 386SX-25 is 32bit in my PS/1? Will try it eventually.
luke8086yesterday
Oh sorry, a quick google check told me PS/1 had 286. 386SX itself should be supported, the monochrome Toshiba on the photo has 386SX/20 with 10MB RAM.
Aldipoweryesterday
Anyway, I tried the 16bit version, and it works like a charm!! Thank you. Here's a video of the boot, I've just made. https://www.youtube.com/watch?v=1fSsTa8Oc48

Although, the floppy light does not turn off. Not sure, if this a problem with the OS or my hardware.

gunapologist99yesterday
Yes, the CPU is full 32-bits, but the bus in a 386 SX is only 16 bit. Those PS/1's are such a cool piece of computing history!

https://en.wikipedia.org/wiki/I386#80386SX

wtallisyesterday
The data bus was only 16 bits wide, but that doesn't really have much impact on OS compatibility; it just means that transferring a 32-bit value to or from memory takes two bus clock cycles instead of one. The address bus is only 24 bits wide, but that only affects physical memory address space; it still uses 32-bit pointers and a 32-bit virtual address space.
pkphilip9 hours ago
I just wish there were opensource OSs (not AOSP) like this for smartphones with full support for GPS, gyro, maps etc. But I guess that is not going to happen with all of the binary blobs.
neurocontrarian4 hours ago
Thank you, I'll try it with my old thinkpad
hansvsyesterday
Nice! The project also has a 16-bit variant https://github.com/luke8086/gentleos, not clear if it works on 8086 IBM PC, but I'll give it a go. Been looking for a reason to power up my IBM PC again.
nubinetwork13 hours ago
Do you plan on releasing any documentation on the internals? I'm curious about the memory management and process scheduling, but I'm too lazy to read the source code. :)
reconnecting2 days ago
GUI looks a but BeOS inspired, but somehow even cleaner.
luke8086yesterday
Good catch, the yellow and blue colors are totally inspired by BeOS :D I'm even adjusting the default VGA palette to get the right tints in 16-color mode.
tecleandor2 days ago
I think it's that yellow bar what it makes it look like BeOS. And maybe the right hand menu bar. But once you check a B/W version, it doesn't look like BeOS that much.
MisterTeayesterday
More like a Win 3.1 theme with BeOS colors and a NeXT desktop.