Soekris NET4801 and Debian Linux
This is a Quick guide for getting
Debian Linux up and running on a
Soekris NET4801. the main issue with installing debian
on the soekris, is that you need to get tftpd, DHCP, servers up and running
this is a almost ready made image.
this guide will require a linux machine, and some linux expertise.
This guide will properly work with all other soekris products.
You will need the following things:
1. PC Running linux (Machine used for the guide is running Debian)
2. CF card reader
3. Null modem RS232 cable (crossed)
4. A Soekris NET4801 og equiv
5. A CF card (512MB or bigger is best)
6. The ready made debian system, download it here:
debian_soekris_061211.tgz
Thanks to
nathue.dk for hosting.
NOTE: all commands are run as root
Preparing the CF disk:
Look at this adress for help with USB card readers:
http://www.cs.sfu.ca/~ggbaker/personal/cf-linux
okay, the reader is working, plug the CF card in the reader and then plug the reader in the USB etc.
figure out what /dev the reader is on, in my case this i /dev/sda
first we need to write a new partition table.
first delete all partitions on the CF disk(use d to delete), then create a new partition with
n,
just make it the card's full size.
then choose
w to write the new partition table
Creating the ext3 file system:
hugin:~$ mkfs.ext3 /dev/sda1
|
Copy the system to the CF card:
Okay, now we are ready to get to the writing, first you need to unpack the file you downloadet.
hugin:~$ tar zxfv debian_soekris_061211.tgz
|
Mount the CF card and copy alle the files, to the CF card
hugin:~$ cp -a 061211/* /mnt/soekris/
|
Making the system boot:
We need to write the MBR (Master Boot Record)this is done with lilo
WARNING!!
THIS COULD MAKE YOUR PC NOT WANNE BOOT IF YOU DO SOMETHING WRONG!!
WARNING!!
First edit the /etc/lilo.conf on the CF card change the boot=/dev/hda to whatever device your
CF cards is mounted, mine is /dev/sda.
hugin:~$ lilo -r /mnt/soekris/ -C /etc/lilo.conf
|
i allways issue lilo afterwards to be sure my normal disk is as i should be.
There you go i should now have a working debian :)
put the CF card in the Soekris, and connect the RS232 cable to the soekris
start hyperterminal/minicom or euiq.
Setup the connection for 19200baud 8-N-1.
when the unit comes to the login prompt, login as root default password is soekris.
first thing to do is get some SSH keys.
first we need to mount the system in write mode.
soekris:~# mount -o rw,remount /
|
Next step is making the SSH keys
soekris:~# dpkg-reconfigure ssh
|
Just follow the guide, and it should generate some SSH keys for you.
The default ip for the unit is 192.168.1.21 you can change this in /etc/network/interfaces.
How the system works:
Most ppl want some more software then there is on the system
when using apt-get remember to mount the system writable.
if a program needs some sort of a temponary place to write files etc.
look in /etc/init.d/ro-root.sh this script starts at boot and writes, all the directory's and stuff
to /tmpfs. /tmpfs is defined in /etc/fstab
tmpfs /tmpfs tmpfs defaults,size=20M 0 0
|
When installing new software allways symlink the logs etc. to the device /tmpfs.
the kernel is a stock debian image kernel, and should be replaced, it has support for the
SC1100 watchdog
Reference:
http://www.cs.sfu.ca/~ggbaker/personal/cf-linux: USB Card readers HOWTO
http://roland.entierement.nu/pages/debian-on-soekris-howto.html: ro-root.sh was taken from here
http://www.linuxdevices.com/articles/AT4540125636.html: Embedding Debian GNU/Linux in a 32MB CompactFlash
Thanks goes out to #linux.dk@undernet.org.
(C) linuxfromscratch.dk
Whistler if you mail me please write [soekris] in subject, thanks