Idea for an OS

Flatline

Golden Member
Jun 28, 2001
1,248
0
0
I gave myself an idea in another forum and thought it could provide an interesting discussion.

If an OS were implemented that booted from a DVD and loaded itself into memory (which is dirt cheap these days) where it would become read-write...

You could save any changes you make to the configuration and any documents, etc. to another (removable) media, thereby having an instant configuration available to you at any machine running the OS.
If someone does manage to cause irreparable harm to the OS while it is loaded in memory, a simple reboot without the removable media which caused the problem would bring up a pristine OS, since the DVD would be read-only.
With 4.7Gb of space on a DVD, you could load nearly ever 'nix or *BSD program known to man at boot (or use a slimmed-down version so that less memory would be needed).
The OS would be ridiculously fast since everything would be present in memory, which is roughly 10,000 times as fast as a hard drive.
Hard drives are the primary point of failure in most machines (moving parts eventually break), and could be eliminated from the design (although they could be used for backup purposes). The power supply and DVD drive would then become the primary points of failure; DVD drives are of course very easy to replace, but of course a power supply can fry your system - the saving grace being that they fail much less often than hard drives.

There are many linux dstros that boot from CD already, so this seems a logical step. A CD drive may also be necessary to access the DVD...I haven't checked in quite a while, but the last time I did you still couldn't boot from a DVD.

Of course, you would have to have a LOT of memory, but since 64-bit processors are soon going to be available for desktop machines, the 4Gb barrier no longer exists.

This could also be useful for server/terminal arrangements, which would cut the cost of this for a network, since a central machine would be the robust workhorse and the clients would merely need a minimal boot image.
 

Flatline

Golden Member
Jun 28, 2001
1,248
0
0
The whole idea is that the OS itself would be loaded into memory (thereby allowing changes to the configuration and giving a nifty speed increase). The DVD thing is basically so that you could load a ridiculous amount of software.
If you have your settings and documents, etc. stored on a removable device (think smart card with storage), all you have to do in the event of a software problem would be a reboot, which would bring up a clean OS. Then you insert your removable device, and presto! your settings are back. I'd love to be able to do that with servers.
 

jonmullen

Platinum Member
Jun 17, 2002
2,517
0
0
But to really make it fast you would have to load every program into memory at startup, and on a DVD rom that will take a while and require atleast 4.7GBs or RAM other wise if you plan on loading the programs as you need them you will actually be slowing the computer down since its going to take a DVD rom more time to load the program than a HD. The idea of loading it all into memory is nice for running programs, but most OS should do that if you have enough RAM otherwise it goes to swap space. Now the idea of not being able to fvck up your OS image is nice, but you could do that by just mounting a partition readonly. Nice idea but not really practical.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: Flatline
The whole idea is that the OS itself would be loaded into memory (thereby allowing changes to the configuration and giving a nifty speed increase). The DVD thing is basically so that you could load a ridiculous amount of software.
If you have your settings and documents, etc. stored on a removable device (think smart card with storage), all you have to do in the event of a software problem would be a reboot, which would bring up a clean OS. Then you insert your removable device, and presto! your settings are back. I'd love to be able to do that with servers.

Look at embedded systems. That is basically what most of them do.
 

Flatline

Golden Member
Jun 28, 2001
1,248
0
0
I was thinking of loading everything into memory at startup; on a business network, you might want the amount of software that a DVD could give you, but for a home or desktop user what would fit onto a CD would probably suffice. The other part of the trick is that any terminal would give you your settings and you could take them with you anywhere you go. Loading everything from a CD into memory (say, for a home user) wouldn't take all that long. I also wouldn't think that you would reboot this type of system often, maybe not at all, so I don't think load time would be too much of a factor (I realize it would take quite a while to load everything, but if it stays on, you really won't have to load it often at all).
I just like the idea of an OS that you can't destroy.
 

Flatline

Golden Member
Jun 28, 2001
1,248
0
0
Look at embedded systems. That is basically what most of them do.

And it's close to what I'm thinking of, just on a smaller scale. Imagine a business network that can be brought back to normal by one reboot no matter how catastrophic the attack, with the users' settings and files intact...that sounds pretty good to me.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Originally posted by: Flatline
Look at embedded systems. That is basically what most of them do.

And it's close to what I'm thinking of, just on a smaller scale. Imagine a business network that can be brought back to normal by one reboot no matter how catastrophic the attack, with the users' settings and files intact...that sounds pretty good to me.

Why not something like the Sun dumb terminals? They're spiffy to say the least. All you would really have to do is reboot the server, and you could have plenty of raid on there to help against the loss of data.
 

Flatline

Golden Member
Jun 28, 2001
1,248
0
0
Why not something like the Sun dumb terminals?

It would be something close to that on a network (weren't they called Sun Rays and not dumb terminals? the marketing department would have had a fit otherwise ;) ). Think about that basic style of network with user data stored safely in removable media (and perhaps hard drive or tape backups occasionally), settings and configuration stored in removable media (which could, of course, be backed up any number of ways), and the ability to have all those settings and configurations restored with one boot on any machine (any machine with enough RAM) and insertion of said media. If a site were bombed and you had offsite copies of the configuration, you could restore your entire network literally as fast as you could replace the machines.
For a home user, it could be a reboot from CD (I would assume something very like Knoppix, but loaded into memory) and the insertion of media in the case of a catastrophic failure; if anyone they knew were running the same system, they could bring their environment up at their machine just by putting in their "smart media" (or whatever you want to call it).
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
You should be able to boot from DVD just like an CD, there's even a Debian package that'll take your currently running system and make a bootable ISO out of it. I havn't had a reason to try that yet though.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Actually I've run several ramdisk based Linux's. In fact I am using one right now for a custom firewall, it's completely diskless installation that runs off a floppy disk, once it's loaded then you don't even need the floppy in it no more. It's a 200mmx cpu generic mainboard and 64 megs of RAM, it's a nat router with iptables firewall ruleset. It logs the denied packets and has a nice mini-http server for monitoring it and viewing the configuration.. but the only way to modify the install is to edit the config files and then pop back in the disk and rewrite to configs to the disk. It is also has a dns server and a dhcp server. Pretty slick IMO.

I don't see why you couldn't do the same with a bigger distro. Probably modify a knoppix distro to boot up, mount the cdrom, copy the distro into the ramdisk, and then umount the cdrom. You could then save the /etc and /home partitions on a smallish harddrive so you will have some way to save changes.

The bootup times would be a *itch though.. you'd have to read off of the entire disk before you'd be finished.

It could be fun. If you get a 64bit computer and dump something like a eight thousand dollars worth of ram(and a hardcore UPS) into it, then you'd have a killer high performance fileserver...
 

Stealth1024

Platinum Member
Aug 9, 2000
2,266
0
0
Back to the commodore 64 days with the OS and programming language built into the machine! hehe...
 

Vadatajs

Diamond Member
Aug 28, 2001
3,475
0
0
Originally posted by: n0cmonkey
knoppix? Except for that whole not booting from DVD thing.

If you paid for admission to LinuxTag this year (rather than pre-registering for free) they were giving away knoppix on dvd.
 

AndyHui

Administrator Emeritus<br>Elite Member<br>AT FAQ M
Oct 9, 1999
13,141
17
81
That's right. There was a special edition of Knoppix built for Linuxtag this year on DVD....the full 4.7GB of software.

Flatline: from your initial post, it would seem Knoppix fits that bill perfectly. Boots and runs directly from the CD. I use it to play around with and learn Linux....plug in a USB keydrive and save everything to it, including settings. Eject the CD, turn off the computer, remove the keydrive and I haven't left a trace, nor have I lost any data.

It's not exactly "incredible fast" as things are loaded from the CD into memory on intial demand, so you are limited to the speed of your CDROM/DVD drive.
 

Redviffer

Senior member
Oct 30, 2002
830
0
0
Originally posted by: AndyHui
That's right. There was a special edition of Knoppix built for Linuxtag this year on DVD....the full 4.7GB of software.

That sounds sweet! I have the CD version of Knoppix, but a DVD version (with more software) just sounds like the ticket. I'm not seeing anything mentioned about it on the knoppix.org site, any other place to find one of these DVD's?
 

Flatline

Golden Member
Jun 28, 2001
1,248
0
0
The trick for what I was talking about was loading that 4.7Gb into memory, giving a really big speed increase; since you can make memory read-write as a ramdisk, you could use it just like a regular distro and your settings would be kept separately. That way, in the case of a system failure, you reboot into a clean OS that is loaded into memory and restore your settings. Like Knoppix but loaded onto a ramdisk instead of running directly from the CD.
 

AndyHui

Administrator Emeritus<br>Elite Member<br>AT FAQ M
Oct 9, 1999
13,141
17
81
Knoppix IS loaded into a RAM disk...but as I said, it is on demand. Why take up the whole 4.7GB in RAM if you are not going to use more than 10% of it? Most of the software on the Knoppix CD is compressed...some 1GB worth. It is decompressed and loaded on the fly when you run the program.

Settings are kept separately in Knoppix. I highly recommend that you check it out, because, as I said, it fits your description.
 

Flatline

Golden Member
Jun 28, 2001
1,248
0
0
NO it does not! I know about Knoppix and use Knoppix and it is NOT what I am talking about. I do NOT want the software loaded into a ramdisk on demand but at boot time so that it is already loaded into memory. There is a big difference there. I realize that settings are kept separately in knoppix (along with many of its boot-from-cd brethren) but they are slow because they run from the CD. Loading the OS into a ramdisk at boot (which I realize would take forever, but these systems would not need to be rebooted often) would alleviate this speed deficiency.
 

AndyHui

Administrator Emeritus<br>Elite Member<br>AT FAQ M
Oct 9, 1999
13,141
17
81
I see your point, but it would still take time to load from your DVD into RAM at boot, and is still limited by the speed of your DVD drive. Again, why bother loading all 4.7GB into RAM if you are not going to use more than 1GB worth of software?

I would rather have a couple of seconds wait for it to load whatever I needed at the time, and only a minute or two to boot, than have to sit there for 10 minutes while it loaded all 4.7GB into RAM on boot.
 

Flatline

Golden Member
Jun 28, 2001
1,248
0
0
What I am talking about would be used more for server/client arrangements. Memory would be more than fast enough to handle a large number of incoming connections for application use, etc. whereas the cd/dvd would definitely not. The boot speed would be the only thing affected by the speed of the DVD drive, since everything would be loaded into memory; after boot, the DVD drive would sit idle until the next reboot. As more of a server configuration, the machine would rarely (if ever) need to be rebooted, and an administrator could restore all of a server's settings to another server if need be...if the machine caught on fire and there was a server at another site, the admin could simply boot the server and insert his removable media containing the settings, and the machine would be back to its original state.
 

AndyHui

Administrator Emeritus<br>Elite Member<br>AT FAQ M
Oct 9, 1999
13,141
17
81
Interesting, but what is stopping you from taking a Ghost image, with all your settings and files in a different place, and the whole thing configured as a regular OS? When things get corrupted, you just dump the Ghost image back.

Again, I just don't see the need for 4.7GB to be resident in memory. What would you be running in RAM?
 

Flatline

Golden Member
Jun 28, 2001
1,248
0
0
Whatever I wanted; part of the fun would be the massive speed increase afforded over regular media. I was thinking of application servers and so forth. Server-terminal workstations have been around forever, but once enough people started accessing a particular app the whole thing could slow to a crawl; this would eliminate that bottleneck. You wouldn't have to load 4.7Gb of software, but part of my original point was that you could, and thereby have about every 'nix app known to man accessible.
Imagine having one application server powerful enough to serve every thin client on a very large network without slowdown (except, of course, for network traffic, but you could always run Gigabit - expensive but fun) that could be restored to full capability with all settings intact extremely easily. That would be very cool.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Look, this realy isn't that hard or revolutionary, people have been using ram only distros for a long time, just not full sized ones. Lots of one floppy-based Linux distros do it completely from the computers RAM. They usually need about 8 to 16 megs of RAM TOTAL to run the the OS. You put the floppy in, it loads itself into ram, and now you can get rid of the floppy. That's it.


here is a simple howto for creating a ramdisk and then running a website from it., heh and you thought scsi raid banks were fast I/O. It's a old one using 6.0. Worst thing you'd probably have to do it recompile the kernel to the ramdisk filing system support, I don't know how common it is to have distro's kernel support stuff like this, but making a custom kernel is actually a pretty easy thing to do after a few tries.


Plus combine that with the CHROOT command. "info chroot" for a good start. It would go roughly like this.
get you knoppix cd, or make a custom cd with all the stuff you want. I doubt you have over 1gig in your system, so you won't be able to put a entire distro into it, but you can get a usuable linux OS to fit easily onto a cd uncompressed, so I'd work on that first.

So you have a 600meg linux OS on the cd or in the harddrive. You boot up normally on the hd or cdrom or whatever. Copy the entire contents of the cdrom into the ramdisk (of course you'll have a hardtime with /proc and /tmp filing systems so you can't copy them directly but you can make new versions of them in the chroot enviroment), set up all the dev files and whatever else you need, then chroot into it. And Whala! You are operating completely from RAM(almost).

Sounds difficult, but if you work at it, it'd probably only take a month or two to automate it and get the major bugs worked out.

Or maybe try it from a slightly different angle.

Boot up all normal like with the knoppix cd, or your regular desktop OS you use, but modify lilo or grub or whatever to create a ramdisk. Mount the ramdisk to your directory somewhere and then follow the directions for setting up a chrooted debian distro. but instead of using a regular folder use your ramdisk.

Then after you get it set up decently, make a tarball copy of it and store it somewere on your network or hd were you can get a hold of it. Then work from it from their.

there are probably a hundred different ways of takling this project and some of them may be more "pure" and not require a seperate OS or use chroot or anything like that, but this may be the easiest way to see if the benifits would outway the cost of vastly increase $ to diskspace ratios(among other costs). Anyways you get what you want. A completely RAM-based operating enviroment. Then after you get that all figured out, then takle creating a compressed filing system in RAM so that you can stick the entire 2 gigs or so of distro into RAM without breaking the bank.

hell, if I get some free time I may try it out myself just for the s**ts and giggles(exept for the compression part).