My little SunFire v120 has been asking me to run the latest Solaris 10, and do some testing :), so I set up Sol10 on my Linux jumpstart server, which was happily running my current Sol9 jumpstart. Needless to say, I ran into a multitude of problems, and found many other folks that have had similar issues… The end result of hacking and troubleshooting? The Linux implementation of NFS is simply broken, and needs to be fixed at the kernel level if Linux is to be used for a Solaris 10 jumpstart.
The Solaris 10 NFSv4 client cannot properly mount it’s root filesystem on the Linux NFS server, and the jumpstart fails. Connections to the same Linux NFS server from Sol10 are successful if one uses mount options of either ‘-o vers=3’ or ‘-o proto=udp’ – unfortunately, passing these options for jumpstart in /etc/bootparams with ‘rootopts=:’ seem to be ignored by the Solaris 10 installer.
Several folks reported that they have been successful with implementing jumpstart with the current versions of NetBSD and FreeBSD, so I made backups of my Sol9 flash archives and data, and installed FreeBSD 5.4 on the Compaq 5000R that I was using for jumpstart, as well as serve NFS for my LAN. Following a basic guideline I found, I ran into couple of additional issues, so here is my how-to on Solaris 10 Jumpstart from FreeBSD:
I did a fresh install of FreeBSD 5.4, updated the full source and ports tree via cvsup, and went through a buildworld/buildkernel/installkernel/installworld, as per /usr/src/UPDATING, so that my new install was completely patched and I had a stripped down, SMP-aware kernel for my beloved old quad-processor 7U.
As Jason Heiss’ guideline indicates, here are the bits of software we need to configure:
* ICMP address mask reply
All of the above software is installed by default in my “Developer” installation of 5.4-RELEASE, so I only added a few packages from the ports collection for keeping current and for my comfort – cvsup-without-gui, lsof, rsync, and bash.
First thing was to grab the DVD iso, mount it, and copy all the files to the filesystem. I don’t have a CD/DVDROM in the Sun, only a CDROM in the 5000R, and dealing with one DVD image is better than several CDs… After all, this is why I am setting up jumpstart. Go to sun.com and follow the download instructions – I will not cover them here.
root@daemon# mdconfig -a -t vnode -f /home/michael/sol10/sol-10-GA-sparc-dvd-iso.iso -u 0
root@daemon# mount -t cd9660 /dev/md0 /mnt/
root@daemon# mkdir -p /usr/exports/sol10/
root@daemon# rsync -av /mnt/ /usr/exports/sol10/
root@daemon# umount /mnt/
root@daemon# mdconfig -d -u 0
Rarpd answers arp broadcasts, based on the MAC address, hostname, and IP mapping in /etc/ethers and /etc/hosts, and hands off network booting to TFTP. Here is the contents of my /etc/ethers file – the mac is gathered from the serial console on the Sun box and given a hostname:
# added for jumpstart
And here is my /etc/hosts (yeah, I like the hostname first – keeps netstat output clean):
127.0.0.1 localhost localhost.pbandjelly.org
192.168.1.100 daemon daemon.pbandjelly.org
# added for jumpstart
192.168.1.105 sol sol.pbandjelly.org
Rarpd sends a reply to the client with “here is your hostname and your IP address”, and the client attempts to access a network bootstrap kernel, via trivial file transfer protocol. This request made to the tftp server is for a file with the name matching the hex address derived from the IP address, which in my case is C0A80169. I calculated the hex address, copied the NFS inetboot file for my architecture to /tftpboot, and symlinked the hex address that will be requested:
root@daemon# perl -e 'printf "%02x"x4 ."\n",192,168,1,105;'|tr a-z A-Z
root@daemon# cp -p /usr/exports/sol10/Solaris_10/Tools/Boot/usr/platform/sun4u/lib/fs/nfs/inetboot /tftpboot/inetboot_sun4u_sol10
root@daemon# cd /tftpboot/
root@daemon# ln -s inetboot_sun4u_sol10 C0A80169
root@daemon# ls -l
lrwxr-xr-x 1 root wheel 20 Jul 25 12:43 C0A80169 -> inetboot_sun4u_sol10
-rw-r--r-- 1 root sys 214880 Jan 22 2005 inetboot_sun4u_sol10
Bootparams is called by the inetboot bootstrap kernel and requests “ok, what do I do now?” So, we tell the client, here is your root filesystem and where to install from. The magnificently verbose Sun docs cover jumpstart from head to toe, so feel free to add on as you see fit – this is a minimal /etc/bootparams configuration to initiate an interactive network installation (all one line):
sol root=192.168.1.100:/usr/exports/sol10/Solaris_10/Tools/Boot install=192.168.1.100:/usr/exports/sol10 boottype=:in rootopts=:rsize=4096
* ICMP address mask
Jason Heiss said to set this up, and to be honest, I have not researched if it is needed, but I believe this corrects the need to ping the jumpstart client, just as it is trying to set up networking, as I did from the Linux jumpstart server:
root@daemon# echo "net.inet.icmp.maskrepl=1" >> /etc/sysctl.conf
This is where I ran into a little trouble – attempts to use -alldirs caused errors, so I specified each directory explicitly, and all worked out fine – my /etc/exports (all one line):
/usr/exports/sol10 /usr/exports/sol10/Solaris_10/Tools/Boot -maproot=0 -network 192.168.1.0 -mask 255.255.255.0
* /etc/inetd.conf and /etc/rc.conf
OK – let’s get all this stuff enabled! With the editor of your choice, uncomment the tftp line in /etc/inetd.conf:
tftp dgram udp wait root /usr/libexec/tftpd tftpd -l -s /tftpboot
I then added the following to /etc/rc.conf:
# added for jumpstart
bootparamd_flags="-s -r 0.0.0.0"
The bootparamd_flags addition of ‘-r 0.0.0.0’ was necessary due to the gateway failing to be configured properly on the client – got a crazy kernel panic and core dump from the installer. Once I searched for several of those errors, I put it together and found that the gateway is set as 127.0.0.1 by Solaris, for some reason, and networking chokes on itself – a setting of the actual gateway router works, but 0.0.0.0 was suggested in a mailing list post I found, and the booting client basically asks the bootparam server, “what is your gateway, and I will use that one” – worked for me!
Reboot the server or enable all the services by hand – happy jumpstarting!