Just posting this in case it is useful to anyone (and for my future reference). I have access to a number of SPARC servers through my workplace and recently wanted to try setting up FreeBSD on them as Solaris is pretty much dead these days. I have SunFire V210, V240 and V245 that I'm using for basic file servers, DNS, DHCP in my lab. The kit is very old but still reliable and useful for basic tasks. I needed to setup a network boot server to get FreeBSD installed as I didn't have access to a local DVD on the clients.
Boot server host = SunFire V240
Boot clients = SunFire V210, V240, V245
On the boot server the following packages need to be installed and configured:
rarpd
dhcpd
nfs
tftpd
TFTP setup
Create a directory /tftpboot and make sure the tftpd server is started and running (edit /etc/inetd.conf and /etc/rc.conf to enable the service)
- unhash the following line in /etc/inetd.conf
- add the following line to /etc/rc.conf
- enable the inetd service and start
The FreeBSD SPARC64 DVD is SCP'd to the boot server to a directory /tftpboot/iso. Create a /tftpboot/freebsd-installer directory and copy the contents of the FreeBSD 11.1 SPARC DVD to this directory by mounting the iso and using rsync to copy.
To mount an ISO on FreeBSD host:
Copy the DVD contents to /tftpboot/freebsd-installer directory:
Client hosts configuration on boot server
Edit /etc/hosts and add entries for the clients:
In order for SPARC openboot to recognise the boot loader, translate the IP address of the boot client in decimal to hex and use this as a symbolic link target to freebsd-installer/boot/loader.
Example below:
0A010130 = 10.1.1.48
0A010114 = 10.1.1.20
0A01011C = 10.1.1.28
0A010124 = 10.1.1.36
Change to the /tftpboot directory and create the symlinks:
RARPd setup
Edit /etc/ethers and add specific lines mapping the client MAC addresses to IPs
- add the following line to /etc/rc.conf
- enable the rarpd service and start
DHCP server setup
DHCP server should be compiled from ports /usr/ports/net/dhcpd. Configuration is in /usr/local/etc/dhcpd.conf
- add the following line to /etc/rc.conf
- enable the dhcpd service and start
NFS Server setup
Edit /etc/exports and add the line to share the directory containing the contents of the FreeBSD DVD:
- add the following line to /etc/rc.conf
- enable and start the NFS server:
Edit /tftpboot/freebsd-installer/etc/fstab and hash the line related to the DVD and add the mountpoint for the NFS. If you don't do this step the server will start to boot but will be unable to find the DVD on the NFS server (by default fstab points it to the DVD drive):
Network booting the client machine
To network boot the SPARC client, first SSH to its service console (ALOM):
Wait until the server boots from the network. If it starts to boot from the disk rather than the network try the following commands from the SC:
Boot server host = SunFire V240
Boot clients = SunFire V210, V240, V245
On the boot server the following packages need to be installed and configured:
rarpd
dhcpd
nfs
tftpd
TFTP setup
Create a directory /tftpboot and make sure the tftpd server is started and running (edit /etc/inetd.conf and /etc/rc.conf to enable the service)
- unhash the following line in /etc/inetd.conf
tftp dgram udp wait root /usr/libexec/tftpd tftpd -l -s /tftpboot
- add the following line to /etc/rc.conf
inetd_enable="YES"
- enable the inetd service and start
service inetd enabled
service inetd restart
The FreeBSD SPARC64 DVD is SCP'd to the boot server to a directory /tftpboot/iso. Create a /tftpboot/freebsd-installer directory and copy the contents of the FreeBSD 11.1 SPARC DVD to this directory by mounting the iso and using rsync to copy.
To mount an ISO on FreeBSD host:
mdconfig -a -t vnode -f /tftpboot/iso/FreeBSD-11.1-RELEASE-sparc64-dvd1.iso -u 0
mount -t cd9660 /dev/md0 /mnt
cd /mnt
Copy the DVD contents to /tftpboot/freebsd-installer directory:
rsync -var /mnt/ /tftpboot/freebsd-installer/
Client hosts configuration on boot server
Edit /etc/hosts and add entries for the clients:
Code:
10.1.1.46 spa spa.example.lab
::1 localhost localhost.my.domain
127.0.0.1 localhost localhost.my.domain
# FreeBSD clients for network booting
10.1.1.48 zolder
10.1.1.20 monaco
10.1.1.28 monza
10.1.1.36 hockenheim
In order for SPARC openboot to recognise the boot loader, translate the IP address of the boot client in decimal to hex and use this as a symbolic link target to freebsd-installer/boot/loader.
Example below:
0A010130 = 10.1.1.48
0A010114 = 10.1.1.20
0A01011C = 10.1.1.28
0A010124 = 10.1.1.36
Change to the /tftpboot directory and create the symlinks:
cd /tftpboot
ln -s freebsd-installer/boot/loader 0A010130
ln -s freebsd-installer/boot/loader 0A010114
ln -s freebsd-installer/boot/loader 0A01011C
ln -s freebsd-installer/boot/loader 0A010124
RARPd setup
Edit /etc/ethers and add specific lines mapping the client MAC addresses to IPs
Code:
root@spa:/tftpboot# cat /etc/ethers
00:14:4f:74:95:cc spa
00:14:4f:71:04:20 zolder
00:03:ba:e9:d6:05 monaco
00:03:ba:eb:5a:11 monza
00:14:4f:7a:1c:fc hockenheim
- add the following line to /etc/rc.conf
rarpd_enable="YES"
- enable the rarpd service and start
service rarpd enabled
service rarpd restart
DHCP server setup
DHCP server should be compiled from ports /usr/ports/net/dhcpd. Configuration is in /usr/local/etc/dhcpd.conf
Code:
# dhcpd.conf
#
# Sample configuration file for ISC dhcpd
#
authoritative;
# option definitions common to all supported networks...
option domain-name "example.lab";
option domain-name-servers 10.1.1.53;
default-lease-time 600;
max-lease-time 7200;
subnet 10.1.1.0 netmask 255.255.255.0 {
range 10.1.1.200 10.1.1.250;
option routers 10.1.1.1;
option broadcast-address 10.1.1.255;
}
# Booting SPARC FreeBSD
group {
always-reply-rfc1048 on;
server-name "spa";
next-server spa;
filename "freebsd-installer/boot/loader";
option root-path "10.1.1.46:/tftpboot/freebsd-installer/";
host zolder { hardware ethernet 00:14:4f:71:04:20; option host-name "zolder"; fixed-address 10.1.1.48; }
host spa { hardware ethernet 00:14:4f:74:95:cc; option host-name "spa"; fixed-address 10.1.1.46; }
host monaco { hardware ethernet 00:03:ba:e9:d6:05; option host-name "monaco"; fixed-address 10.1.1.20; }
host monza { hardware ethernet 00:03:ba:eb:5a:11; option host-name "monza"; fixed-address 10.1.1.28; }
host hockenheim { hardware ethernet 00:14:4f:7a:1c:fc; option host-name "hockenheim"; fixed-address 10.1.1.36; }
}
- add the following line to /etc/rc.conf
dhcpd_enable="YES"
- enable the dhcpd service and start
service dhcpd enabled
service dhcpd restart
NFS Server setup
Edit /etc/exports and add the line to share the directory containing the contents of the FreeBSD DVD:
/tftpboot/freebsd-installer -maproot=root -network 10.1.1.0 -mask 255.255.255.0
- add the following line to /etc/rc.conf
nfs_server_enable="YES"
nfs_server_flags="-u -t -n 4"
rpcbind_enable="YES"
mountd_flags="-r"
mountd_enable="YES"
- enable and start the NFS server:
service nfsd enabled
service nfsd restart
Edit /tftpboot/freebsd-installer/etc/fstab and hash the line related to the DVD and add the mountpoint for the NFS. If you don't do this step the server will start to boot but will be unable to find the DVD on the NFS server (by default fstab points it to the DVD drive):
Code:
#/dev/iso9660/11_1_RELEASE_SPARC64_DVD / cd9660 ro 0 0
spa:/tftpboot/freebsd-installer /mnt nfs rw 0 0
Network booting the client machine
To network boot the SPARC client, first SSH to its service console (ALOM):
sc> console -f
ok> boot net -v
Wait until the server boots from the network. If it starts to boot from the disk rather than the network try the following commands from the SC:
sc> bootmode bootscript="boot net"
sc> reset
sc> console -f