After using LEAF on various PCs for years, I decided to go for the WRAP
http://www.pcengines.ch/pic/case2.jpg

I present my log of how I setup a LEAF WRAP box for possible use by others

I purchased the WRAP board and case direct from pcengines in Switzerland. I purchased a 12 v. power supply from soekris.com for about $18 with shipping. I wasn’t ready for the pxe boot stuff so I decided to setup the Compact Flash on a PC using a PC Engines CF to IDE adaptor. I installed a single a Netgear 311 pci adaptor so I could verify the network modules.

Installed the CF on the IDE of the development PC and booted a Free Dos diskette to which I had extracted a recent version of syslinux.com

I used fdisk to create a primary bootable DOS partition on a 16 mb CF

a:>format c:

a:>syslinux -s c:

On a separate WIN machine, I created a uClibc 2.2.2. floppy using the exe version

I also burned a CD with the iso for uClibc 2.2.2.

From the Win box, deleted initrd.lrp on the uClibc floppy and copied the initrd_ide_cd.lrp from the CD to the floppy and renamed it to initrd.lrp

copied wd1100.o from the cd \lib\ modules\2.4.26\drivers\char\ to the floppy

booted the uClibc floppy on the PC that was used to create the CF

log in as root

#mkdir /mnt1

#mount - t msdos /dev/hda1 /mnt

#mount -t msdos /dev/fd0u1680 /mnt1

#cd /mnt1

#cp linux /mnt/linux
#cp syslinux.dpy /mnt/syslinux.dpy
#cp root.lrp /mnt/root.lrp

copied the following lrp files to the CF (your needs may vary)

config etc local modules iptables dnsmasq shorwall ulogd dropbear weblet

from the floppy /mnt1 to the CF /mnt

#cp syslinux.cfg /mnt/syslinux.cfg
#cp leaf.cfg /mnt/leaf.cfg

#cd /mnt
#edit syslinux.cfg
change LEAFCFG to /dev/hda1:msdos
to look like this:

display syslinux.dpy
timeout 0
default linux initrd=initrd.lrp init=/linuxrc rw root=/dev/ram0 LEAFCFG=/dev/hda1:msdos


#edit leaf.cfg
LRP="root config etc local modules iptables dnsmasq keyboard shorwall ulogd dropbear weblet"
PKGPATH=/dev/hda1:msdos
syst_size=8M
log_size=2M


#cd /
#umount /mnt1
#umount /mnt

remove the floppy and restart on the CF
#reboot

log in as root

edit modules and remove the comment from the crc32 and natsemi lines

put a comment “#”on the softdog line
^q to save

#mount -t msdos /dev/fd0u1680 /mnt

#cp /mnt/wd1100.o /lib/modules/wd1100.o

#umount /mnt

#lrcfg and backup modules - the backup destination should already be hda1

edit initrd and put a comment # on the lines with
cdrom
ide-cd
isofs

exit lrcfg

The following removes unnecessary modules (No way to put a CD on the WRAP)
#cd /boot/lib/modules

#ls
#rm cdrom.o
#rm ide-cd.o
#rm isofs.o

#lrcfg and backup initrd to the CF

I copied by old dropbear keys using a floppy from my present LEAF box. They are /etc/dropbear/dropbear_rsa_host_key and /etc/dropbear/dropbear_dss_host_key.

Backup dropbear.

#passwd and enter a password for root and then backup etc

Configure and backup any other packages and back them up to the CF - I left the shorewall setup until after I booted the WRAP box.

The last thing I did was follow instructions here
http://leaf.sourceforge.net/doc/guide/buconsole.html

to setup the serial console getty and backup etc again

edit syslinux.cfg to set up the serial console for 19200 baud as per above.

shutdown and remove the CF and plug it into the WRAP box.

If you want the console to go to a WIN box, do not use hyperterminal. Although I could get it to emulate a vt100 terminal - some things never seemed to work, like editing files. I ended up using Terra Term Pro setup for serial 19200 8 n 1 and “none” for flow control.

When the WRAP boots up you will see a whole lot of pc_keyboard: errors but they will go away and it will boot (no keyboard controller on WRAP).

Login as root

#insmod wd1100

#echo 0 > /proc/sys/dev/wd/graceful

#echo 20 > /proc/sys/dev/wd/timeout

these values will persist on reboot

#lrcfg and edit modules to remove the # comment from wd1100

backup modules.
Configure and backup your network and shorewall

#svi networking restart

#shorewall restart
check for errors or shorewall stopped if you misspell something

#ip ad sh should show three network adaptors eth0 - eth2

continue backing up package changes until everything is working

#reboot does not work on the WRAP box. You may have to unplug the power supply to get the box to do a complete reboot. Leave the power plug out for a few seconds to make sure you get a reset.
Once you have the network up - you should be able to finish configurations using putty and dropbear.


If you want to use WINSCP in to move files or even edit or restore config files that you keep on a WIN box and move back to the WRAP - use this to configure winscp

http://sourceforge.net/mailarchive/message.php?msg_id=9600190

* * * *
Lastly - I wrote a short script: rm-ide in /etc

It rmmod the ide modules and rm them from /boot/lib/modules or /lib/modules

I maintain a copy of the modules on a WIN box and use WINSCP to move them over to /lib/modules when needed

The second script insmods the modules in for access to the CF

Since both these manual scripts are in the /etc directory - they are backup with etc.

Since the WRAP box does not have a battery clock, you need to add some way to set the system clock. I use an internal timeserver - so the firewall only sets its time from an internal machine.




------------------------------------------------------- This SF.Net email is sponsored by: Sybase ASE Linux Express Edition - download now for FREE LinuxWorld Reader's Choice Award Winner for best database on Linux. http://ads.osdn.com/?ad_idU88&alloc_id065&op=click ------------------------------------------------------------------------ leaf-user mailing list: [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-user SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html

Reply via email to