[Soekris] Just an mini-HOWTO adding onto Mark's work *Trevor Warren* trevor.w at media.mit.edu /Wed Feb 26 06:11:32 PST 2003/ * Previous message: [Soekris] Re: Soekris <001948.html> * Next message: [Soekris] Just an mini-HOWTO adding onto Mark's work <001951.html> * *Messages sorted by:* [ date ] [ thread ] [ subject ] [ author ] ------------------------------------------------------------------------ Hello All...;) This HOWTO is a compilation with a lot of addition of clarity based on Mike's initial work. This i hope will be of help to all and is for the community to make use of. Hoping Mike will put it up with a link for others to see. Have a nice day all. Trevor -------------- next part -------------- >>> Gnu-linux on the Soekris net4521 while working on Redhat8.0 <<< Intro : This document is aimed towards being a complete guide to installing gnu-linux on the Soekrix embedded boxes. I have to immensely thank Mike Machado (http://www.innercite.com/~mike/soekris/) for all of the basic documentation using which i have been able to get the Soekris Box running for our lab. This document is just an addon to Mike's initial HOWTO and uses Mike's Documentation all over the place. We start by booting the system off the network and mounting its root filesystem over NFS. From there you can format the CompactFlash, load a root filesystem on it and run lilo so that it will boot directly from the CF disk. Incase you have some extra $$$ and can afford a CF adapter which should cost about 20USD......an easier solution to having gnu-linux running on the soekris box using the CF adapter has been included. All that you need to have your soekris net45xx boxes up and running is listed out in the section below. Hardware : Soekris net 4521 ( http://www.soekris.com/net4521.htm ) CF ( http://www.transcend.com ) CF Adapter ( http://www.transcend.com - If you want to avoid the NFS config ) Serial Cable Software : Redhat 8.0 with gcc and other Development tools. DHCP Daemon (dhcp-3.0pl1-9 or greater) NFS Daemon (nfs-utils-1.0.1-2 or greater) Portmap Daemon (portmap-4.0-46 or greater) tftp-hpa Daemon (tftp-hpa-0.33 from http://www.kernel.org/pub/software/network/tftp/) xinetd Daemon ( Which ships with RedHat ) Debain root-fs ( http://www.innercite.com/~mike/soekris/debian_rootfs.tar.gz ) Pxelinux.0 ( http://www.innercite.com/~mike/soekris/pxelinux.0 ) The gnu-Linux kernel ( http://www.innercite.com/~mike/soekris/vmlinuz ) Setup : Lets start with setting up DHCP on your box. Grab the dhcpd.conf given here and tweak it to reflect your settings if needed. ############################## # Start of dhcpd.conf ############################## # Sample configuration file for ISC dhcpd for Debian # # $Id: dhcpd.conf,v 1.2 2002/03/17 07:27:18 eparis Exp $ # # The ddns-updates-style parameter controls whether or not the server will # attempt to do a DNS update when a lease is confirmed. We default to the # behavior of the version 2 packages. If this statement is not present # dhcpd will refuse to start. ddns-update-style none; # option definitions common to all supported networks... #option domain-name "domain.com"; #option domain-name-servers ns1.domain.com, ns2.domain.com; default-lease-time 600; max-lease-time 7200; subnet 192.168.0.0 netmask 255.255.255.0 { } allow booting; allow bootp; host soekris { hardware ethernet 00:00:24:C0:AA:38; fixed-address 192.168.0.2; option subnet-mask 255.255.255.0; option broadcast-address 192.168.0.255; option routers 192.168.0.1; filename "pxelinux.0"; } ############################### # End of dhcpd.conf ############################### Else remeber that i have used an ip of 192.168.0.2/24 for the eth0 on the Soekris while i have 192.168.0.1/24 on my LAN card. Backup your existing /etc/dhcpd.conf configuration and have this one put in place. Restart your dhcp service........... ( bash# service dhcp restart ) Lets now install tftp. The default tftp as shipped with RedHat doesn't work with PXE-BOOT, hence you will have to grab the tftp whose link is as provided above. ############################## # Start of /etc/xinetd.d/tftp ############################## # default: off # description: The tftp server serves files using the trivial file transfer \ # protocol. The tftp protocol is often used to boot diskless \ # workstations, download configuration files to network-aware printers, # \ # and to start the installation process for some operating systems. service tftp { socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /tftpboot/ disable = no } ############################## # End of /etc/xinetd.d/tftp ############################## Untar the file and perform a ./configure, make, and make install such as to have the tftp-hpa server install. Then place the provided tftp config file in your /etc/xinetd.d/ directory. Create a /tftpboot directory. Mine looks like this. Use the pxelinux.0 and vmlinuz files whose links have been provided earlier. Inside /tftpboot create a directory called pxelinux.cfg as show consisting of a file called default containing the config as shown below. [trevor at linuxfreak howto]$ ls -al tftpboot/ total 894 drwxr-xr-x 3 trevor trevor 136 Feb 26 17:26 . drwxrwxr-x 3 trevor trevor 208 Feb 26 19:20 .. -rwxrwxr-x 1 trevor trevor 9956 Feb 26 17:26 pxelinux.0 drwxr-xr-x 2 trevor trevor 72 Feb 26 18:49 pxelinux.cfg -rw-r--r-- 1 trevor trevor 897538 Feb 26 17:26 vmlinuz This file is purely needed for the PXE-BOOT process. While copying, please don't include the demarkation in hashes "###". ################################## # /tftpboot/pxelinux.cfg/default ################################## serial 0 19200 default vmlinuz console=ttyS0,19200n81 root=/dev/nfsd nfsaddrs=192.168.0.2:192.168.0.1:192.168.0.1:255.255.255.0:soekris:eth0 nfsroot=192.168.0.1:/nfsroot/debian panic=10 ip dhcp prompt 1 timeout 100 ipappend 1 ################################## # /tftpboot/pxelinux.cfg/default ################################## Restart your xinetd daemon..... (bash# service xinetd restart) Untar the debain rootfs to /nfsroot/debian and tweak the exports file given here to reflect your settings if you have a different ip addressing scheme. ################################# # My /etc/exports config ################################# /nfsroot/debian 192.168.0.2(rw,no_root_squash) ################################# # End of /etc/exports config ################################# The ip address in the exports file is the same one being given to the soekris box via DHCP. Have the exports file put in place but Backup your existing /etc/exports before continuing. Frankly, NFS never really worked for me, thus i had to resort to the method as i suggest below. If it works for you....well and good. Start your Portmap daemon and then the NFS daemon. ( bash# service portmap restart bash# service nfs restart ) Now connect your soekris via a cross cable to your RedHat machine. Power up the Soekris box and monitor the same via the Serial Console. If all goes well you should be going ahead full steam. Booting over the Network : When the 45xx starts to boot, press Ctl-P to stop the boot process and get to the BIOS command prompt. Type boot f0 to tell it to boot from the network. This is how you can get your 45xx's MAC address that needs to be placed in the dhcpd.conf file referenced above. If all goes well, you will see it get an IP from the DHCP server and start booting. Behind the scenes it grabs the pxelinux.0 file from the tftp server which instructs it to grab the pxelinux.cfg/default file where it learns the kernel image filename and boot parameters. You will see some weird crap (at least I did) while it downloads pxelinux the kernel. ------------------------------------------------------------------------ * Previous message: [Soekris] Re: Soekris <001948.html> * Next message: [Soekris] Just an mini-HOWTO adding onto Mark's work <001951.html> * *Messages sorted by:* [ date ] [ thread ] [ subject ] [ author ] ------------------------------------------------------------------------ More information about the Soekris-tech mailing list .