iPXE discussion forum

Full Version: booting/installing Solaris over HTTP
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello there,
I am trying to find a solution which allows me to boot [and install] Solaris on x86 hardware without having to depend upon DHCP or NFS (for reasons too complicated to explain here).
Something which allows me to boot and install Solaris over HTTP.

Basically, I am looking for something for x86 which is equivalent to Wanboot on sparc (since Wanboot does not support x86 h/w).

Any ideas how I may be able to achieve this by using ipxe or anything similar?
(2013-06-10 21:37)sab Wrote: [ -> ]I am trying to find a solution which allows me to boot [and install] Solaris on x86 hardware without having to depend upon DHCP or NFS (for reasons too complicated to explain here).
Something which allows me to boot and install Solaris over HTTP.

Basically, I am looking for something for x86 which is equivalent to Wanboot on sparc (since Wanboot does not support x86 h/w).

Any ideas how I may be able to achieve this by using ipxe or anything similar?

Sounds like a perfect match for iPXE.

Are you trying to avoid having to configure DHCP options, or do you need to work without even using DHCP for IP address allocation? If the latter, how are you expecting to assign IP addresses? You can hardcode a static IP address into each iPXE instance if necessary, but that seems like a lot of work.

Michael
(2013-06-11 16:55)mcb30 Wrote: [ -> ]Sounds like a perfect match for iPXE.

Are you trying to avoid having to configure DHCP options, or do you need to work without even using DHCP for IP address allocation? If the latter, how are you expecting to assign IP addresses? You can hardcode a static IP address into each iPXE instance if necessary, but that seems like a lot of work.

Michael

Hello Michael,

thanks for the reply....
I am planning to skip the DHCP altogether. So basically, I am thinking if there's a way for me to reach an "initial prompt" with iPXE from where I am okay to assign the IP manually and point the client to a HTTP server using some iPXE commands so that it can start downloading the boot image and start loading the Solaris OS.

I am not sure if you are familiar with SUN's Wanboot solution but this is how I do it in the Sparc systems using OBP commands but Sun doesn't support that solution on x86 systems and I am trying to find some alternative for Wanboot on x86 hardware.

cheers !
(2013-06-11 18:57)sab Wrote: [ -> ]I am planning to skip the DHCP altogether. So basically, I am thinking if there's a way for me to reach an "initial prompt" with iPXE from where I am okay to assign the IP manually and point the client to a HTTP server using some iPXE commands so that it can start downloading the boot image and start loading the Solaris OS.

You can definitely do that. iPXE gives you a command line; you can configure the IP address using e.g.

Code:
set net0/ip 192.168.0.10
set net0/netmask 255.255.255.0
set net0/gateway 192.168.0.254
set net0/dns 8.8.8.8

and then boot your required OS via HTTP.

To eliminate some tedious typing, you can use an embedded iPXE script to prompt you for the network configuration and then automatically boot the correct URL, e.g.:

Code:
#!ipxe
ifopen net0
echo -n IP address: && read net0/ip
echo -n Subnet mask: && read net0/netmask
echo -n Default gateway: && read net0/gateway
set net0/dns 8.8.8.8
echo -n DNS server: && read net0/dns
chain http://my.web.server/solaris.ipxe

Michael
Thanks for a prompt response Michael... That looks promising. So do you know what kind of code would have to go into that "solaris.ipxe" file which will reside on the Webserver?

I have a Solaris wanboot software file and a miniroot which I use for Sparc to boot off the network but I can always create one for x86 too along with a flash image to load the OS from.

I am just not sure how I am going to use iPXE to be able to pick up all those jumpstart scripts (begin, profile, sysidcfg, finish etc) to start a network build but its worth a try.
sab: Generally you'll have one kernel and possibly multiple initrd commands in that script, together with some extra options after the kernel command which instructs the Solaris kernel+ramdisk what exactly to do during boot. On Linux, these parameters are available in /proc/cmdline after the kernel has loaded. I'm not sure where you can locate them on Solaris.

I've heard of pxegrub being used on Solaris for netboot, and you should try to dig into how that configuration works, find out what kernel parameters are used/available, and use those in iPXE as required. If the Solaris ramdisk is required to load additional files off local storage, then you'll need to instruct it where to load said files. If the ramdisk has not been designed for it, it could be very hard. But considering they have pxegrub I'm sure they have _something_ (though it might be NFS only).

My usual flow when dealing with this is to unpack the ramdisk and look at how it steps through the system initialization (unless there are good docs available) and see if there are extension points I can make use of with kernel parameters. On Linux /sbin/init is the first process that is started, and its config is usually /etc/inittab. I'm not sure how Solaris does it, but I'm sure you'll be able to find docs on how the Solaris kernel behaves somewhere.

Also be aware that when booting Linux you can use the second parameter to initrd (iPXE command) to wrap a normal file as a cpio archive and inject it into the ramdisk. This is very useful to add additional files to the ramdisk without having to recompile it, and those files can very well help you to modify behavior during boot. What I'm not sure about, is if this feature works with Solaris boot_archive-style ramdisks. Someone else might be able to confirm/deny that.

Hope this gives you some ideas on where to go next.
thanks Robin,
I am researching into pxegrub and how i can fetch a miniroot to boot and initiate a build without using DHCP.
I am right now stuck at the following level on a HP Proliant DL380 G5:
======================================================
Attempting Boot From CD-ROM

ISOLINUX 3.83 2009-10-05 ETCD Copyright © 1994-2009 H. Peter Anvin et al
iPXE ISO boot image
Loading ipxe.krn........ready.
gg-- Open Source Network Boot Firmware -- <XXX:XX:XX:XX:XX:XX>
Features: HTTP iSCSI DNS TFTP AoE SRP bzImage ELF MBOOT PXE PXEXT Menu
fw sync timeout, reset code = 1030003
G: Using legacy NIC wrapper on <XX:XX:XX:XX:XX:XX>
iPXE>
iPXE> ifopen net0
iPXE> set net0/ip <IP_ADDRESS>
iPXE> set net0/netmask <NET_MASK>
iPXE> set net0/gateway <GATEWAY_IP>
iPXE> ifstat

net0: XX:XX:XX:XX:XX using bnx2-5708 on PCI03:00.0 (open)
[Link:up, TX:63 TXE:0 RX:907 RXE:785]
[RXE: 439 x "Operation not supported (http://ipxe.org/3c086003)"]
[RXE: 343 x "The socket is not connected (http://ipxe.org/380f6001)"]
[RXE: 3 x "Error 0x440e6003 (http://ipxe.org/440e6003)"]

iPXE> imgfetch http://<WEB_SERVER_IP>/miniroot/x86.miniroot
http://<WEB_SERVER_IP>/miniroot/x86.miniroot...transmit timed out
transmit timed out
transmit timed out
transmit timed out
transmit timed out
transmit timed out
transmit timed out
transmit timed out
======================================================
The network connection is fine. It works perfectly outside of iPXE.
I can see in the webserver logs that the client hits the webserver after a delay with following message and then it stops there:

<CLIENT_IP> - - [14/Jun/2013:18:12:31 -0500] "GET /miniroot/x86.miniroot HTTP/1.1" 200 95524456

I am suspecting it may be something to do with the below error messages being thrown out by ifstat command:
=================================================
[RXE: 439 x "Operation not supported (http://ipxe.org/3c086003)"]
[RXE: 343 x "The socket is not connected (http://ipxe.org/380f6001)"]
[RXE: 3 x "Error 0x440e6003 (http://ipxe.org/440e6003)"]
=================================================

Since I was using the ipxe.iso file downloaded from http://boot.ipxe.org/ipxe.iso, I figured I will compile my own and try it.
But when i try to compile it on Solaris, here's what it says:
===============================================
bash-3.00# cd ipxe-238050d/src
bash-3.00# make
make: Fatal error in reader: Makefile, line 7: Unexpected end of line seen
===============================================


Here's what happens when I tried "gmake":
===============================================
bash-3.00# cd ipxe-238050d/src
bash-3.00# gmake
/bin/sh: git: not found
/bin/sh: ld: not found
/bin/sh: as: not found
grep: illegal option -- q
Usage: grep -hblcnsviw pattern file . . .
/bin/sh: as: not found
grep: illegal option -- E
Usage: grep -hblcnsviw pattern file . . .

*** It hangs here forever ***
===============================================


These are the packages I have on the system:
===============================================
GNU C - The GNU C compiler 3.4.3
GNU binutils - Binary file utilities 2.15
GNU make - A utility used to build software (gmake) 3.81
SUNWperl584core Perl 5.8.4 (core)
SUNWzlib 11.10.0,REV=2005.01.08.01.09
===============================================

Do you know if this has ever been tried on a Solaris box before?
Okay, it seems we have multiple issues here.

In terms of building iPXE on Solaris, it _should_ work, but I don't think we have any regulars testing it. In your case, it seems like you have to get the appropriate GNU binaries into your path somehow (in front of the Solaris ones). It seems you're either missing some binaries for the toolchain, or you're having Solaris-style versions of them. Report back how it goes.

In terms of getting timeouts, I see you're using the bnx2 driver. This driver was being rewritten during last year's GSoC project, but it has stalled and is not yet merged. The page does say 5708 should work, so you might be inclined to test out that branch, although it is work-in-progress. My guess is that you're hitting some bug in the existing driver. The good thing is that we're (hopefully) having a hackathon soon where we plan on beating this code into submission. Meanwhile, I would suggest you try PXE chainloading instead with undionly.kpxe, as this will avoid using the iPXE bnx2 driver. See http://ipxe.org/howto/chainloading for details. Unfortunately, this will require you to set up a working DHCP/TFTP environment. It would be worthwhile to do this, just for testing, to verify if indeed it is the broken driver that is the cause of your problems, and not something else. I also notice that your RXE counter is quite high (almost as high as RX), which could indicate some kind of network issue or indeed a defective driver.

I just now noticed that your iPXE binary doesn't show a version number. Are you using an old version? If so, compile one yourself or get a prebuilt one from http://rom-o-matic.eu/.
I'm going to hijack this thread since it doesn't seem like any conclusions were made and I'm trying to do the same thing, but I'm trying to rely on dhcp.

What I've managed so far is to be able to boot into the Solaris netboot environment with the following ipxe config:

#!ipxe
kernel http://${dhcp-server}/tftp/boot/solaris/multiboot kernel/unix -v - dhcp install -B $opts
module http://${dhcp-server}/tftp/boot/solaris/x86.miniroot.unzipped
imgstat
boot

where $opts has all of the solaris install options like:

console=ttya,install_config=IP:/path/to/jumpstart,sysid_config=IP:/path/to/sysidcfgs,install_media=IP:/path/to/install_media,install_boot=IP:/path/to/install_media/boot

It seems that pxegrub would uncompress the miniroot image automatically, but iPXE does not, so I had to pre-unzip the image before having ipxe load it.

The next problem is that pxegrub would normally hand over the dhcpack response to the Solaris kernel via drives_info property. The solaris seems to look for this per these references:

https://github.com/illumos/illumos-gate/...1450-L1462
https://github.com/illumos/illumos-gate/...#L325-L336

Also, it expects the dhcpack info to be encoded using the octet_to_hexascii() function, found here:

https://github.com/illumos/illumos-gate/...ctet.c#L53

and used here:

https://github.com/illumos/illumos-gate/...1038-L1064

Without ipxe being able to pass this dhcpack info over to the netboot kernel, the host comes up without any IP information and fails to boot properly. Is there any way we can get iPXE to encode the dhcpack the way pxegrub does so that it can replace pxegrub and I don't have to go create my own miniroot image to overwrite how dhcp is initiated? It would have to be some special option to kernel or some extra command to enable a pxegrub compatibility thing, I would assume.

A second request would be to have iPXE uncompress the miniroot image for us, like pxegrub does. By uncompressing it first, the image I have goes from about 90MB to 230MB, which is a lot more network traffic.

Any help here would be greatly appreciated.

Todd
For anyone following along, I followed up on this with the ipxe-devel mailing list: http://lists.ipxe.org/pipermail/ipxe-dev...04787.html
:Solaristext
set base ${boot-url}/Oracle/sol-11_3-text-x86/
kernel ${base}/platform/i86pc/kernel/amd64/unix kernel/unix -B install=true,aimanifest=prompt,install_media=${base},install_boot=${base}/boot
module ${base}/platform/i86pc/amd64/boot_archive
#imgstat
boot || goto Failed

ps boot_archive pre-unzip the image before having ipxe load it.
Reference URL's