You are not logged in.

#1 2009-04-18 17:19:59

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

CF and SD card corner, starting guide in wiki!!!!

Hi,

Looking for a good guide to installing Arch to cf card? tried unbuntu guides but they do not seem to pick up card from live cd [partitioner]

The CF card is 8gb currently unformatted and loaded via usb [card reader!]

Thinking mount loop or bootstrap [seems waaay too complicated!!!]

Anyway any advice would be a great help

MrG


Mr Green

Offline

#2 2009-04-18 17:26:14

broch
Banned
From: L.A. California
Registered: 2006-11-13
Posts: 975

Re: CF and SD card corner, starting guide in wiki!!!!

Is this camera cf card?
I have 2,4 and 8GB CF cards and each loads fine when I connect my camera (few Canon cameras). However I heard that Nikon (if this is the case) has some problems (but Nikon does not use CF cards?). Maybe you can connect CF directly from camera (assuming that you are considering setup CF card/camera/Arch linux)

Offline

#3 2009-04-18 19:32:42

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: CF and SD card corner, starting guide in wiki!!!!

Cf card is in a usb multi card reader, I want to install a Arch install on it... its for my server project

not going to format in swap system runs 2gb so should be fine...

maybe I need to remove hard drive that is there load cd and try that first

Wondered if it could be done from loop/chroot

Loads of fun

MrG


Mr Green

Offline

#4 2009-04-18 22:22:49

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: CF and SD card corner, starting guide in wiki!!!!

For the last few years I've had laptops running on CF cards and SD cards.  It is a fantastic idea, especially for older IDE based laptops.  (Try finding a new 2.5" IDE drive for less than $50.  CF adapter + card = $30.)  Here's a quick rundown of installing and running.

Have a cdrom drive?  Make two partitions.  The first about should be 100-200 Mb, the emergency partition.  More on that later.  The second takes up the rest of the drive.  Do not make a swap.

No cd drive?  dd the usb .img file to the card.  Open the drive in a partition editor.  You'll see one 180Mb partition.  Boot this to install Arch.  (Later it can be used for rescue purposes.)  Add a second partition taking up the rest of the space.  Same thing, no swap partition.

Format the primary partition as ext2.

Don't worry about no swap.  You know how a normal computer slows WAY down when it starts hitting the swap?  You'll feel the same effect even without swap.  When memory gets low, shared libraries are automatically unloaded to free up more space.  But your apps still need to use these libs, so they get read from disk (slow!).  You'll feel the slowdown long before hitting an OOM error.

So, installing.  Install everything normally.  There is nothing special to do, until everything is done.  Then you need to edit your fstab.  Add one line to move /tmp into ram, and change your primary mountpoint to "noatime" to reduce wear:

tmpfs            /tmp    tmpfs    nosuid,nodev    0 0
UUID=...         /     ext2     defaults,noatime     0 1

Try not to run any file indexers.  I set up a CF card laptop for a friend, running gnome.  Trackerd literally ate the drive, even after I excluded /.  Uninstalling tracker worked fine, nothing seemed to depend on it.

What about that emergency partition I was taking about?  In short, things will go wrong if you are using cheap flash cards.  You'll accidentally eject the card, while it's on.  You'll shut down and something will get corrupted.  And the card is formatted ext2, not the most advanced FS.  I've even had cards catch on fire the moment they were powered on.  The emergency partition holds a small OS for when things inevitably go belly up, to pull files off or run fsck.  My personal favorites are Rescue Is Possible Linux, Puppy Linux, TinyCore Linux, Parted Magic or the ArchLinux installer.  Look at them all, find one you like.  If installing live-CDs to a drive is too tricky, install one using unetbootin.

And back stuff up!  The flash cards are relatively small compared to hard drives, so this is a snap.  I usually replace/upgrade my cards every year to be safe, but one did die after just three months.

Offline

#5 2009-04-19 09:33:32

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: CF and SD card corner, starting guide in wiki!!!!

Can I use your post to start a wiki page?

I have a 8gb card do not need swap 2gb ram in system so... emergency partition not a problem

maybe a /boot partition?

ext2? why not ext3...or even 4 is it the write issue

MrG


Mr Green

Offline

#6 2009-04-19 09:42:15

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: CF and SD card corner, starting guide in wiki!!!!

Great stuff here!

I am interested myself in CD cards for my T41 but I'm after a bit more space for films and the like.

Anyway, it was mentioned no swap was needed - I always thought that suspend to disk is written to swap!? Not true?

And Mr. Green - a wiki page would a god-sent.


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#7 2009-04-19 10:50:48

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: CF and SD card corner, starting guide in wiki!!!!

http://wiki.archlinux.org/index.php/CF_ … rd_install

Created page will need editing of course... cleaning up etc..

Please any comments or suggestions would be grateful

Thanks

MrG


Mr Green

Offline

#8 2009-04-19 11:12:57

mikesd
Member
From: Australia
Registered: 2008-02-01
Posts: 788
Website

Re: CF and SD card corner, starting guide in wiki!!!!

I have just setup Arch on a Dell Mini 9 with a SSD. I'm in the process of tuning things at the moment for performance and minimising wear on my SSD. Some of the things I have done or am going to at least look at are:

* Mount /tmp and /var/log on tmpfs including a log archiving scheme similar to this.

* Use a non journaling file system for root, ext2, mounted with noatime.

* Change IO scheduler from default of cfq to deadline or noop. (Not so sure about this one. May not be of any benefit. Trial and error.)

* Move firefox cache to tmpfs.

It's difficult to know if wear is a definite issue as I haven't seen any data that shows the number of writes a given page can take for the default SSD in Dell's Mini 9. What is not in doubt is that the write speed sucks compared to the read speed. My main goal will to be to minimise writes to give good performance and battery life.

These techniques would apply to any flash memory, USB flash drives, compact flash, SD cards, etc. Not guaranteeing any of these will be of any use whatsoever but I'm going to have a play with them for starters. Thought they may be of use to you.

Last edited by mikesd (2009-04-19 11:15:34)

Offline

#9 2009-04-19 12:33:29

schnitz
Member
Registered: 2009-04-19
Posts: 10

Re: CF and SD card corner, starting guide in wiki!!!!

I'm actually experimenting with this for the moment. My idea is to simply split the Arch installation between a CF-card on IDE1 and a HDD on IDE2 on quite many partitions, by making own partitions for some of the directories that are rarely written to.
These directories are what I'm trying to mount from the CF card, each one has an own partition (all are EXT2):
/boot
/lib
/usr/lib
/usr/bin
/usr/sbin
/usr/src
/usr/include

The rest goes on the HDD:
/ (EXT2)
/swap (SWAP)

Would this be possible? This kind of installation gives me kernel panic, either "kinit: not finding init" or "Unable to find /sbin/init" depending on how I tweak GRUB and fstab. It says that root gets mounted as readonly as well, but I'm not sure if that refers to what the kernel calls root or the GRUB one.

It would be really sweet with an installation like this that takes advantage of the possibilities of the unix hierarchy!

Last edited by schnitz (2009-04-19 14:36:07)

Offline

#10 2009-04-19 14:17:46

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: CF and SD card corner, starting guide in wiki!!!!

it should be.... so long as fstab is set correctly... I intend to load base install to card for the moment

/var would be heavy on r/w is there a way to monitor this ?
/tmp ?

MrG


Mr Green

Offline

#11 2009-04-19 16:47:24

Bebo
Member
From: Göteborg, Sweden
Registered: 2006-06-07
Posts: 207

Re: CF and SD card corner, starting guide in wiki!!!!

I have my / partition on a 4 gig CF card. To reduce r/w cycles I've placed /tmp, /var/cache, /var/local, /var/lock, /var/log, /var/run, and /var/tmp on tmpfs. In /etc/rc.local I've added some lines to setup the correct file structure in these partitions as needed (for instance apache wants the directory /var/log/httpd). To monitor reads and writes on the CF card, I've had inotifywatch running in a screen with the following command:

inotifywatch -r -e modify -e move -e create -e delete /var/{empty,games,lib,opt,spool} /etc/ /lib/ /usr/lib/

I'm not sure that I've included all operations that do writes to the CF card. I've had to be a little picky with the watched directories as there is a limit on this (defined in /proc/sys/fs/inotify/max_user_watches I believe).

Except for when I do package updates with pacman, I've only managed to catch a very small number of regular writes to the CF card. My goal was originally to being able to mount / read-only (for the challenge, more than anything), but I've decided that I'm ok with the system doing ten-ish writes to the CF card a day.

Offline

#12 2009-04-19 17:59:21

keenerd
Package Maintainer (PM)
Registered: 2007-02-22
Posts: 647
Website

Re: CF and SD card corner, starting guide in wiki!!!!

True, no swap means no hibernate to disk.  You can get around this by making a swap file/partition and never using it.  When you want to hibernate, activate the swap first.  Deactivate it when you come out of hibernate.

Suspend to ram usually works but is not perfect.  One of my laptops (running on an SD card that is mounted through USB), can suspend but goes comatose while waking.  Something with the drive being accessed before it is enumerated, or the enumeration changing on resume.

I rarely have the need to suspend that laptop, though.  It's always being used for something or runs silly servers.

Last edited by keenerd (2009-04-19 20:01:31)

Offline

#13 2009-04-20 14:52:56

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: CF and SD card corner, starting guide in wiki!!!!

just tried an ubuntu install to cf card [ext3] had to run usb cdrom to load os, slow but worked

On booting its not that quick, slower than hard drive wondering if its the ext3 ?

Of course I will be using it everyday like that it needs /var /tmp etc moved to hard drive partitions

surprised thought it would run faster

MrG


Mr Green

Offline

#14 2009-04-21 02:39:02

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: CF and SD card corner, starting guide in wiki!!!!

Perhaps Faunos would be appropo for your CF card project.

My Faunos has 600 pkgs of archlinux and it boots from CF card ...in my system an 4GB Adata 266x CF with a USB interface.

The system runs in ram so the USB speed affects only the boot in normal use.

The CF card I have can run faster if installed with an adapter for either Hdd pr sataii interface.  Since it isn't used except for boots, that option isn't very desireable.

I have had it in service for many months with no problems.

Just a note to remind you of Faunos.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#15 2009-04-21 06:05:50

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: CF and SD card corner, starting guide in wiki!!!!

FaunOS - what a great project! On the downside they are on a positively ancient kernel. And is that kde3 I see on the screenshots? Am downloading it as we speak smile

Last edited by toad (2009-04-21 06:09:15)


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#16 2009-04-21 06:06:22

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: CF and SD card corner, starting guide in wiki!!!!

Is faunos still available? are you running iso image from CF rather than full install?

Running its very slow, updated system once I installed took forever so read/writes are an issue

using it as completely for root partition is not an option /var /tmp /sys etc. need to be on hard drive so kind of defeats the object

Using CF SD SSD in a laptop may improve battery life, laptop weight, may run faster to a certain extent but on a desktop where is the advantage?

Running from ram is an option provided important is not lost running this way, system I have has 2gb installed...

My project system I was intending to do runs server from CF card and hard drives for storage, so thinking now a small 20-40gb hard drive for server would do the trick.


Mr Green

Offline

#17 2009-07-14 18:14:11

peterw
Member
Registered: 2008-12-17
Posts: 14
Website

Re: CF and SD card corner, starting guide in wiki!!!!

I am thinking about getting some hardware to do a minimal webserver/headless torrent machine.  I want it to be lower power, and as cheap as possible.  What is the smallest flash card I can use to fit the base install?  I will have a USB harddrive I can connect for some of the files I am serving, but I don't want to keep that on all the time.

Offline

#18 2009-07-14 18:38:14

kjon
Member
From: Temuco, Chile
Registered: 2008-04-16
Posts: 398

Re: CF and SD card corner, starting guide in wiki!!!!

me! me! I want to contribute.
Okay, look at my fstab. Some people told me it's quite overconfigured, but it works. On my eee I handle pretty well the drive wearing (most unuseful stuff goes to tmpfs) and the big folders (aka /usr) are sqfs compressed. There is a .overlay directory to handle /usr changes. I need to recompress the /usr time to time, but this solution works very well on 4 gb ssd.

my fstab

none                   /dev/pts      devpts    defaults            0      0
none                   /dev/shm      tmpfs     defaults            0      0

/dev/sda1    /        ext4        defaults,noatime,nodiratime            1 0
/usr/usr.sqfs    /usr        squashfs    defaults,loop                    0 0
none        /usr        aufs        dirs=/.overlay/usr=rw:/usr=ro            1 0
/dev/sdb1    /home        ext4        defaults,noatime,nodiratime            0 0

none        /var/cache    tmpfs        size=512M                    0 0
none        /var/log    tmpfs        size=50M                    0 0
none        /var/run    tmpfs        size=1M                        0 0
none        /var/lock    tmpfs        size=1M                        0 0
none        /var/spool    tmpfs        size=256M                    0 0
none        /var/lib/pacman    tmpfs        size=50M                    0 0
none        /media        tmpfs        size=1M                        0 0
none        /tmp        tmpfs        size=2G                        0 0

none        /proc/bus/usb    usbfs        busgid=109,devgid=109,busmode=775,devmode=664    0 0
none        /dev/bus/usb    usbfs        busgid=109,devgid=109,busmode=775,devmode=664    0 0

They say that if you play a Win cd backward you hear satanic messages. That's nothing! 'cause if you play it forwards, it installs windows.

Offline

Board footer

Powered by FluxBB