Home » Questions » Computers [ Ask a new question ]

Linux distro to use CF instead of IDE drive?

Linux distro to use CF instead of IDE drive?

To build a compact, headless host, I'd like to use a CompactFlash instead of an IDE drive, and connect the card to the mobo using an IDE-to-CF adapter.

Asked by: Guest | Views: 36
Total answers/comments: 5
Guest [Entry]

"Most distributions can be easily tweaked to function this way. I've done the following on my netbook (running Ubuntu 9.04):

mount /tmp as a tmpfs (RAM based) filesystem
mount /var/tmp as tmpfs too
mount ~/.mozilla/firefox as tmpfs and copy the real content (kept in ~/.mozilla/firefox.ssd) to it, rsyncing back to ~/.mozilla/firefox.ssd every now and then (and explicitly in the shutdown scripts). This makes a big difference as FFs writing to the URL classifier DB and its cache is very noticable on the slow SSD.
remove all swap (the machine only has 8Gb of fixed storage and 1.5Gb of RAM, so there is little need for swap and having the extra free drive space it more important and having enough swap around to enable suspend-to-disk is definitely not an option!)

Things I plan to do, but haven't got around to yet:

mounting /var/log as tmpfs, but syncing regularly with an on-disk copy, like I do my main user account's FF profile. Other parts of /var may benefit from this too, or maybe the whole of /var, but there is only a fixed amount of RAM to go around in this machine

I don't know of any distributions specifically set to do this sort of thing by default (though there are several designed to run entirely from RAM, but this is probably not suitable for what you are looking to do).

Be careful when mounting /tmp as a tmpfs filesystem to make sure you know how much space your apps are going to use there. For instance if you run VMWare VMs with certain options they will create large files there as RAM backing store (and for suspending to) - see this page for more info on that. Also make sure no badly designed/configured apps/scripts assume that the content of /tmp survives a reboot.

With modern flash drives you don't have to worry about the number of writes so much in terms of drive life-span. The combination of improved ""expected write cycles before failure"" per cell and the wear-levelling algorithms used means this is a much smaller concern than it once was - you have to be running some very IO intensive operations for a long period of time before it becomes a major issue. The main reason to keep things in RAM on a flash based system is to work around poor write performance (especially with many small writes) rather than to extend drive life."
Guest [Entry]

"There are several Linux distros that can be run from Live CDs (i.e formats that require no writes at all to the source media)

Ubuntu has one. (It's installer is actually a live CD), and if you look on their site there is instructions for making your own customised live CD/USB stick. (Check out LiveCDCustomisation, LiveCd and HowToCustomiseUbuntuLiveCds)

Knoppix is specifically built as a Live CD Linux distro.

Either of these would probably suit you fine."
Guest [Entry]

You might also be interested in slax which is perfect for just such a setup.
Guest [Entry]

"DamnSmallLinux can be set up to boot from CF--in fact at one point they were selling CF cards with DSL pre-loaded.

I've seen OpenBSD installs (great low-power router) but they required tweaking."
Guest [Entry]

I have a home router running Slackware on top of an 4GB CF card via a IDE-CF adapter.