20041017 Sunday October 17, 2004

Solaris x86 PXE Servers

Many people have been asking about PXE servers for Solaris x86, and it's been possible to create a PXE server on Solaris for quite some time, from Solaris 9 and on Solaris 10 now. One problem is that it's not so easy to get things configured and I have heard that Sun will be providing documentation and possible scripts to automate this process.

I recently installed a PXE server for one of Sun's partners, with the help of one of my colleagues, Andrei Dorofeev. I consider Andrei to be one of the gurus for PXE servers, his scripts automate the process and once installed, you can easily enter the MAC address of the NIC for the system you want to install, and away you go.

Andrei has been threatening to make his scripts available, so if you have an interest in creating an "easy-to-use" PXE server, don't hesitate provide your comments here and I'll pass them along to him so he'll consider doing so in a timely mannor.

I currently have Andrei's scripts setup on my laptop and I can plug it into a network switch, along with another system to PXE install, add the MAC address and run a script, and PXE boot the system to perform the install. It's fast, convenient, and is reliable to install most all systems with a NIC that incorporates a PXE client.

( Oct 17 2004, 01:41:51 AM PDT ) Permalink Comments [19]

Comments:

Indeed, I didn't find too much docs/scripts on the subject. Although I don't really need a PXE boot server right now since all systems here are SPARC.

However, I think documentation and scripts would be very useful. There is a lot of good documentation on how to do network installs and JumpStart for SPARC. Now that you're pushing x86 servers too you should also provide extensive documentation on how to achieve the same things on x86 hardware.

Posted by Vlad Grama on October 17, 2004 at 02:54 AM PDT #

Vlad,

I'll let Andrei know that others would like to see some automation in this area. I suspect he knows that already...:-/

Posted by Alan DuBoff on October 19, 2004 at 08:27 PM PDT #

Hi, Does Andrei have any information on how I could adapt my existing Linux based PXE set-up for use with Solaris x86 installs? Cheers Richard.

Posted by Richard Skelton on October 20, 2004 at 04:21 AM PDT #

The configuration scripts I'm currently working on are based on pxelinux, a great open-source pxe boot loader. If you're already using it, then you'll be able to just add Solaris option to its boot menu. The interesting part of this exercise is to allow *different* versions of Solaris to be available for PXE installs. Please stay tuned for more details on my blog.

Posted by Andrei on October 20, 2004 at 03:56 PM PDT #

In order to get around the limitation with not being able to use MetaDisk to mirror root drives under Solaris, I'm hoping to force my x86 Solaris boxes to boot from the network and then mount the meta-device and continue to boot from there. Can anyone offer advice on how to do this or maybe comment on any caveats? Thanks, Patrick.

Posted by Patrick Hess on November 21, 2004 at 01:25 AM PST #

Please post the PXE scripts -- I just blew an entire Saturday failing to use PXE to install Solaris 10 b69 on a system at home, where I was trying to use Fedora Core 2 as the jumpstart server. I could get nbp going, but then it would print "Network boot failed." I suspect there is some parameter I'm not setting in the ISC dhcpd setup, but I couldn't find it after hours of trial-by-error.

Posted by Pete Jansson on November 22, 2004 at 09:30 AM PST #

Pete,

I'll check with Andrei to see where he is with getting the scripts posted. I was just PXE installing folks at the LISA conference using my laptop, with a straight cable as the Intel gigabit adapter on my Toshiba M2 supports MDI-auto-detection. Those scripts really saved the day in getting things setup.

Posted by Alan DuBoff on November 22, 2004 at 09:59 AM PST #

Pete: I'm still not ready to post my PXE scripts yet, as I haven't had time to polish them before releasing them externally. In your particular case, with ISC dhcpd setup, you need to have the following options defined:

option space                    SUNW;
option SUNW.SrootOpt            code 1 = text;
option SUNW.SrootIP4            code 2 = ip-address;
option SUNW.SrootNM             code 3 = text;
option SUNW.SrootPTH            code 4 = text;
option SUNW.SswapIP4            code 5 = ip-address;
option SUNW.SswapPTH            code 6 = text;
option SUNW.SbootFIL            code 7 = text;
option SUNW.Stz                 code 8 = text;
option SUNW.SbootRS             code 9 = integer 16;
option SUNW.SinstIP4            code 10 = ip-address;
option SUNW.SinstNM             code 11 = text;
option SUNW.SinstPTH            code 12 = text;
option SUNW.SsysidCF            code 13 = text;
option SUNW.SjumpsCF            code 14 = text;
option SUNW.Sterm               code 15 = text;
option SUNW.SbootURI            code 16 = text;
option SUNW.SHHTPProxy          code 17 = text;

And then you need to define a few of them in "SUNW.i86pc" class like this:

class "SUNW.i86pc" {
        match if substring(option vendor-class-identifier, 0, 10) = "SUNW.i86pc";
        vendor-option-space     SUNW;
        option SUNW.SbootURI    = \
        "tftp://x.x.x.x/s10_69.inetboot";
        option SUNW.SrootPTH    = \
        "/export/s10/69/Solaris_10/Tools/Boot");
        option SUNW.SrootIP4    x.x.x.x;
        option SUNW.SrootNM     "hostname";
        option SUNW.SinstPTH    = \
        "/export/s10/69");
        option SUNW.SinstIP4    x.x.x.x;
        option SUNW.SinstNM     "hostname";
}

Where x.x.x.x is the IP address of your server. You also need to copy the inetboot file from the mini-root (i.e., Solaris_10/Tools/Boot) from netinstall images which lives in /usr/platform/i86pc/lib/fs/nfs directory. You can put it in /tftpboot/s10_69.inetboot as in example above.

If you can make the client to boot Solaris nbp image, then try pressing 'd' on the console as soon as you see "Solaris Network Boot" message. This will print some debugging information about what nbp is trying to do, which can help you figure out what you might be missing.

I'll try to post my scripts when I get back from vacation in two weeks. Let me know if you need any help in the mean time. Good luck.

Posted by Andrei Dorofeev on November 22, 2004 at 10:46 AM PST #

I'm having trouble with headless Solaris.x86 installations. I'm running DHCP-3.0rc12 on a Fedora Core 2 box (dhcpd.conf enumerated later).

The Client tftp's the Primary Boot and correctly displays "Solaris network boot" and I never see anything after that. Using tcpdump from the Solaris TFTP server, I can see that it also tftp's the Secondary Boot and even NFS mounts appropriately. At that point the DCA kicks in (which I'd like to avoid).

I've tried adjusting the bootenv.rc to use 'ttya' (with and without ignore-cd) and 'com1' but nothing spits information out the serial port.

Any hints?



######################################################
## Main Section
######################################################
ddns-update-style none;

######################################################
## Subnet 172.18.23.0 Section
######################################################
subnet 172.18.23.0 netmask 255.255.255.0 {
  range 172.18.23.240 172.18.23.250;
  default-lease-time 90;
  max-lease-time 300;
  option subnet-mask 255.255.255.0;
  option broadcast-address 172.18.23.255;
  option routers 172.18.23.1;
  option domain-name-servers 172.31.3.160;
  option domain-name "blah.com";
}

######################################################
## Group 172.18.23.x Section
######################################################
group {
  next-server 172.18.23.51;
  option subnet-mask 255.255.255.0;
  option broadcast-address 172.18.23.255;
  option routers 172.18.23.1;
  option domain-name-servers 172.31.3.160;

  host rackable {
    # 1-U unit
    hardware ethernet 00:E0:81:2B:31:F0;
    # 2-U unit
    #hardware ethernet ;

    fixed-address 172.18.23.80;
    next-server 172.18.23.60;
    filename "/nbp.I86PC.Solaris_10-1";
  }
}

## jumpstart option types ##
option space SUNW;

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;
option SUNW.SHHTPProxy code 17 = text;

#  All of those are equivalent to (Solaris DHCP configuration)
#dhtadm -A -s SrootOpt -d 'Vendor=SUNW.i86pc,1,ASCII,1,0'
#dhtadm -A -s SrootIP4 -d 'Vendor=SUNW.i86pc,2,IP,1,1'
#dhtadm -A -s SrootNM -d 'Vendor=SUNW.i86pc,3,ASCII,1,0'
#dhtadm -A -s SrootPTH -d 'Vendor=SUNW.i86pc,4,ASCII,1,0'
#dhtadm -A -s SswapIP4 -d 'Vendor=SUNW.i86pc,5,IP,1,0'
#dhtadm -A -s SswapPTH -d 'Vendor=SUNW.i86pc,6,ASCII,1,0'
#dhtadm -A -s SbootFIL -d 'Vendor=SUNW.i86pc,7,ASCII,1,0'
#dhtadm -A -s Stz -d 'Vendor=SUNW.i86pc,8,ASCII,1,0'
#dhtadm -A -s SbootRS -d 'Vendor=SUNW.i86pc,9,NUMBER,2,1'
#dhtadm -A -s SinstIP4 -d 'Vendor=SUNW.i86pc,10,IP,1,1'
#dhtadm -A -s SinstNM -d 'Vendor=SUNW.i86pc,11,ASCII,1,0'
#dhtadm -A -s SinstPTH -d 'Vendor=SUNW.i86pc,12,ASCII,1,0'
#dhtadm -A -s SsysidCF -d 'Vendor=SUNW.i86pc,13,ASCII,1,0'
#dhtadm -A -s SjumpsCF -d 'Vendor=SUNW.i86pc,14,ASCII,1,0'
#dhtadm -A -s Sterm -d 'Vendor=SUNW.i86pc,15,ASCII,1,0'
#dhtadm -A -s SbootURI -d 'Vendor=SUNW.i86pc,16,ASCII,1,0'

class "vendor-classes" {
  match option vendor-class-identifier;
}

subclass "vendor-classes" "SUNW.i86pc" {
  vendor-option-space SUNW;
  option SUNW.root-server-ip-address 172.18.23.60;                                                                   #SrootIP4 =  2
  option SUNW.root-server-hostname "jumposs-lab";                                                                    #SrootNM  =  3
  option SUNW.root-path-name "/opt/jumpstart-2.0/os/sunos510-b63-x86/Solaris_10/Tools/Boot";                         #SrootPTH =  4
  #option SUNW.posix-timezone-string code "";                                                                         #Stz      =  8
  option SUNW.install-server-ip-address 172.18.23.60;                                                                #SinstIP4 = 10
  option SUNW.install-server-hostname "jumposs-lab";                                                                 #SinstNM  = 11
  option SUNW.install-path "/opt/jumpstart-2.0/os/sunos510-b63-x86/Solaris_10/Product";                              #SinstPTH = 12
  option SUNW.sysid-config-file-server "172.18.23.60:/opt/jumpstart/sysids/172-18-23";                               #SsysidCF = 13
  #option SUNW.JumpStart-server "172.18.23.60:/opt/jumpstart-2.0";                                                    #SjumpsCF = 14
  option SUNW.SbootURI "tftp://172.18.23.60/inetboot.I86PC.Solaris_10-1";                                            #SbootURI = 16
}

Posted by Patrick Hess on November 23, 2004 at 05:23 PM PST #

Patrick: I am not sure which "bootenv.rc" file you've tried to modify. There's one in the mini-root directoy (Tools/Boot/..), which gets used by all clients during install, but you can also create per-client bootenv.rc files. These must be placed in the root directory on your tftp server and have names like "01MAC_ADDRESS.bootenv.rc". Hope this helps.

- Andrei

Posted by Andrei on November 29, 2004 at 12:08 PM PST #

Patrick: I forgot to mention that in this file you need to set both "input-device" and "output-device" properties to "ttya". Also, make sure that the baud rate is set corretly (it is 9600 by default). Good luck.

Posted by Andrei on November 29, 2004 at 12:10 PM PST #

Someone today told me that PXE booting Solaris 10 versions prior to b70 had problems. Are you successfully PXE booting version b69, or something later? (I'm hopeful about b72, which is now available.)

Posted by Pete on December 01, 2004 at 11:29 AM PST #

After some tweaking I was sucessfully booting b69.

I just downloaded b72 and am making the JumpStart image right now. I'll test booting from it tomorrow.

I will summarize and provide full disclosure once I get this working completely.

Patrick

Posted by Patrick Hess on December 01, 2004 at 06:40 PM PST #

Well, I just tried with b72 and got the same results I've been having -- "d" during SOlaris network boot yields "PXE is not present" and "Network boot failed". Not surprising, since the nbp has the same md5 sum as the one from b69. I can PXE boot to a Linux install kernel, so I think the machine is capable. Patrick, I'm waiting to see how you did it.

Posted by Pete on December 02, 2004 at 06:39 PM PST #

Starting to look like my problem is that my PXE PROMS are too old. Andrei directed me to use "D" during network boot to get exhaustive instructions, and the version of PXE on my system is 0.99, which nbp says is "too old."

Posted by Pete on December 03, 2004 at 07:14 PM PST #

Pete,

I've seen this problem before when PXE BIOSs are too old. You can typically go to the vendor for the motherboard or Intel and get a newer PXE BIOS to reflash. That's what you should do, 0.99 is REALLY old.

Patrick and Pete,

Andrei told me if I want (i.e. have time;-) I could package up his scripts and make them available. I need to find out how we can do that, since Sun has a lot of restrictions on anything that goes external. Maybe we can do this through the Open Solaris site, which is currently in pilot.

Posted by Alan DuBoff on December 03, 2004 at 07:25 PM PST #

Thanks, Alan. The system on which I've been testing is a 1999-vintage IBM Intellistation E with an on-board Intel Pro 100 NIC, and I've already applied the latest firmware update I can find, so I think I'll have to get a new NIC and disable the on-board one to get a newer PXE BIOS. The system runs Solaris 10 fine as long as I install from CDs. Thanks for all your help.

Posted by Pete on December 04, 2004 at 10:35 AM PST #

I apologize if this is the wrong place to post this, but I believe I may have found a bug in Solaris 10 build 72. Where do I post this?

Posted by Patrick Hess on December 06, 2004 at 04:25 PM PST #

Patrick,

Please send me the information in email, I'll take care of it for you.

Posted by Alan DuBoff on December 06, 2004 at 05:39 PM PST #

Post a Comment:

Comments are closed for this entry.