Linux - DistributionsThis forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on...
Note: An (*) indicates there is no official participation from that distribution here at LQ.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
what distribution would be best to start out with for my project? I would like one based off red hat, like fedora core, or centos (centos preferred) I need it to be installed to a hard drive, then when it boots, load a ram drive and copy everything to it and shut down the hard drive after a few minutes and unmount it. brazil firewall does something like this, but there is a lot I can't do with it. I need to be able to run apache, php, mysql, gcc, and my own software, along with the router software. centos is what I usually use for servers, but how do I get that to run from ram?
another method I was thinking about, maybe use a centos live cd, but I have to be able to easily make changes to the config and permanently install other software. would I be able to write a script to copy files from a hard drive and unmount it after starting the boot from the cd-rom, but before loading any services?
I guess the biggest question is, why do you want to run from a ramdrive? It sounds like you are working on a sort of hardened-server, so I would guess that the purpose is to make the root file-system immutable? If this is the case, I would recommend the use of optical (CD/DVD) media. Anyhow, you asked about a distro, so I should try to answer that :-). I see no reason why this couldn't be done based on CentOS, and you say it is your preferred. Whatever distro you choose get ready to use some elbow grease, because to pull this off you're going to write custom init scripts.
As a side note: I know you haven't actually said that a server is the end goal, but I'm guessing it is, so I'll issue this warning. I saw you list gcc as a desired application, but having a compiler on a server represents a slight security risk.
the main reason I'd like to run it from a ramdrive is to not have a hard drive running 24/7 in the server. as I said in my original post, I'm currently running brazil firewall. that extracts tar files into the ram drive before booting the system. a minute after the booting completes, the hard drive turns off making the system quieter and more reliable. the only moving parts in the system are fans. gcc would have to be on the server to compile my code for one of the daemons that will be running on it. if I have to, I can use a cd to boot from, but I need some method that will be easy to install a newer version of my software. a hard drive would make it easier to push the new code to live production for final testing and use, and would allow me to save config files permanently when needed.
if you know of any good tutorials or books that would help me do this, it would be a big help. I am far from being a kernel hacker. I'm learning as fast as I can and enjoying every minute of it.
Quote:
Originally Posted by PatrickNew
I guess the biggest question is, why do you want to run from a ramdrive? It sounds like you are working on a sort of hardened-server, so I would guess that the purpose is to make the root file-system immutable? If this is the case, I would recommend the use of optical (CD/DVD) media. Anyhow, you asked about a distro, so I should try to answer that :-). I see no reason why this couldn't be done based on CentOS, and you say it is your preferred. Whatever distro you choose get ready to use some elbow grease, because to pull this off you're going to write custom init scripts.
As a side note: I know you haven't actually said that a server is the end goal, but I'm guessing it is, so I'll issue this warning. I saw you list gcc as a desired application, but having a compiler on a server represents a slight security risk.
I suspect that you will have the best luck basing this off a minimalist distro such as DSL. I don't know anything about the specs of the machine running this, but remember that you'll have to fit the entire root file system onto this ramdrive, as well as provide actual memory to running applications. The biggest strain may come from holding whatever files you need to serve in ramdisk as well.
Might I recommend an alternative which provides equivalent results minus the elbow grease? You could instead purchase a CF-to-IDE adapter. These generally run about $20 and allow you to plug a compact flash card in as a hard drive. Then simply install to the CF "hard disk". This circumvents all advanced bootscripting, etc. You still avoid moving parts - CF has no moving parts, nor does the adapter add any. Your computer will still run quieter, cooler and more efficiently - without reducing the amount of available RAM.
The downside is, of course, that it requires you to spend more money. I don't know where your $$$ barrier lies, but at ~$20 for the adapter and ~$40 for 4GB of CF or $30 for 2GB, you may need to consider the value of the time you would put in.
someone reminded me the other day when we were talking about maybe using a usb flash drive, too many reads and writes to the drive and it will fry.. I really don't know how often the system will write to the drive or how long a flash drive would last. if I get rid of most of the logs in linux, there might only be 1 or 2 in my own software, but then there is mysql running on the system too. if I knew a CF would last me a few years, I would go that route.
Quote:
Originally Posted by PatrickNew
Might I recommend an alternative which provides equivalent results minus the elbow grease? You could instead purchase a CF-to-IDE adapter. These generally run about $20 and allow you to plug a compact flash card in as a hard drive. Then simply install to the CF "hard disk". This circumvents all advanced bootscripting, etc. You still avoid moving parts - CF has no moving parts, nor does the adapter add any. Your computer will still run quieter, cooler and more efficiently - without reducing the amount of available RAM.
A CF disk should, generally speaking, outlive it's hard disk counterpart. When the OLPC project wanted to increase the durability and lifespan of their laptops, the first thing they did was to scrap a hard disk in favor of flash memory. Note that I'm talking about a CF *card*, not a usb drive - I'm unsure how many assumptions you can make about the internals of an arbitrary usb drive.
ok, thank you. if you're right, this solution should make the project much more simpler, and I can focus more on programming the home automation software.
Hrmm, further research confirms that there are concerns about flash memory wearing out. However, this can be helped by simply switching over to JFFS2. Essentially, I was wrong and they do wear out faster than hard drives. However, it should last several ~7-8 years, by which time everything will probably be up for an upgrade.
Flash memory regardless of format i.e. CF, USB, camera memory sticks, solid state drives etc etc all have a limited number of write/erase cycles (there is no limit on reads). The best have about 1,000,000 cycles. Both CF and USB have built in logic that does "wear leveling" to keep from burning out individual cells to quickly. Unfortunately I do not have any actual lifespan data but it should be many years with normal usage.
I have had a USB flash drive fail but I could not say if I "burned" it out or not.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.