Installing Via Net Boot
0. Check your OpenbootProm
If you have a Ultra 5 or 10 please make sure that you have the latest and greatest OBP OpenBoot Prom,
- Some ultrasparc boot proms need to be flashed in order to work with dhcp. I had to flash obp from 3.09 to 3.31, also needed for cpu upgraded 270 to 330+.
[http://sunsolve.sun.com/search/advsearch.do?collection=PATCH&type=collections&queryKey5=106121&toDocument=yes Sun firmware that needs to be installed from solaris]
- Some ultrasparc boot proms need to be flashed in order to work with dhcp. I had to flash obp from 3.09 to 3.31, also needed for cpu upgraded 270 to 330+.
[http://developers.sun.com/solaris/articles/openboot_sparc.html General Open boot Prom updates ]
1. Introduction
This document will describe how to setup a network booting environment for a Sun Microsystems SPARC or UltraSPARC based computer. The document assumes that you have an existing Fedora Linux Based computer available to act as the netboot server.
Both the netboot server and netboot client will need to either be on the same network subnet or have dhcp helper capabilities in the ethernet switch, as the dhcp protocol is typically not forwarded across different network subnets without a helper.
A generic overview of what happens during the netboot process is as follows;
- Client machine sends out a dhcp request to get an IP address
- A server machine returns a response to the client with the IP address and name and location of initial boot file to download.
- The client then attempts to download a boot image from the designated server using the tftp protocol
- Once the image is downloaded, the netboot client then boots the image
Based on this overview, we will need to install software for a dhcp daemon and a tftp daemon.
2. Software Installation And Configuration
The DHCP Daemon
this section badly needs cleanup
Install the dhcp daemon via yum install dhcpd
Setting up common dhcpd elements: /etc/ethers
No matter which rarpd you choose to use, you will need to setup the /etc/ethers file. This file indicates which hosts rarpd should respond to when a request is seen, and what address to reply with.
The format of /etc/ethers is MAC address of the NIC the machine will be netbooting from and the hostname. Whitespace delimits the MAC address from the hostname, and each entry should have its own line. The following example is for a host named sparc1.auroralinux.org:
Code Listing 2.1: Example /etc/ethers 08:00:20:c4:c1:a4 sparc1.auroralinux.org
Note: If a given hexadecimal number in the MAC address starts or is 0, you can chose to omit the first 0 (i.e. 08:00:20:77:1f:3e becomes 8:0:20:77:1f:3e).
If you desire to add additional hosts to /etc/ethers, you do not need to restart the rarpd services as the file is checked each time a request is received.
Resolving hostnames: /etc/hosts
Since each entry in /etc/ethers has a hostname, the netboot server needs to be able to resolve the hostname into its IP address. This can be done two ways, /etc/hosts or the nameserver the netboot server uses.
An /etc/hosts entry for resolving a hostname will look very similar to the one that probably exists from when you installed Gentoo on the netboot server. For our example host, sparc1.auroralinux.org, we'll assume that it has an IP address of 10.0.1.15. So the /etc/hosts entry would look like;
10.0.1.15 sparc1.auroralinux.org
Note: Depending on the environment, you may need to consult your network administrator to get an appropriate IP address or addresses to netboot the host with.
If you use a nameserver, then the DNS server administrator will need to add a record for the hostname, in our example sparc1.auroralinux.org, to point to the appropriate IP address. Please consult your DNS server administrator and/or the documentation for the DNS server's DNS software for how to add the entry.
Note: If both /etc/hosts and the nameserver have an entry for the host to be netbooted, /etc/hosts will be used first (granted the order of /etc/nsswitch.conf has not been changed from the default).
Setting up rarpd
First, we will need to tell rarpd to start by default. Second we need to start rarpd.
# /sbin/chkconfig rarpd on # /sbin/service rarpd start
The tftpd Daemon
to install the tftp daemon run
# yum install tftp-server
The tftp daemon needs a directory from which to serve files to tftp clients. The directory we will use for this howto will be /tftpboot. This will appear as the root (/) directory to the clients when requests are received.
Once installed we need to make sure that the tftp daemon will be run as needed and be ready on reboot. The tftp daemon is started via xinetd as needed. First check to see if xinetd is already set to run by default
# /sbin/chkconfig xinetd --list xinetd 0:off 1:off 2:off 3:on 4:on 5:on 6:off
If the result shows on for your run level, Generaly 3 or 5 then we need to do the following
/sbin/chkconfig tftp on /sbin/service xinetd restart
Otherwise we need to makesure xinetd is started also.
# /sbin/chkconfig tftp on # /sbin/chkconfig xinetd on # /sbin/service xinetd start
3. Preparing a tftpboot image for use by a client
Make sure you have an image you want to use for netbooting. For a sparc or sparc64 netboot image, go to you nearest mirror and look in build-<release>/sparc/os/images/ We'll assume you are planning to boot a sparc64 host using the tftp64.img image for release 2.0.
Once you have an image, copy the image into /tftpboot
Code Listing 3.1: Copying the image # cp tftp64.img /tftpboot/aurora-2.98-64.img
Now, when the netboot client makes a tftp request, it looks for a file that is the hexadecimal number of its current IP address, and on some platforms an .ARCH suffix. The hexadecimal number should use capital characters.
A guide on how to convert decimal to hexadecimal is available at http://www.permadi.com/tutorial/numDecToHex/
And for the lazy/impatient, you can find a decimal to hexadecimal conversion tool at http://dan.drydog.com/hextemp.html
Note: For each octet in the IP address (the 10 in 10.0.1.15 for instance), you will need to convert it to hexadecimal, rather than converting the IP address asa singular number.
So for our example IP address, 10.0.1.15, let's look at its hexadecimal equivalent;
# ln -s aurora-2.98-64.img `perl -e 'printf "%02X"x4 ."\n",10,0,1,15;'`
Code Listing 3.2: Example IP address decimal 10 0 1 15 hexadecimal 0A 00 01 0F
So for the example sparc64 netboot client, it would look for a file named 0A00010F when it tftpboots.
On sparc however, the file would be 0A00010F.SUN4M, 0A00010F.SUN4C or 0A00010F.SUN4D depending on what type of sparc system.
Additionally, if you are really really lazy (like me), you can netboot the host to get the filename the client is looking for from the netboot server logs.
Make sure that both the rarpd and tftpd daemon you've chosen are currently running, then boot the host as described below in "Netbooting the client".
The client will appear to hang after the boot net command is issued. Then on the netboot server, check the system logs for an entry for in.tftpd.
An example entry from a netboot server looks like;
Code Listing 3.3: Log entry for netboot server Jan 3 22:48:59 stargazer in.tftpd[8368]: RRQ from 10.0.1.15 filename 0A00010F
The filename is shown above after "filename" in the log entry, which in this case is 0A00010F.
As a way to keep track of what netboot image you are using, and to allow multiple machines to use the same netboot image, you can use a soft link to create the file with the hexadecimal value. To create this using our sample sparc64 host and the gentoo-sparc64-1.4_rc4-20040102.tftpboot, use the following command;
Code Listing 3.4: Linking the image files # /bin/ln -s /tftpboot/aurora-2.0-64.img /tftpboot/0A00010F
Now everything should be set for netbooting!
4. Netbooting the client
From OpenBoot PROM (OBP) on the SPARC, enter the command;
Code Listing 4.1: Booting OBP ok boot net
Other methods for certain machines are:
Code Listing 4.2: Booting OBP, alternative ok boot net-tpe
Note: If your system doesn't present you with an OBP at boot time, you will either need to press the Stop and A key, or send a break signal via serial console before the system boots an OS. If your system cannot find an OS, it should either try to boot via the network interface (which is what we want), or leave you at an OBP prompt.
This will initiate the networking booting process. A constantly changing string of hexadecimal digits should appear. When the image has finished loading, the kernel will take over and start the OS booting process. In the case of our sparc64 install image, you will be left at a shell prompt from which you can begin the install process.
5. Troubleshooting
If the netboot server is a Aurora system and experiences problems installing the rarpd and tftp-server packages, please search http://bugzilla.auroralinux.org and the mailing list archives to see if this problem has been encountered by anyone else. If it has not, or the solutions found do not work, then please open a new bug at http://bugzilla.auroralinux.org
I've issued the boot net command but it appears to hang.
This is presumably because the file your system is trying to load from the tftpboot server is not available. On a SPARC system, you would probably see the following;
Code Listing 5.1: Booting appears to hang Rebooting with command: boot Boot device: net File and args:
Double check that the file the client needs does exist in /tftpboot. You can confirm the filename it is requesting by looking in the system logs. Also, once this file exists, the client will try to load it. Sometimes, when the file is missing originally, it will freeze downloading the file once it appears. To resolve this, just get back to an OBP prompt, and issue the "boot net" command again. The host should then start downloading the tftpboot image and boot the OS.
I'm trying to netboot, but all I see are "Timeout waiting for ARP/RARP packet" messages.
This could be due to a few different problems;
- Make sure the entry in /etc/ethers exists for the client in question. If the MAC address is incorrect and/or the netboot server cannot resolve the hostname for the client, it cannot respond with the needed information.
- Verify that the network hub or switch the netboot server and client are connected to allow RARP traffic to flow freely. If the client's request cannot reach the server, or vice versa, the host will be unable to continue.
- No one is responding to the RARPD request because no services are listening. Verify that the rarpd service is up and running.
- The client does not think its NIC has a link to the network hub/switch it is plugged into. Check to see if the NIC and the port on the network hub or switch has a link light. If the link light is on, check to see what the setting of tpe-link-test? is in OBP with the command; printenv tpe-link-test?. You should receive something like tpe-link-test? false true. The first column represents the parameter name, the second column shows the current value for the the parameter, and the third column shows the default value for the parameter. In the example above, we can see that the current value is false, which means that the client is not checking to see if the client and network hub or switch can establish a link before issuing its RARP request. Often times this can cause the problem.
To change the value of tpe-link-test? from an OBP prompt, issue the following command;
Code Listing 5.2: Changing tpe-link-test value ok setenv tpe-link-test? true tpe-link-test? = true
This shows the value of tpe-link-test? is now true. Try netbooting the client again.