[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian router (compressed FS needs)



First of all... Hi!

I've subscribed this mailing list for a few months and I've been around at
#emdebian (irc.debian.org) for a while, but I haven't posted yet to this
mailing list so here goes a small introduction about myself.

I'm a portuguese student at Universidade de Aveiro (Portugal) and I'm on
my last year (I hope) studying Electronics and Telecomunications
Engineering. My final project generally tagged Linux Embedded, consists in
putting a linux distro running on a pc-like machine (although other
options can be considered) with no hardrive, but a compact flash card
instead (using an IDE interface). This is intended for industrial
enviroments and to be connected to an automaton monitoring and/or
controlling some industrial process.
I've been a linux user for about 6 years, and a Debian user for about 2 or
3 years, so I wanted to use Debian in my project since the beginning

I've been successfully using andersee's uwoody (for those who are new
here... basically uwoody is woody compiled with uclibc instead of libc)
for a few weeks now.
I made two installations with deboostrap (and apt-get after that to add
some more packages), one of uwoody (uclibc) and another of "normal" woody
(libc), both with the same packages (as far has that was possible), the
first was about 128MB large (disk space), the second about 208MB (this
included XFree86 and many libs)

The uwoody's 128MB compressed with cramfs, squashfs or jffs2 becomes about
60MB.

I needed a few packages in debian that weren't in uwoody (and some of
those were only in testing/unstable).
So I made another installation of a buildroot for uwoody and I
successfully rebuilt about 30 packages from debian sources (some from
stable and some from testing/unstable). Most of them just by typing
dpkg-buildpackage (to be honest I used -d in one or another, but it
successfully built anyway).
This packages include gtk2.0 glib2 and some other libs required to compile
those.

The major problem about flash disks is the number of writes you can do on
it. So running a rw system on a flash disk won't make it last for too
long. I'm currently running an uwoody system on a rw ext2 in a compact
flash card (with IDE interface) but I made a few hacks to minimize the
number of writes to the disk (btw, thanks to andersee for the help and
suggestions and for providing uwoody).
The "hacks" I've done to minimize writes were:
- use devfs for /dev
- use tmpfs for /tmp
- on boot create some /var dirs in /tmp and link to it, such has /var/log
/var/spool /var/tmp and /var/run; of course that if you need to keep the
logs this can't be done just like this, so what I will probably do is to
keep this structure but on shutdown and/or every N minutes/hours write the
logs to the disk

This list is still far from complete, but I've managed to get to a point
that after boot no more writes are made to the disk (although the system
is kind of idle, logged in X with an application running which doesn't
write to disk).
On boot I get around 100-150 writes to the disk, I haven't concerned much
about this because I don't expect the system to be (re)booted very often.

Some might question themselves about "How many writes can I do to a flash
disk?", well it depends on the manufacturer, some have internal wear
levelling mechanism like sandisk (there's a sandisk paper about this but I
haven't the link here now). There is a nice discussion about this in some
other debian mailing list, look at debian weekly news and search for a
topic such as "debian on usb flash" or something similar.


Some of you said that the base system installed by the debian installer
was too big, well... try to install the base system using deboostrap.
I've installed uwoody this way. You can find more details about installing
debian using deboostrap on the debian installation manual.


There are already some distributions that run from usb flash keys, many
are knoppix customizations (you can find a list of these on knoppix site).
At the beginning I tested one called Flonix, It looked nice but I had some
troubles remastering it, mostly cloop problems. And besides that flonix is
no longer free (for comercial purposes at least) so I've put it aside.


I feel like if I had forget to say something, but this is already getting
to big so I'll end here for now :)



Best regards,
Bruno Gravato.






Reply to: