LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   *How* read-only is a read-only filesystem? (http://www.linuxquestions.org/questions/linux-general-1/%2Ahow%2A-read-only-is-a-read-only-filesystem-784169/)

hippiejake 01-23-2010 03:15 AM

*How* read-only is a read-only filesystem?
 
Hi.

I'm building a system that needs to boot as quickly as possible and have a read-only root filesystem. CDs and DVDs are definitely read-only, but pretty slow. I'd like to use a standard HDD for its superior speed, but mount it read-only.

My question is, how well will the disk put up with abuse? I don't mean shock or head crashes, but things like kernel panics and power failures.
Strange glitchy writes going out to a supposedly read-only filesystem [under any circumstances] would be very bad news. =D

[The project in question is a car computer to work as a simple sound system. It needs to boot in a reasonable length of time and I don't want to have to wait for it to shut down before I park every time.]

Thanks.

neonsignal 01-23-2010 04:09 AM

Hard drives can't be guaranteed to cope well with power failures. Software crashes aren't likely to be a problem; the flaw in read-only mounting is that it doesn't protect well against malicious circumvention, which isn't an issue in your project.

You might be better off looking at an solid state drive (SSD, typically flash based). Flash can behave badly during power failures, but typically this is when it fails during the middle of a write. Since you won't be writing to the flash, you will have little risk. SSDs will also reduce the power consumption. In fact, if you can fit the system on an SD card (ie, boot from a USB reader with the SD card), you can even use the little write-protect switch on the SD card just to make sure. A compact live distro like Damn Small Linux is designed to boot off a small read-only device.

MS3FGX 01-23-2010 05:21 AM

I wouldn't suggest using SD to run an OS out of, but rather a high-speed CF card in an IDE/SATA (whatever your board has) adapter. CF tends to be faster on average than SD, doesn't have a capacity limit (I.E SD vs. SDHC), and is more physically robust.

But you certainly shouldn't be using any sort of spinning media (optical or magnetic) in a car computer, for very obvious reasons. Booting out of flash will also be much faster than from a HDD.

smoker 02-14-2010 03:24 PM

I second the CF idea. I installed DSL to a CF card with it defaulting to Install_to_RAM. That way the systems ran very quickly but the OS was secure, and easily upgradeable. Only used a 1GB CF card too. A 33x Cf seemed plenty fast enough. I have an image available, but it's nearly a gig to download. I could post a torrent I suppose.


http://files.headru.sh/BT/dsl-cf.img.torrent


All times are GMT -5. The time now is 05:44 PM.