Home

Network booting Solaris 10 from a Linux machine using DHCP

Posted 2018-12-18

Looking at the documentation for the network installation of Solaris 10, you’d be fooled into thinking that you need a Solaris install server, however that simply isn’t the case!

After a bit of messing, it turns out that it’s reasonably straightforward to boot a SPARC-based machine over the network using just DHCP and an NFS server.

Note that these steps were performed on a Raspberry Pi running Debian, which is located at 10.0.0.1 and being configured as a DHCP server for the 10.0.0.1/24 subnet on eth0.

  1. Install Dnsmasq and the NFS server.

    apt install -y dnsmasq nfs-kernel-server
  2. Create an NFS share which exposes the Solaris 10 installation disk.

    # Mount the ISO, copy it's contents to the share and unmount it
    mount -o loop /path/to/your/solaris.iso /mnt
    mkdir -p /share/nfs
    cp -Rv /mnt /share/nfs/solaris
    umount /mnt

    Next up, the installation media needs to be exposed via an NFS share, making it read-only in this case as the installation does not need write access to the share.

    # Append "/share/nfs *(ro)" to the end of /etc/exports and re-export all shares
    echo -e "\n/share/nfs 10.0.0.1/24(ro)" >> /etc/exports
    exportfs -ra

    This command exposes /share/nfs as a read-only share to devices on the 10.0.0.1/24 subnet, which can be tested using showmount;

    $ showmount -e localhost
    Export list for localhost:
    /share/nfs 10.0.0.1/24
  3. Copy the boot file into the TFTP server’s path.

    Make sure to pick the right architecture from the platform directory for the machines that are being installed - in this case it’s sun4v.

    mkdir -p /var/lib/tftpboot
    cp /share/nfs/solaris/Solaris_10/Tools/Boot/platform/sun4v/inetboot /var/lib/tftpboot
  4. Configure the DHCP server to provide install information.

    Dnsmasq’s configuration is located at /etc/dnsmasq.conf by default.

    Oracle recommends using the ISC DHCP server, providing these vendor options in an article regarding configuring a DHCP server for JumpStart;

    option SUNW.root-mount-options code 1 = text;
    option SUNW.root-server-ip-address code 2 = ip-address;
    option SUNW.root-server-hostname code 3 = text;
    option SUNW.root-path-name code 4 = text;
    option SUNW.swap-server-ip-address code 5 = ip-address;
    option SUNW.swap-file-path code 6 = text;
    option SUNW.boot-file-path code 7 = text;
    option SUNW.posix-timezone-string code 8 = text;
    option SUNW.boot-read-size code 9 = unsigned integer 16;
    option SUNW.install-server-ip-address code 10 = ip-address;
    option SUNW.install-server-hostname code 11 = text;
    option SUNW.install-path code 12 = text;
    option SUNW.sysid-config-file-server code 13 = text;
    option SUNW.JumpStart-server code 14 = text;
    option SUNW.terminal-name code 15 = text;
    option SUNW.SbootURI code 16 = text;

    To use any of these options in Dnsmasq, simply copy the option ID and use it with Dnsmasq’s dhcp-option;

    # Equivalent to setting SUNW.root-server-ip-address to 10.0.0.1.
    dhcp-option=vendor:SUNW,2,10.0.0.1

    Here is a minimal configuration for providing DHCP on 10.0.0.1/24 and booting from the install server at 10.0.0.1;

    # Never forward plain names (without a dot or domain part).
    domain-needed
    
    # Never forward addresses in the non-routed address spaces.
    bogus-priv
    
    # Use Google's DNS server.
    server=8.8.8.8
    
    # Only serve DHCP on eth0.
    interface=eth0
    
    # Serve DHCP for 10.0.0.10 - 10.0.0.250 with a 12 hour lease.
    dhcp-range=10.0.0.10,10.0.0.250,12h
    
    # Enable dnsmasq's built-in TFTP server.
    enable-tftp
    
    # Set the root directory for files available via FTP.
    tftp-root=/var/lib/tftpboot
    
    # Boot using inetboot.
    dhcp-boot=inetboot
    
    # Set the IP of the NFS server to use.
    dhcp-option=vendor:SUNW,2,10.0.0.1
    
    # Set the path on the NFS server to the install media's Boot directory.
    dhcp-option=vendor:SUNW,4,"/share/nfs/solaris/Solaris_10/Tools/Boot"
  5. Boot from the network!

    Everything should now be set up, and all that needs doing is booting the machine from the network.

    sc> poweron
    sc> console
    {0} ok boot net:dhcp
    Boot device: /pci@7c0/pci@0/network@4:dhcp  File and args:
    1000 Mbps full duplex  Link up
    
    SunOS Release 5.10 Version Generic_147147-26 64-bit
    Copyright (c) 1983, 2013, Oracle and/or its affiliates. All rights reserved.
    Configuring devices.
    Using DHCP for network configuration information.
    DHCP: using local media
    Serial console, reverting to text install
    Beginning system identification...
    Searching for configuration file(s)...
    Search complete.
    Discovering additional network configuration...
    
    Select a Language
    
      ​0. English
      ​1. Brazilian Portuguese
      ​2. French
      ​3. German
      ​4. Italian
      ​5. Japanese
      ​6. Korean
      ​7. Simplified Chinese
      ​8. Spanish
      ​9. Swedish
      ​10. Traditional Chinese
    
    Please make a choice (0 - 10), or press h or ? for help: