For notes on netinstalling Debian on a Sun, see
NetInstall
Software
To netboot your Javastation, you'll need the following software on your bootserver:
- dhcpd or bootpd
- tftpd
- rarpd, if you're using a javastation-1 (MrCoffee)
- nfs
Also, you need to prepare:
dhcpd.conf
default-lease-time 21600;
max-lease-time 900;
option broadcast-address 10.255.255.255;
option subnet-mask 255.0.0.0;
option routers 10.0.0.1;
option domain-name-servers 10.0.0.7;
option domain-name "foonet";
allow bootp;
# Only serve known hosts
deny-unknown-clients;
# dhcpd wants to have a definition for all
# interfaces it's configured to run on:
subnet 10.0.0.0 netmask 255.0.0.0 {
range 10.0.1.1 10.0.1.254;
}
# Hardcoded hosts:
group {
# JavaSation-10 (Krups)
host magnesium {
hardware ethernet 08:00:20:95:4f:2b;
fixed-address 10.0.0.12;
option host-name "magnesium";
}
# JavaSation-10 (Krups)
host aluminium {
hardware ethernet 08:00:20:90:35:CB;
fixed-address 10.0.0.13;
option host-name "aluminium";
}
}
Note: if for some reason dhcpd does not run, look in your syslog to check out why
Note: old Sun's (Sparcstations for instance) do NOT use DHCPd for netbooting, see the RARP approach below
bootptab
example syntax for a bootptab:
krypton.foonet:\
:ht=ether:\
:ha=08002B970C9E:\
:sm=255.0.0.0:\
:ip=10.0.0.36:\
:bf=boot.netbsd:\
:bs=auto:\
:rp=/export/vax/root/:
Note: this is a bootptab, used to get my VAXStation booting. I have never used BOOTP for booting javastations.
rarpd
rarpd is needed when netbooting older SUN hardware, like the Javastation-1 (Brick) or a SparcStation5. The procedure is like this:
- the client does a RARP request
- the server answers with: "hello, you are IP Adress"
- the client does a TFTP boot request to the RARP server, asking for a kernel named: IPINHEX.ARCH, eg: 0A00000E.SUN4M or 0A000008.SUN4C
- if everything goes like it should go, the Sun eats the kernel and boots it.
rarpd requires a file named
/etc/ethers to provide RARP service:
08:00:20:87:26:d5 magnesium
08:00:20:8e:13:d9 nitrogen
08:00:20:c0:ff:ee oxygen
Note: 'oxygen' is a Sun SLC, with a dead NVRAM battery, so I have to manually set it's hardware adress to make it netboot; 08:00:20:C0:FF:EE is a legal MAC adress :-), see the SUN NVRAM/hostid FAQ (http://www.squirrel.com/sun-nvram-hostid.faq.html) for this one.
tftpd
TFTP is a abbreviation for 'Trivial FTP'. It's a simple protocol:
c: "hey, give me //this filename//"
s: "okay, here you are! //barf binary data//"
For netbooting Sun's, the kernel needs to be converted to
a.out format.
The kernels typically go in
/tftpboot/:
nitrogen:~# ls -l /tftpboot/
lrwxrwxrwx 1 root root 28 May 5 19:13 0A00000C -> proll.krups.ID18
lrwxrwxrwx 1 root root 33 May 5 19:07 0A00000C.PROL -> krups-kernel-nfsroot-2.4.20
lrwxrwxrwx 1 root root 20 May 14 05:42 0A00000D -> proll.krups.ID18-withextras
lrwxrwxrwx 1 root root 44 May 17 14:19 0A00000D.PROL -> krups-kernel-nfsroot-2.4.20-withsound
-rw-r--r-- 1 root root 1774560 May 3 06:54 krups-kernel-nfsroot-2.4.20
-rw-r--r-- 1 root root 1979456 May 6 07:16 krups-kernel-nfsroot-2.4.20-withsound
-rw-r--r-- 1 root root 94024 May 14 05:57 proll.krups.ID18
-rw-r--r-- 1 root root 94024 May 5 19:13 proll.krups.ID18-withsound
lrwxrwxrwx 1 root root 17 Apr 13 18:24 magnesium -> /export/magnesium
lrwxrwxrwx 1 root root 17 Nov 1 2002 aluminium -> /export/aluminium
nfs
To make a NFS server, the kernel of the bootserver has to have nfs-server support, preferably NFS version 3 too, or you'll have to use a user-space NFS daemon. Also, the appropriate tools have to be installed (portmapper, mountd, statd, lockd, nfsd).
NFS exports are configured through /etc/exports:
/export/magnesium 10.0.0.12(rw,no_root_squash,sync)
/export/aluminium 10.0.0.13(rw,no_root_squash,sync)
# meaning of the options:
# rw = allow read/write mount (default=ro)
# no_root_squash = normally UID 0 is mapped to 'nobody', but in this case, let remote root be local root on the mounted fs.
# sync = some option required, dont remember why, but nfs complains when I leave it away
boot process
Ok, according to the dhcpd.conf, a Javastation with ethernet address
08:00:20:95:4f:2b gets address
10.0.0.12, with hostname
magnesium. It requests the file
0A00000C (dhcpd told so), which is a symlink to a PROLL image (
proll.krups.ID18). After eating the proll image, the Javastation wants more, so PROLL requests the same filename again, postfixed with '
.PROL'.
In this case is
0A00000C.PROL a link to
krups-kernel-nfsroot-2.4.20, a
a.out Kernel for a Javastation-10 (Krups).
The
Kernel does a DHCP request itself (it's a compiled-in option) to discover who he is, and after that, it does a NFS mount request for mounting
/tftpboot/hostname/ (or
/tftpboot/IP adress/, if no hostname was given). In this case,
/tftpboot/magnesium is a symlink to
/export/magnesium/, which contains a Javastation-ready filesystem.