Gentoo-embedded

Network Appliances

(GNAP Project)

Presentation at FOSDEM

Saturday, 26th February 2005, 16:00

Thierry Carrez (Koon), GNAP Developer

Agenda

Objectives

GNAP Cores and Overlaying

Demo: Building a customized GNAP LiveCD

Demo: GNAP on Soekris

Maintenance

Building a new core from source

Objectives

Recycling old PCs into Network Appliances

CoyoteLinux

easy to configure (Windows wizard)

non-extensible, difficult to upgrade

LEAF Bering

small and efficient

difficult to build and maintain

difficult to extend

Objectives

Leveraging Catalyst power

Catalyst is used to build GNAP cores

Post-build customizing system (overlay)

Read-only approach: security and out-of-box maintenance

Leveraging Portage power

All Portage software available

Appliance does no compilation work

GNAP Cores and Overlaying

overlay

/etc

GNAP

Core

LiveCD
ISO image

overlay.conf

gnap_overlay

myoverlay

etc

overlay.conf

Example overlay

NBCARDS=2

IP_RELAY=yes

USE_TC=yes

USE_SSH=yes

net

etc/conf.d

modules=( "iproute2" )

ipaddr_eth0=( "10.1.255.254/16" )

iproute_eth0=(

"default via 10.0.255.254" )

ipaddr_eth1=( "10.0.1.1/16" )

etc/cbqinit

DEVICE=eth1,100Mbit,10Mbit

RATE=128Kbit

WEIGHT=13Kbit

RULE=,10.1.0.0/16

cbq10-dl

root

.ssh

authorized_keys

ssh-rsa AAAAB4jb...

Demo: Overlaying on a LiveCD

$ gnap-tools-1.2/gnap_overlay gnap-core-1.2.tar myoverlay/ mygnap.iso

Overlaying files ...

Building mygnap.iso ...

Unknown file type (unallocated) /tmp/gnapcore_XXXXgDCjUz/.. - ignoring and continuing.

Cleanup ...

Done.

$

Demo: Overlaying on a CF card

# gnap-tools-1.2/gnap_overlay -t disk gnap-core-1.2.tar myoverlay/

/dev/sda1 hda1 cache

Warning : you have selected disk install

Make sure you are root or have full access to /dev/sda1

/dev/sda must have an MBR installed

run 'dd if=mbr/mbr.bin of=/dev/sda bs=512 count=1' if needed

/dev/sda1 must contain an active partition

use 'fdisk /dev/sda' if needed

Are your sure you want to continue [N]: y

Expanding core...

Overlaying files ...

Formatting and Mounting...

mkfs.msdos 2.10 (22 Sep 2003)

Copying files...

Syslinuxing...

Cleanup ...

Done.

#

Maintenance

Easy maintenance

Configurations are kept on the host system

Use CVS to keep configurations changes

Easy updates

Read README.upgrading to look for needed
and recommended configuration changes

Overlay your configuration on the newest core

Reboot

Rebuilding GNAP Cores

GNAP

Core

gnap_make

specs

stage2-x86-uclibc-hardened-2004.3.tar.bz2

Extending GNAP

common.conf

Subarch, Profile, CFLAGS, kernel sources...

kernel.config

Kernel configuration

packages.conf and portage_confdir

Add new packages, accept specific keywords...

fsscript and livecd.conf

Finalize GNAP filesystem contents

Gentoo-embedded

Network Appliances

(GNAP Project)

Presentation at FOSDEM

Saturday, 26th February 2005, 16:00

Thierry Carrez (Koon), GNAP Developer

2005-02-14T10:47:45