Cut down Linux (Debian) - Embedded

This is a discussion on Cut down Linux (Debian) - Embedded ; Hi All, I'm working on a firewall/NAT router project using Debian Sarge 3.1. Currently I have a hard disk based system, but I'd like it to run with a 128Mbyte CF card in a mini-ITX box. The firewall is working, ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Cut down Linux (Debian)

  1. Cut down Linux (Debian)

    Hi All,

    I'm working on a firewall/NAT router project using Debian Sarge 3.1.
    Currently I have a hard disk based system, but I'd like it to run with a
    128Mbyte CF card in a mini-ITX box. The firewall is working, but the
    standard installation system is a little on the large side.

    Someone suggested I could replace the init process with a user script and
    only load those things I need, but init enables quite a few facilities, like
    gracefully shutting down/ booting up, gettys etc., so I'd like to keep it
    but maybe reduce the number of scripts run in /etc/rcS.d, and /etc/rc2.d
    directories, and then remove all the packages and files I don't want.

    Is this a sensible approach and is there an easy way to do this cutting
    down? Would another init replacement, like runit, be better? I don't really
    know enough yet to build it up from scratch and I really need the firewall
    installed soon!

    Thanks, any hints/suggestions would be gratefully received.

    Mark.




  2. Re: Cut down Linux (Debian)

    markp wrote:
    > Hi All,
    > Is this a sensible approach and is there an easy way to do this cutting
    > down? Would another init replacement, like runit, be better? I don't really
    > know enough yet to build it up from scratch and I really need the firewall
    > installed soon!

    I used another way to strip down a normal debian installation:
    - Create a normal debian install in a chroot-environment (install only
    necessary packages).
    - Use a shell script which copies only the really necessary things on the
    cf-disk (use rsync for this)
    * no doc info and so on
    * no /var/lib/dpkg
    * keep out everything that is big and not used (use "du" and "sort" to
    get info of the biggest things)

    So you have a normal debian install in a chroot (which is about 300MB) this
    can be kept updated when necessary. And you have a script to strip this
    down to the CF-disk. You dont need any new init-method.
    Oh and my CF-image is about 80MB in the end.

    Gruss
    Ulli

    --
    \ E-Mail: calvin@akk.org \
    / ++++++++++++++++++++++++++++++++++++++++++++++++++ ++++++++++++++++++++++ /
    \ Sometimes I think the surest sign that intelligent life exists elsewhere \
    / in the universe is that none of it has tried to contact us. (calvin) /

  3. Re: Cut down Linux (Debian)


    "Ulli Hochholdinger" wrote in message
    news:e8nlm1$3av$1@news2.rz.uni-karlsruhe.de...
    > markp wrote:
    >> Hi All,
    >> Is this a sensible approach and is there an easy way to do this cutting
    >> down? Would another init replacement, like runit, be better? I don't
    >> really
    >> know enough yet to build it up from scratch and I really need the
    >> firewall
    >> installed soon!

    > I used another way to strip down a normal debian installation:
    > - Create a normal debian install in a chroot-environment (install only
    > necessary packages).
    > - Use a shell script which copies only the really necessary things on the
    > cf-disk (use rsync for this)
    > * no doc info and so on
    > * no /var/lib/dpkg
    > * keep out everything that is big and not used (use "du" and "sort" to
    > get info of the biggest things)
    >
    > So you have a normal debian install in a chroot (which is about 300MB)
    > this
    > can be kept updated when necessary. And you have a script to strip this
    > down to the CF-disk. You dont need any new init-method.
    > Oh and my CF-image is about 80MB in the end.
    >
    > Gruss


    Thanks, I'll give it a go!

    Mark.



  4. Re: Cut down Linux (Debian)

    > I'm working on a firewall/NAT router project using Debian Sarge 3.1.....


    Why not starting with the fli4l project instead ? They do an extremely
    small distribution for x86 especially tailored for routers.

    -Michael

  5. Re: Cut down Linux (Debian)

    markp wrote:
    > Hi All,
    >
    > I'm working on a firewall/NAT router project using Debian Sarge 3.1.
    > Currently I have a hard disk based system, but I'd like it to run with a
    > 128Mbyte CF card in a mini-ITX box. The firewall is working, but the
    > standard installation system is a little on the large side.
    >
    > Someone suggested I could replace the init process with a user script and
    > only load those things I need, but init enables quite a few facilities, like
    > gracefully shutting down/ booting up, gettys etc., so I'd like to keep it
    > but maybe reduce the number of scripts run in /etc/rcS.d, and /etc/rc2.d
    > directories, and then remove all the packages and files I don't want.
    >
    > Is this a sensible approach and is there an easy way to do this cutting
    > down? Would another init replacement, like runit, be better? I don't really
    > know enough yet to build it up from scratch and I really need the firewall
    > installed soon!
    >
    > Thanks, any hints/suggestions would be gratefully received.
    >
    > Mark.
    >
    >
    >

    Hi Mark,
    You could try replacing full fledged userland tools with
    http://packages.debian.org/unstable/utils/busybox

    Cheers,
    Ram

  6. Re: Cut down Linux (Debian)

    In article <1206572233.401386@sj-nntpcache-3.cisco.com>,
    Sriram Chadalavada wrote:
    >markp wrote:
    >> Hi All,
    >>
    >> I'm working on a firewall/NAT router project using Debian Sarge 3.1.
    >> Currently I have a hard disk based system, but I'd like it to run with a
    >> 128Mbyte CF card in a mini-ITX box. The firewall is working, but the
    >> standard installation system is a little on the large side.
    >>
    >> Someone suggested I could replace the init process with a user script and
    >> only load those things I need, but init enables quite a few facilities, like
    >> gracefully shutting down/ booting up, gettys etc., so I'd like to keep it
    >> but maybe reduce the number of scripts run in /etc/rcS.d, and /etc/rc2.d
    >> directories, and then remove all the packages and files I don't want.
    >>
    >> Is this a sensible approach and is there an easy way to do this cutting
    >> down? Would another init replacement, like runit, be better? I don't really
    >> know enough yet to build it up from scratch and I really need the firewall
    >> installed soon!
    >>
    >> Thanks, any hints/suggestions would be gratefully received.
    >>
    >> Mark.
    >>
    >>
    >>


    Have you looked at openwrt.org (free Linksys router replacement) runs in
    16MB ram and 4MB flash for storage. Uses squashfs and jffs2 for filesystem
    compression, and makes use of busybox and uClibc. Uses ipkg package system,
    and will handle debian packages, though ipackage packages are traditionally
    ".ipk".

    Also Familiar which provides a full Linux GUI enviroment on a PDA.

    The Linux router project is another popular embedded Linux opensource project
    (leaf.sourceforge.net).

    Alpine linux is another embedded Linux (www.alpinelinux.org).

    --mikeb


    ~v


+ Reply to Thread