Netboot Solaris from Linux

From Wirespeed
Jump to: navigation, search

Contents

Boot server

The first chapter in this article is a high level description on how to build a Linux boot server to boot Sun Solaris over the network on a Sparc client. Chapter two describes how to netboot the Sparc client itself.

Required daemons

rarpd

File: /etc/ethers
This file links the client's MAC address to its hostname.
00:03:ba:71:ea:dd gentoo
00:03:ba:71:e5:15 solaris10
00:03:ba:08:5b:e8 solaris10


File: /etc/hosts
This file links the client's hostname to its IP address.
192.168.10.254  bootp-server

192.168.10.1    gentoo
192.168.10.10   solaris10

bootparamd

It is essential to use the exact hostname of the boot server "bootp-server" and it must be in /etc/hosts. It is not sufficient if it can be resolved in DNS. Every single parameter must start with the hostname, followed by a colon.

File: /etc/bootparams
This file links the client's hostname to its boot parameters.
solaris10       root=bootp-server:/var/lib/tftpboot/sparc/solaris10/Solaris_10/Tools/Boot \
                rootopts=bootp-server:rsize=32768:nfsvers=2:vers=2 \
                install=bootp-server:/var/lib/tftpboot/sparc/solaris10 \
                sysid_config=bootp-server:/var/lib/tftpboot/sparc/sysidcfg.d/solaris10 \
                boottype=bootp-server:in \
                term=bootp-server:xterm

tftpd

Download the Solaris DVD image from Sun Microsystems. To be able to install Solaris over the network, we cannot use a loop-mount because it must be writeable!! Extract all files from the DVD image into a directory that can be accessed by both TFTPd and NFSd. Notice that there are a hand full of hidden files that are absoluty essential.

Code: Extract DVD contents to disk
root@bootp-server:/var/lib/tftpboot/sparc/solaris10# ls -lA
total 508
-r--r--r-- 1 root root     93 2007-06-12 17:43 .cdtoc
-r--r--r-- 1 root root   6128 2007-06-12 17:43 Copyright
drwxr-xr-x 5 root root   4096 2007-08-16 23:11 .install
lrwxrwxrwx 1 root root     33 2007-09-19 11:47 .install_config -> ./Solaris_10/Misc/.install_config
-rwxr-xr-x 1 root root    257 2007-08-16 22:38 installer
-r--r--r-- 1 root root 459760 2007-06-12 17:43 JDS-THIRDPARTYLICENSEREADME
drwxr-xr-x 2 root bin    4096 2007-08-16 23:10 License
-r--r--r-- 1 root root    472 2007-06-12 17:43 .slicemapfile
drwxr-xr-x 8 root root   4096 2007-08-16 23:11 Solaris_10
-r--r--r-- 1 root root     21 2007-06-12 17:45 .volume.inf
-r--r--r-- 1 root root     23 2007-08-16 22:36 .volume.inf.2
-r--r--r-- 1 root root     23 2007-08-16 22:37 .volume.inf.3
-r--r--r-- 1 root root     23 2007-08-16 22:37 .volume.inf.4
-r--r--r-- 1 root root     23 2007-08-16 22:38 .volume.inf.5

The Sparc box will query TFTP for a file that named with a hexadecimal representation of its IP address; therefore you probably want to create a symlink to the proper boot image.

Code: Link IP address in hex to boot image
root@bootp-server:/var/lib/tftpboot# ls -l
total 20
lrwxrwxrwx 1 root root   36 2007-09-24 10:51 C0A80A01 -> sparc/netboot-sparc64-20070724.img
lrwxrwxrwx 2 root root   76 2007-09-13 10:37 C0A80A0A -> inetboot-solaris10-sun4u.img
lrwxrwxrwx 2 root root   76 2007-09-13 10:37 inetboot-solaris10-sun4u.img -> sparc/solaris10/Solaris_10/Tools/Boot/usr/platform/sun4u/lib/fs/nfs/inetboot
drwxr-xr-x 4 root root 4096 2007-09-19 10:48 novell
drwxr-xr-x 6 root root 4096 2007-10-08 12:48 sparc
drwxr-xr-x 6 root root 4096 2007-10-08 12:52 x86

rpc.nfsd

Note: An NFS server is not necessary when booting Gentoo Linux netboot image "netboot-sparc64-20070724.img". You may however consider the presence of an NFS server usefull during installations.


The NFS daemon must be the user space NFS(v2) daemon. To check if you are running the user space or kernel space server do the following check:

Code: kernel space NFS server
# ps -ef | grep nfs | grep -v grep
root      6694     1  0 Oct07 ?        00:00:46 [nfsd]

Kernel space processes have square brackets around them. This is useless for booting Solaris.


Code: user space NFS server
# ps -ef | grep nfs | grep -v grep
root      6694     1  0 Oct07 ?        00:00:46 /usr/sbin/rpc.nfsd


The settings below are not particularly security aware. One might consider changing the ' *' with an IP range, but in my experience this introduced booting problems.

File: /etc/exports
This file links the client's IP address to the file and directory permissions.
/var/lib/tftpboot       *(rw,no_root_squash)

The Sparc boot client will try to mount its root filesystem over NFS and then download installation packages over NFS aswell.

To ease installation of Solaris, I created a configuration file for my servers:

File: /var/lib/tftpboot/sparc/sysidcfg.d/solaris10/sysidcfg
name_service=DNS
{domain_name=mynetwork.local
name_server=10.10.10.254,192.168.10.254}
nfs4_domain=dynamic
network_interface=bge0 {dhcp protocol_ipv6=no}
security_policy=NONE
system_locale=en_US
terminal=vt100
timezone=Europe/Amsterdam
timeserver=ntp
keyboard=US-English

Check logging

File: /var/log/syslog
Oct  9 14:41:21 bootp-server rarpd[4066]: RARP request from 00:03:ba:71:e5:15 on eth0
Oct  9 14:41:21 bootp-server rarpd[4066]: RARP response to 00:03:ba:71:e5:15 192.168.10.10 on eth0
Oct  9 14:41:31 bootp-server rarpd[4066]: RARP request from 00:03:ba:71:e5:15 on eth0
Oct  9 14:41:31 bootp-server rarpd[4066]: RARP response to 00:03:ba:71:e5:15 192.168.10.10 on eth0
Oct  9 14:41:31 bootp-server rpc.bootparamd: whoami got question for 192.168.10.10
Oct  9 14:41:31 bootp-server rpc.bootparamd: This is host solaris10
Oct  9 14:41:31 bootp-server rpc.bootparamd: Returning solaris10   (none)    10.10.10.254
Oct  9 14:41:31 bootp-server rpc.bootparamd: getfile got question for "solaris10" and file "root"
Oct  9 14:41:31 bootp-server rpc.bootparamd: returning server:bootp-server path:/var/lib/tftpboot/sparc/solaris10/Solaris_10/Tools/Boot address: 192.168.10.254
Oct  9 14:41:31 bootp-server rpc.bootparamd: getfile got question for "solaris10" and file "rootopts"
Oct  9 14:41:31 bootp-server rpc.bootparamd: returning server:bootp-server path:rsize=32768:nfsvers=2:vers=2 address: 192.168.10.254
Oct  9 14:41:31 bootp-server mountd[10843]: NFS mount of /var/lib/tftpboot/sparc/solaris10/Solaris_10/Tools/Boot attempted from 192.168.10.10
Oct  9 14:41:31 bootp-server mountd[10843]: /var/lib/tftpboot/sparc/solaris10/Solaris_10/Tools/Boot has been mounted by 192.168.10.10
Oct  9 14:42:01 bootp-server rarpd[4066]: RARP request from 00:03:ba:71:e5:15 on eth0
Oct  9 14:42:01 bootp-server rarpd[4066]: RARP response to 00:03:ba:71:e5:15 192.168.10.10 on eth0
Oct  9 14:42:01 bootp-server rpc.bootparamd: whoami got question for 192.168.10.10
Oct  9 14:42:01 bootp-server rpc.bootparamd: This is host solaris10
Oct  9 14:42:01 bootp-server rpc.bootparamd: Returning solaris10   (none)    10.10.10.254
Oct  9 14:42:02 bootp-server rpc.bootparamd: getfile got question for "solaris10" and file "root"
Oct  9 14:42:02 bootp-server rpc.bootparamd: returning server:bootp-server path:/var/lib/tftpboot/sparc/solaris10/Solaris_10/Tools/Boot address: 192.168.10.254
Oct  9 14:42:02 bootp-server rpc.bootparamd: getfile got question for "solaris10" and file "root"
Oct  9 14:42:02 bootp-server rpc.bootparamd: returning server:bootp-server path:/var/lib/tftpboot/sparc/solaris10/Solaris_10/Tools/Boot address: 192.168.10.254
Oct  9 14:42:02 bootp-server rpc.bootparamd: getfile got question for "solaris10" and file "root"
Oct  9 14:42:02 bootp-server rpc.bootparamd: returning server:bootp-server path:/var/lib/tftpboot/sparc/solaris10/Solaris_10/Tools/Boot address: 192.168.10.254
Oct  9 14:42:02 bootp-server mountd[10843]: NFS mount of /var/lib/tftpboot/sparc/solaris10/Solaris_10/Tools/Boot attempted from 192.168.10.10
Oct  9 14:42:02 bootp-server mountd[10843]: /var/lib/tftpboot/sparc/solaris10/Solaris_10/Tools/Boot has been mounted by 192.168.10.10
Oct  9 14:42:02 bootp-server rpc.bootparamd: getfile got question for "solaris10" and file "rootopts"
Oct  9 14:42:02 bootp-server rpc.bootparamd: returning server:bootp-server path:rsize=32768:nfsvers=2:vers=2 address: 192.168.10.254
Oct  9 14:42:02 bootp-server rpc.bootparamd: getfile got question for "solaris10" and file "root"
Oct  9 14:42:02 bootp-server rpc.bootparamd: returning server:bootp-server path:/var/lib/tftpboot/sparc/solaris10/Solaris_10/Tools/Boot address: 192.168.10.254
Oct  9 14:42:02 bootp-server mountd[10843]: NFS mount of /var/lib/tftpboot/sparc/solaris10/Solaris_10/Tools/Boot attempted from 192.168.10.10
Oct  9 14:42:02 bootp-server mountd[10843]: /var/lib/tftpboot/sparc/solaris10/Solaris_10/Tools/Boot has been mounted by 192.168.10.10

At this time the network interfaces are being configured, starting at bge3, slowly counting down to bge0.

File: /var/log/syslog continued
Oct  9 14:44:46 bootp-server rarpd[4066]: RARP request from 00:03:ba:71:e5:15 on eth0
Oct  9 14:44:46 bootp-server rarpd[4066]: RARP response to 00:03:ba:71:e5:15 192.168.10.10 on eth0
Oct  9 14:44:47 bootp-server rpc.bootparamd: whoami got question for 192.168.10.10
Oct  9 14:44:47 bootp-server rpc.bootparamd: This is host solaris10
Oct  9 14:44:47 bootp-server rpc.bootparamd: Returning solaris10   (none)    10.10.10.254
Oct  9 14:44:47 bootp-server rpc.bootparamd: getfile got question for "solaris10" and file "root"
Oct  9 14:44:47 bootp-server rpc.bootparamd: returning server:bootp-server path:/var/lib/tftpboot/sparc/solaris10/Solaris_10/Tools/Boot address: 192.168.10.254
Oct  9 14:44:53 bootp-server rpc.bootparamd: getfile got question for "solaris10" and file "install"
Oct  9 14:44:53 bootp-server rpc.bootparamd: returning server:bootp-server path:/var/lib/tftpboot/sparc/solaris10 address: 192.168.10.254
Oct  9 14:44:53 bootp-server mountd[10843]: NFS mount of /var/lib/tftpboot/sparc/solaris10 attempted from 192.168.10.10
Oct  9 14:44:53 bootp-server mountd[10843]: /var/lib/tftpboot/sparc/solaris10 has been mounted by 192.168.10.10

At this point the Java setup program is downloaded and started.

File: /var/log/syslog continued
Oct  9 14:45:43 bootp-server rpc.bootparamd: getfile got question for "solaris10" and file "sysid_config"
Oct  9 14:45:43 bootp-server rpc.bootparamd: returning server:bootp-server path:/var/lib/tftpboot/sparc/sysidcfg.d/solaris10 address: 192.168.10.254
Oct  9 14:45:46 bootp-server mountd[10843]: NFS mount of /var/lib/tftpboot/sparc/sysidcfg.d/solaris10 attempted from 192.168.10.10
Oct  9 14:45:46 bootp-server mountd[10843]: /var/lib/tftpboot/sparc/sysidcfg.d/solaris10 has been mounted by 192.168.10.10

Network tracing

Known issues

  • You must use the userspace NFS server. The kernelspace server will not function.
  • When booting Solaris and using an IP address in the range 10.x.y.0/24, the boot will fail! This is caused by Solaris assuming 10.x.y.z is a class-A network. It can be solved by using an unused 192.168.x.y/24 address.
  • Whereas the Sparc machine will always TFTP-boot using Ethernet interface 0, on multi-NIC servers such as a SunFire V240 (Quad Ethernet) when booting Linux eth0 may be an entirely different interface (interface 2 in my case).
  • Jumpstart Troubleshooting

Boot client

SunSparc V240

Serial console

Use Minicom to access the serial console on a Sun server with the following settings:

  • /dev/ttyS0
  • 9600 Bd
  • 8 databits
  • No parity
  • 1 stopbit

Net console / ALOM

When poperly configured, it is possible to acces the console via network using the ALOM (All Lights Out Manager) interface. The ALOM needs to be configured for this first and this can only be done via the serial console. Once configured, depending on the firmware, it is possible to connect over the netwerk to the ALOM via TELNET or SSH.

From the "sc>" prompt type "console -f" to get console access. To return to the ALOM, type "#.".


SunBlade 100

To gain access to the OK-prompt on a SunBlade 100:

  • Power on the machine with the power button on the front of the machine;
  • Wait for the beep;
  • Wait half a second or so, then press the power button twice.

Access OK-prompt

Issue a break

  • To issue a BREAK from ALOM, return to the "sc>" prompt and type "break -y"
  • To issue a BREAK from TELNET type the Escape sequence, usaually CTRL-], then at the "telnet>" prompt type "send brk"
  • To issue a BREAK from Minicom type CTRL-A followed by "F"

Boot from network

SunFire V240

Use connect to the ALOM interface using TELNET/SSH or a serial console. Enter '#.' to enter the ALOM (Advanced Lights Out Manager), or just power on the machine ...

Code: Network Boot
ALOM BOOTMON v1.3.0
ALOM Build Release: 007
Reset register: e0000000 EHRS ESRS LLRS


ALOM POST 1.0


Dual Port Memory Test, PASSED.

TTY External - Internal Loopback Test
TTY External - Internal Loopback Test, PASSED.

TTYC - Internal Loopback Test
TTYC - Internal Loopback Test, PASSED.

TTYD - Internal Loopback Test
TTYD - Internal Loopback Test, PASSED.

Memory Data Lines Test
Memory Data Lines Test, PASSED.

Memory Address Lines Test
  Slide address bits to test open address lines
  Test for shorted address lines
Memory Address Lines Test, PASSED.

Memory Parity Test
Memory Parity Test, PASSED.

Boot Sector FLASH CRC Test
Boot Sector FLASH CRC Test, PASSED.



Return to Boot Monitor for Handshake
ALOM POST 1.0
   Status = 00007fff

Returned from Boot Monitor and Handshake



Clearing Memory Cells
Memory Clean Complete


Loading the runtime image...
SC Alert: SC System booted.


Sun(tm) Advanced Lights Out Manager 1.3 (v240-1-0)



Full VxDiag Tests

BASIC TOD TEST
  Read the TOD Clock:        TUE OCT 09 08:58:06 2007
  Wait, 1 - 3 seconds
  Read the TOD Clock:        TUE OCT 09 08:58:08 2007
BASIC TOD TEST, PASSED

ETHERNET CPU LOOPBACK TEST
  50 BYTE PACKET   - a 0 in field of 1's.
  50 BYTE PACKET   - a 1 in field of 0's.
  900 BYTE PACKET  - pseudo-random data.
ETHERNET CPU LOOPBACK TEST, PASSED

Full VxDiag Tests - PASSED



    Status summary  -  Status = 7FFF

       VxDiag    -          -  PASSED
       POST      -          -  PASSED
       LOOPBACK  -          -  PASSED

       I2C       -          -  PASSED
       EPROM     -          -  PASSED
       FRU PROM  -          -  PASSED

       ETHERNET  -          -  PASSED
       MAIN CRC  -          -  PASSED
       BOOT CRC  -          -  PASSED

       TTYD      -          -  PASSED
       TTYC      -          -  PASSED
       MEMORY    -          -  PASSED
       MPC850    -          -  PASSED


Please login:

Serial line login timeout, returns to console stream.

Enter #. to return to ALOM.


Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.


Sun(tm) Advanced Lights Out Manager 1.3 (v240-1-0)

Please login: admin
Please Enter password: *****


sc>
sc> break -y
sc> console -f
Enter #. to return to ALOM.

SC Alert: SC Request to send Break to host.

ok boot net

SC Alert: Host System has Reset

Sun Fire V240, No Keyboard
Copyright 1998-2003 Sun Microsystems, Inc.  All rights reserved.
OpenBoot 4.11.4, 1024 MB memory installed, Serial #57795861.
Ethernet address 0:3:ba:71:e5:15, Host ID: 8371e515.



Rebooting with command: boot net
Boot device: /pci@1f,700000/network@2  File and args:
100 Mbps FDX Link up
Timeout waiting for ARP/RARP packet
38e00 100 Mbps FDX Link up
SunOS Release 5.10 Version Generic_120011-14 64-bit
Copyright 1983-2007 Sun Microsystems, Inc.  All rights reserved.
Use is subject to license terms.
rtioctl: kstr_ioctl failed: error 128
whoami: couldn't add route: error 128.
WARNING: bge0: no response from interface
Hardware watchdog enabled
SC unretrieved msg OCT 09 12:32:40 2007 UTC [Host System has Reset]
Configuring devices.
Using RPC Bootparams for network configuration information.
Attempting to configure interface bge3...
Skipped interface bge3
Attempting to configure interface bge2...
Skipped interface bge2
Attempting to configure interface bge1...
Skipped interface bge1
Attempting to configure interface bge0...
Configured interface bge0
Setting up Java. Please wait...
Beginning system identification...
Searching for configuration file(s)...
Using sysid configuration file 192.168.10.254:/var/lib/tftpboot/sparc/sysidcfg.d/solaris10/sysidcfg
Search complete.
Discovering additional network configuration...


� The Solaris Installation Program ���������������������������������������������

  The Solaris installation program is divided into a series of short sections
  where you'll be prompted to provide information for the installation. At
  the end of each section, you'll be able to change the selections you've
  made before continuing.

  About navigation...
        - The mouse cannot be used
        - If your keyboard does not have function keys, or they do not
          respond, press ESC; the legend at the bottom of the screen
          will change to show the ESC keys to use for navigation.










��������������������������������������������������������������������������������
    F2_Continue    F6_Help
Personal tools
Namespaces

Variants
Actions
Navigation
Tools