auf.kante
Gunnar macht sich selbststaendig und fliegt auf
die Schnauze
wird erfolgreich. Wer mag darf zuschauen.
Gunnar is starting his business. He will certainly
fail succeed. You may watch.
auf.kante
Website sections
Home
Diskless booting of an EPIA board
Last changed: 2006-09-18 [16:26]
Content:

Booting an EPIA machine over LAN
 
Back to Personal Wiki
Table of contents
Introduction
Preparation

Introduction

The EPIA machines are rather tiny computers with low power consumption and I find them ideal for non-desktop related tasks like routing, filtering, peer-to-peer networking and small web services.

They do not necessarily have a CD drive but it is not too problematic to boot them over LAN.

This collects my personal notes on booting the machine with my diskless stage.

Preparation

1) Create the directory for the stage:

mkdir -p /diskless/my_machine/boot

2) Setup /etc/dhcp/dhcpd.conf

# dhcpd.conf
#
# Sample configuration file for ISC dhcpd
#

option domain-name "athome.de";

default-lease-time 600;
max-lease-time 7200;

authoritative;

# option definitions common to all supported networks...
option option-150 code 150 = text ;

subnet 192.168.178.0 netmask 255.255.255.0 {
}

host temple {
hardware ethernet 00:40:63:db:2a:06;
fixed-address 192.168.178.29;
option option-150 "/my_machine/boot/grub.lst";
filename "/my_machine/boot/pxegrub";
}

ddns-update-style ad-hoc;

3) Enter path to /diskless dir in /etc/conf.d/in.tftpd

# Config file for /etc/init.d/in.tftpd
# Remove the -l if you use [x]inetd

INTFTPD_PATH="/diskless"
INTFTPD_USER="nobody"
INTFTPD_OPTS="-u ${INTFTPD_USER} -l -vvvvvv -p -c -s ${INTFTPD_PATH}"

4) Setup grub.lst in /diskless/my_machine/boot/grub.lst to correct nfs path

(path to /diskless)

default 0
timeout 30

title=Diskless Gentoo
root (nd)
kernel /my_machine/boot/kernel ip=dhcp real_root=/dev/ram0 root=/dev/nfs nfsroot=192.168.178.66:/diskless/my_machine rw

5) Copy the kernel and pxegrub to /diskless/my_machine/boot:

cp pxegrub kernel /diskless/my_machine/boot

(See Gentoo Wiki - HOWTO Gentoo Diskless Install)

6) Set path to /diskless in /etc/exports

# /etc/exports: NFS file systems being exported.  See exports(5).
/diskless/my_machine my_machine(rw,sync,no_root_squash)

7) Backup /etc/hosts

cp /etc/hosts /etc/hosts.backup

8) Enter ip of server and client in /etc/hosts

# /etc/hosts:  This file describes a number of hostname-to-address
#              mappings for the TCP/IP subsystem.  It is mostly
#              used at boot time, when no name servers are running.
#              On small systems, this file can be used instead of a
#              "named" name server.  Just add the names, addresses
#              and any aliases to this file...
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/hosts,v 1.8 2003/08/04 20:12:25 azarah Exp $
#

192.168.178.66	servermachine.athome.de
192.168.178.29	my_machine.athome.de
192.168.178.29  my_machine

127.0.0.1	servermachine.athome.de
127.0.0.1	servermachine
127.0.0.1	localhost


# IPV6 versions of localhost and co
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

9) Extract the stage3-*.tar.bz2 archive with

tar -x -v -j -p -f stage3-.tar.bz2 -C /diskless/my_machine

For EPIA this needs to be an i586 stage!

10) Copy /etc/resolv.conf:

cp /etc/resolv.conf /diskless/my_machine/etc/

11) Set necessary filesystems in /diskless/my_machine/etc/fstab

proc			/proc		proc		defaults		0 0
tmpfs			/dev/shm	tmpfs		defaults		0 0

12) Touch /diskless/my_machine/fastboot

13) Set touch /fastboot in /diskless/my_machine/etc/conf.d/local.start

14) Set password in stage

chroot /diskless/my_machine
passwd

15) Start dhcp, in.tftpd, nfs

/etc/init.d/dhcp start
/etc/init.d/in.tftpd start
/etc/init.d/nfs start

16) Boot the EPIA machine

Back to Personal Wiki
Creative Commons-Lizenzvertrag
The content of this site is licensed under a Creative Commons 2.5 License [attribution, share-alike]