Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wait, "ROM-based systems"? Were there such x86 micros and is this saying you could run Linux from ROM?

That's super interesting.



Some of the Tandy 1000 computers (such as the HX) had MS-DOS 2.11 in ROM. So it's not unheard of for an IBM-Compatible PC to have an operating system in ROM.

Also the "Macintosh Classic" had System 6.0.3 in ROM as well, but you had to use a keyboard shortcut to boot from there. It did not run normally.


For what it’s worth, a significant proportion of the classic Mac OS’s implementation was in rom anyway - you “upgraded” the OS by patching in-memory jump tables to ROM functions.


Are those real ROM-based-systems, that could execute code directly from ROM, without loading it to RAM first?

The only ROM-based-systems I worked with are the Atmel AVR microcontrollers. They don't need to load code into RAM for execution, they have the ROM memory mapped into the address space. I think they can't even run instructions from RAM, which makes remote code execution physically impossible.


Even if you can't execute code from RAM, stack corruption and Return-Oriented-Programming (ROP) can still be a thing. It's just far more limited if you can't use ROP to set up regular code.


Memory devices were not accessed via exotic interfaces at the time. ROM was directly addressable on the bus in early PCs. They executed their ROM code directly as the access time was sufficient for low speed clocks. That is what the BIOS is. Any additional OS/BASIC environment worked the same. Later BIOS implementations had shadow RAM options to allow execution without wait states as bus speeds eclipsed ROM access times.


IBM itself made PS/2s with PC-DOS in ROM. The 5150 had ROM BASIC and that also continued through to the early PS/2s.


Less obvious than some of the embedded things: https://en.m.wikipedia.org/wiki/Atari_Portfolio

x86 (and licensed derivatives) were a thing in more custom handhelds like the Psion Series 3, and games systems like the Wonderswan. The variants made by NEC alone were: https://en.m.wikipedia.org/wiki/NEC_V20#Variants_and_success...


The Psions could do execute-in-place, including for third party software on ROM SSD - i.e. they did not have any fundamental distinction between working memory and disk storage.


Yes, NOR flash was common in these kind of devices and phones until maybe 2005 or so. So you could run code without loading it to RAM first. However, I believe RAM was still needed for stacks and heaps. Writing them to NOR flash sounds too slow.


No, I really do mean that they used the disks as ROM. No writing to it. This worked because you can just put the stack and heap at a difference position in the memory map from the executable code.


I've never seen a fully ROM-based PC, but I have worked with ISA NE2000 NICs with boot ROMs that allowed them to diskless boot into a DOS-based Novell NetWare client. It wouldn't surprise me if there were ROM-based local boot environments on ISA cards.

The Cisco PIX firewall, in it's original incarnation, booted from non-volatile memory (I don't know if it was EEPROM or flash) an ISA card.


Fully ROM/Flash PC-ish systems are/were pretty common in the embedded and industrial control space. Usually the boards emulate one or more floppy drives. I've got a half dozen variations, including PROM, Flash and battery backed SRAM. Even one with bubble memory, which is pretty nifty.

The first-gen PIX you mention had an 8M or 16M ISA flash card it booted from, containing the whole OS.

The Novell netboot is called "RPL".


My first computer was a 286 PS/1 model 2011, with PC-DOS and a graphical shell in ROM.

Interestingly, somebody has made an emulator for it.

https://barotto.github.io/IBMulator/


The DiskOnChip was a somewhat popular solution (think of thinclients), often running stripped down versions of Linux in the early 00s.

Here you can see it on an external board: https://www.os2museum.com/wp/diskonchip/

I have a few thinclients with a socket directly on the mainboard for a DOC


Lots of embedded systems like routers run read only although maybe they're not technically ROM. Usually they mount the root filesystems read only and create some small ram disk/tempfs for logs. Persistent settings go to a small NVRAM area

The root filesystem is only written to when you flash a new OS image


The context of ROM here is "can execute code without putting it in RAM" rather than "code is stored in a read-only memory".


Another example was the Headstart Explorer from 1989. My parents had such a computer.

> But the most characteristic part was the operating environment - 384kB of ROM contained MS-DOS version 3.31 and Explorer GUI which allows to work in PIM programs, database and text editor using mouse. The GUI is shown using CGA mode and allows to launch DOS programs too.

https://oldcomputer.info/pc/hs_explorer/index.htm

CathodeRayDude (CRT) has an entertaining video on the subject:

https://www.youtube.com/watch?v=d1jpIiST6ec


The Tandy 1000 SL/2 I grew up with had DOS 3.3 in ROM, mounted on D:\


Sort of.

It’s merely a ROM drive implemented in the BIOS. Drive 8 is used.

There’s also an INT 18h hook that operates by simply booting drive 8. This is the fallback bootstrap hook. No disks? No problem. Boots to DOS vs. IBM which booted BASIC or everyone else who just prints an error.

On one of these Tandy’s, DOS is really running from RAM, it is merely loaded from ROM, and even then it’s just a virtual disk.

I wrote a little tool to make the ROM drive accessible on non-Tandy DOS: https://github.com/dfelliott/tandy1000-romdrive

There are versions of DOS that can be run directly from ROM, but this isn’t one of them.

Curiously, Deskmate runs from ROM for real. Meaning the code is actually running in the Exxx segment backed by the actual ROM chip. The Deskmate files on the ROM drive are relatively small and are only a small part. The bulk of the code runs direct from ROM.


Yes, there were many - including the original IBM PC which would could boot to BASIC loaded from ROM. Some more sophisticated machines included:

- Many Tandy PC compatibles could boot from ROM to their DeskMate GUI - HP, GRiD, Zenith and others had laptops that had DOS and in some cases Windows in ROM.

- IBM's PS/1 line could boot from ROM - Many GEOS devices booted from ROM into a GUI, and often could boot to DOS from ROM too.


The 8086 and 8088 etc. were relatively popular for embedded devices. For example some early 90s Apple printers used an 80186 as the controller. Such designs were often incompatible with the IBM PC; 8086 doesn't necessarily mean PC compatible.


I wouldn't be at all surprised.

There is an MS-DOS compatible ROM OS still sold today:

https://www.tuxera.com/products/rom-dos/


I said in my earlier post that I hadn't seen a fully ROM-based PC but I completely forgot about stuff like the HP and Psion and Atari PC handhelds!

In that vein, I've got an old V20-based NEC laptop (the PC-17-02[0], arguably an Ultrabook in its day) that booted MS-DOS 3.3 from ROM. It had a 2MB battery-backed RAM disk that the ROM got copied into. It showed up as a hard disk drive with an INT 13H-style interface.

[0] http://old.chuma.org/ultralite/index.shtml


The original IBM PC was ROM-based. It worked fine without a disk drive, it just booted into ROM BASIC instead.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: