0% found this document useful (0 votes)
31 views2 pages

Install Debian To CF

The document discusses configuration options for installing Debian on a compact flash card to be used as a network attached storage (NAS) device. It asks questions about using swap partitions, filesystem types, disabling logs and mounts, and provides potential answers and tips for reducing writes to the flash card including using ext2, mounting the filesystem read-only, and changing directories like /var and /tmp to tmpfs partitions. It summarizes the suggested configuration and asks if apt-get upgrades would still work with these changes and whether everything needs to be on a separate partition.

Uploaded by

elradurscribd
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views2 pages

Install Debian To CF

The document discusses configuration options for installing Debian on a compact flash card to be used as a network attached storage (NAS) device. It asks questions about using swap partitions, filesystem types, disabling logs and mounts, and provides potential answers and tips for reducing writes to the flash card including using ext2, mounting the filesystem read-only, and changing directories like /var and /tmp to tmpfs partitions. It summarizes the suggested configuration and asks if apt-get upgrades would still work with these changes and whether everything needs to be on a separate partition.

Uploaded by

elradurscribd
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Print Cancel

Installing Debian to a compact flash card


I realize this question comes up every now and then, and have found quite a bit of information
regarding the subject. I just want to make sure I'm not missing anything. A few configuration tweaks
I've found:

1. Do not format a swap partition (not a problem, have 4GB of memory for a system that will
probably use <256MB.

2. Don't use ext3 as its journaled (so what file system should I use? ext2?)

3. Disable logs (not sure how to do this)

4. I also found this post http://www.linuxquestions.org/questi...66#post2768166 (I get the gist of it,


but it's 2 years old does it still apply?)

5. Mount filesystem as read only (is this really necessary, and if so how is it done)

In case anyone is wondering, the system is basically going to be a NAS. It will run OpenSSH,
ifenslave-2.6, and iscsitarget ONLY (besides a standard system install). I got tired of dealing with
FreeNAS and Openfiler, so I played around with creating RAID arrays and ethernet bonding and feel I
can do it better myself.

If anyone could answer some of the questions, or provide any more tips for reducing writes to a CF
card I'd be much appreciative.

/etc/defaults/rcS

RAMRUN=yes
RUNOCK=yes
that changes /var/lock and /var/run to tmpfs

-for the network you must change directory /etc/networking to /var/ (each boot, ifstate file)

-ext2 (faster) with noatime

-boot option kernel ro

-fstab
/dev/"cf_card" / defaults,noatime,ro 0 0

Y'all have been incredibly helpful, just to sum everything up:

No Swap

EXT2

Changes to /etc/fstab

/dev/"cf_card" / defaults,noatime,ro 0 0 - Changes the root file system to read only, and turns
off file modification counts
none /tmp tmpfs defaults 0 0 - Changes the /tmp directory to a tmpfs
none /var/tmp tmpfs defaults 0 0 - Changes the /var/tmp directory to a tmpfs
none /var/log tmpfs defaults 0 0 - Changes the /var/log directory to a tmpfs

Changes to /etc/defaults/rcS

RAMRUN=yes - Changes the /var/run directory to a tmpfs


RUNOCK=yes - Changes the /var/lock directory to a tmpfs

and finally

"tune2fs -c 0 /dev/hdaxx" "and tune2fs -i 0 /dev/hdaxx" - Stops mount counts and interval
between file system checks.

The only thing I don't really understand why is:


Quote:
-for the network you must change directory /etc/networking to /var/ (each boot, ifstate file)

Just have 2 more questions. Say I make all these changes, and want to run apt-get upgrade later will
it work? Or will I have to change the / file system to read-write? This leads me into my next question,
can I put everything in one partition(the default install)? Or do I need to have separate partions.

Contact Us - Advertising Info - Rules - LQ Merchandise - Donations - Contributing Member - LQ Sitemap -


LinuxQuestions.org - Linux Forums

You might also like