LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 05-30-2007, 09:32 AM   #1
nyttoc
LQ Newbie
 
Registered: Apr 2007
Posts: 7

Rep: Reputation: 0
Installing Linux on a Compact Flash


Hello

I have a Compact Flash slot on my motherboard, and I have put a 4 GB Compact Flash of SanDisk in it. How to setup the BIOS in order to get my Compact Flash working? PIO mode? Primary Master?.... What todo ?
 
Old 05-30-2007, 09:44 AM   #2
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,715

Rep: Reputation: 324Reputation: 324Reputation: 324Reputation: 324
The BIOS should see it as a standard IDE drive, so configure it as you would a normal HDD, primary master.

As for installing Linux on it however, be aware that installing an operating system directly onto a flash media like CF will quickly destroy it with it's constant read/write. The proper way to install Linux on flash is to use an initrd and run the system from RAM. This is of course considerably more difficult than just installing it as you normally would.
 
Old 05-30-2007, 10:15 AM   #3
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 4.0 Etch
Posts: 1,346

Rep: Reputation: 49
It's okay as long as you take some measures to minimize the number of writes. Use the "ext2" filesystem, and set the option "noatime", and add the following to /etc/fstab:

none /tmp tmpfs defaults 0 0
none /var/run tmpfs defaults 0 0
none /var/lock tmpfs defaults 0 0
none /var/tmp tmpfs defaults 0 0

The effects of these changes are:

"ext2" vs "ext3" - Ext3 is a journaled version of ext2, which periodically writes to the partition for purposes of maintaining file system integrity in case of a sudden unexpected powerdown. Ext2 lacks journaling features, which is why it's not typically used for normal hard drives.

"noatime" feature - The POSIX standard includes a feature that records the last time any file was accessed--even if it was just to read the file. As a result, by default reading a file also writes to its directory entry. In practice, extremely few programs use the POSIX access time feature. You can turn it off with no adverse effects.

"tmpfs" for tmp and other directories - Some directories in Linux are used for temporary files, and are constantly being written to with temporary data. But you can mount these on "tmpfs", which is a file system that resides in RAM. Not only will this prevent writes to the CF card, but it will also improve performance. I use these tmpfs entries for all of my computers, including the ones with normal hard drives. Note that "tmpfs" file systems are inherently erased upon reboot. This is okay for these temp directories since they're supposed to be cleaned up on reboot anyway.

Oh, one last tip--don't format a "swap" partition.

I personally don't use any systems installed on a CF card. I use diskless workstations that boot off of the network. Much of the same advice applies for diskless workstations (like the tmpfs directories).
 
Old 05-31-2007, 03:13 AM   #4
antis
Member
 
Registered: Nov 2004
Location: sweden
Distribution: Arch
Posts: 67

Rep: Reputation: 15
Quote:
Originally Posted by nyttoc
Hello

I have a Compact Flash slot on my motherboard, and I have put a 4 GB Compact Flash of SanDisk in it. How to setup the BIOS in order to get my Compact Flash working? PIO mode? Primary Master?.... What todo ?
Is the CF using flash or is it a microdrive?
As for how you should configure your bios to boot off the CF I cannot answer but I can share my other experiences

I have installed Linux on a 4 Gb microdrive using an ide adapter. It has been running for a good three months now 24/7 without any problems at all. I do not think (but won't bet my house on it) that the constant read/writes that occure is an issue with the microdrives.

edit: typos...

Last edited by antis; 05-31-2007 at 04:37 AM.
 
Old 05-31-2007, 03:17 AM   #5
nyttoc
LQ Newbie
 
Registered: Apr 2007
Posts: 7

Original Poster
Rep: Reputation: 0
I also don't think it can be a problem since it's a chip like memory which is also constantly read/written ;-)
 
Old 05-31-2007, 03:20 AM   #6
Matir
Moderator
 
Registered: Nov 2004
Location: Kennesaw, GA
Distribution: Ubuntu
Posts: 8,502

Rep: Reputation: 98
DRAM and flash chips are hugely different. Flash chips are limited to 10,000-100,000 write cycles per block. That may not sound like a lot, but believe me, it adds up.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing over compact flash - Old Thinkpad 750C AcidBath2k Linux - Laptop and Netbook 7 12-20-2006 10:56 PM
linux on Compact Flash swatisameerp Linux - Hardware 3 04-05-2006 08:30 AM
Linux on a Compact Flash ducksew Linux - General 7 11-23-2004 04:40 PM
linux doesn't read compact flash wazilian Linux - Hardware 0 10-22-2004 01:20 PM
linux on compact flash tomank Linux - General 3 04-26-2004 04:08 PM


All times are GMT -5. The time now is 02:39 PM.

Main Menu
 
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration