Putting the OS in ROM
A few days ago I noted that an Acorn Electron booted from ROM which was fast, and that someone seemed to have rediscovered the technique. Is there any reason why someone couldn’t build a computer with Linux in ROM rather than on disc, so it booted really really quickly? You’d need some kind of flash memory thing so you could update it with new kernels or something, I accept, but would it work? I don’t know enough about the kernel and surrounding low-level OS stuff to know whether too much of it needs to be writable while it’s working.
I know even less about such things than you, but surely you could have some kind of image of a working linux system that just copies itself from rom to flash rather than a system that boots in the conventional sense, and bingo flash takes over on all the writable duties.
53 minutes later
Wouldn’t Knoppix be the canonical example of a distro that boots from read-only media? I would assume that if it can boot from CD or DVD, it could do the same from ROM if the machine’s BIOS (or equivalent) knew it was there.
2 hours later
You mean like Linuxbios?
2 hours later
Robin: that’s just a BIOS, though, isn’t it? What I’m talking about is (at maximum) putting everything that runs right up until I get a gdm login window into ROM.
3 hours later
Well, it replaces the normal BIOS with a Linux kernel, but yeah after digging more it’s not a patch on RiscOS :) The trouble I suppose is fitting in a shell + drivers etc into the limited space on the chip. For that we’d need bigger flash chips, but surely that shouldn’t be a problem these days?
4 hours later
I’d agree with Robin on LinuxBIOS. That puts your kernel directly into ROM for booting. Then you just have your system image on a CompactFlash drive or USB stick. That is a system image on flash. People boot off of USB sticks more often than you’d think.
If you really must have it be ROM, burn your system image to a ROM and replace the chip in your USB drive :).
6 hours later
How much space would it take (RISC OS managed in pretty low amounts - 512k for RO2, 2M for RO3 & 4M for RO4 - don“t know about RO5). Maybe if a lot of cruft was cut out this would be possible (even if it was just the kernel & busybox)
12 hours later
Is flash memory really that much faster than HD. If this is the case, why not use flash for virtual memory? I understand there’s a limited number of reads/writes, but as I understadn it, the limitation is not much worse than with HD’s anymore.
18 hours later
So really what we’re thinking is that the reason RiscOS is fast to boot is because it’s entire OS and windowing system is less than 4meg?
23 hours later
It is also fast because it doesn’t have to do any hardware probing I’d imagine: it knows ahead of time what the configuration will be. And yeah don’t expcct many features - it’s easy to be fast when you’re little :)
34 hours later
There are Flash IDE drives available, which could kinda work this way. However, RiscOS is more than just a kernel, and all the software available for Linux covering these things gets bigger and more resource hungry every day, especially if you want to use all the fancy stuff like Gnome/KDE and so on.
Anyway, cut down systems can work pretty well with such a config, not to talk about specific embedded GUI systems like Qtopia (= QT/Embedded) to allow still for some gfx display if that is necessary.
However, I doubt you will be able to get all that what RiscOS offers (more or less) into about the same space using Linux. Anyway, RiscOS boxes take a bit for booting as well, no real RiscOS user runs it ‘mint’.
3 days later
uclinux is effectively just a cut down linux - and it fits (as a compressed image) in 2M of flash - see cdatas cf computer.
Also remember that TOS/GEM booted from ROM, and later it integrated with Unix (as MINT). The trick is to also have a ROMfs that holds essential utilities too.
The reason why we need HD as well as flash is that something like swap can write to ‘disc’ thousands of times a second - and that will kill your flash!
4 weeks later
FYI, LinuxBIOS currently has X-windows support.
LinuxBIOS with X11 server, completely in Flash ROM
Wed, 2007-03-07 05:10 — Uwe Hermann
http://www.hermann-uwe.de/blog/linuxbios-with-x11-server-completely-in-flash-rom
You can also found a demo clip at http://youtube.com/watch?v=nuzRsXKm_NQ
39 weeks later