Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
This may be a profoundly and blatantly stupid idea; if so, I apologize.
Would it make sense to set things up somehow so that on bootup, the entirety of the OS (and perhaps some common apps) is copied to RAM?
My laptop has 2 GB of ram that are currently very heavily underutilized (I inherited it from a gamer cousin who had much greater needs than my prosaic web-browsing, document editing and media viewing), and it seems to me that hard drive access is the bottleneck to its speed. Also, I figure that this would result in a somewhat longer battery life as the hard drive would have to spin up less on the whole. I realize this will increase the bootup time considerably, but this seems like a reasonable tradeoff.
Would this be a good idea? If so, how would I go about doing it? Also, what would be a good lightweight distro to use? The idea was inspired by Slax's copy2ram feature, but it's creator seems obstinate that it's not to be installed.
There may be others that load entirely into RAM, but Puppy's the one I've used. Initially it runs as a liveCD, but you can save your current session onto a USB stick, so next time your boot the liveCD, it'll restore your settings (installed applications etc.). I used it on a Duron 750MHz with 512MB RAM and it was blazingly quick Well worth a shot, if nothing else.
Doing this with a preinstalled system would be difficult, but not impossible. I'd suggest trying Puppy first.
You are right, removing the HDD from the equation will greatly increase system performance. Setting a system up like this is not uncommon, though you should be prepared to do a lot of manual work to make things perfect.
The basic concept is that you put together a slim install of a distribution (I have used Slackware in the past, it's simplicity prevents some headaches), optimize it and set it up as best as possible, and then compress the whole thing into an image with gzip. Using an appropriate bootloader, you then pass this image to the kernel as the initrd (Initial RAM Disk) and the kernel boots to it as if it were on a normal drive.
Traditionally, initrds are only minimal systems that get the machine booted (think like an emergency failsafe to boot the machine no matter what you did to the filesystem on the HDD), but there is nothing stopping you from building an entire OS into an initrd (besides RAM), indeed, this is the basic concept behind Live CDs.
Here are some pages you might want to check out to familiarize yourself with the concept and specifics. The second link should be especially helpful, even though in this example they are using Compact Flash (of course, you could do that as well).
Thanks for the suggestion, but I really would like an OS that resides on the hard drive, but gets copied over to RAM on start up; I don't want to be forced to stick in a USB stick every time I turned on my computer (Wouldn't that approach also be slower than saving to a hard drive due to USB's lower data transfer speeds?). Also, I'm a bit averse to a distro that has both a unique package manager and a small user base, as this increases the chance that I'll need some program not in its repositories (it says it can use slackware packages but says only they "may work").
I realize that doing this would be difficult with a pre-existing OS, but I have a separate partition for my OS, so I can change it without losing my files.
Linux already does this to some extent, and your RAM may not be as under-utilised as you think. When a file is accessed, a copy is (usually) kept in RAM in the disk cache. Next time the file is accessed, the RAM copy is used, instead of the disk copy. Application code generally takes priority over disk cache, so if you launch a big app some of the disk cache will be dropped (meaning the files in that part of the cache will have to be read from disk next time), but the system's pretty intelligent about how this operates.
It doesn't copy everything to RAM at boot, but regularly used files will end up in the RAM disk cache in pretty short order, so the speed-up would likely be marginal anyway.
Check the output from 'free' to see what's really going on with your RAM. This is from my mail server: