ProLiant Deployment and Provisioning
1829489 Members
1829 Online
109991 Solutions
New Discussion

PXE Boot Image from an ISO

 
J. Muellers
New Member

Re: PXE Boot Image from an ISO

Sorry for my preceding post, I missed the post from Peter Capriccio Jan 31, 2010 00:47:38 GMT
in the first place.

I now repacked the initrd.img and the iso files as described by Peter.

I now even get to the graphical screen with
"Loading media (Step 4 of 4)" but then the server powers off. This is what I can see on a serial console:


Loading drivers...done.
Starting udevd 7 [?25l
[80C [10D [1;32mdone [m 8 [?25h
Starting RPC portmap daemon 7 [?25l
[80C [10D [1;32mdone [m 8 [?25h
acpid: loading ACPI modules ( modprobe: FATAL: Could not open '/lib/modules/2.6.16.60-0.21-bigsmp/kernel/drivers/acpi/ac.ko': No such file or directory


modprobe: FATAL: Could not open '/lib/modules/2.6.16.60-0.21-bigsmp/kernel/drivers/acpi/battery.ko': No such file or directory


modprobe: FATAL: Could not open '/lib/modules/2.6.16.60-0.21-bigsmp/kernel/drivers/acpi/button.ko': No such file or directory


modprobe: FATAL: Could not open '/lib/modules/2.6.16.60-0.21-bigsmp/kernel/drivers/acpi/fan.ko': No such file or directory


modprobe: FATAL: Could not open '/lib/modules/2.6.16.60-0.21-bigsmp/kernel/drivers/acpi/processor.ko': No such file or directory


modprobe: WARNING: Could not open '/lib/modules/2.6.16.60-0.21-bigsmp/kernel/drivers/acpi/processor.ko': No such file or directory


modprobe: FATAL: Could not open '/lib/modules/2.6.16.60-0.21-bigsmp/kernel/drivers/acpi/thermal.ko': No such file or directory


) 7 [?25l
[80C [10D [1;31mfailed [m 8 [?25h
acpid: will not skip unsupported modules
acpid: probing laptop ACPI modules
modprobe: FATAL: Module asus_acpi not found.


modprobe: FATAL: Could not open '/lib/modules/2.6.16.60-0.21-bigsmp/kernel/drivers/acpi/ibm_acpi.ko': No such file or directory


modprobe: FATAL: Could not open '/lib/modules/2.6.16.60-0.21-bigsmp/kernel/drivers/acpi/toshiba_acpi.ko': No such file or directory


modprobe: FATAL: Could not open '/lib/modules/2.6.16.60-0.21-bigsmp/kernel/drivers/acpi/sony_acpi.ko': No such file or directory


modprobe: FATAL: Could not open '/lib/modules/2.6.16.60-0.21-bigsmp/kernel/drivers/acpi/pcc_acpi.ko': No such file or directory


modprobe: FATAL: Could not open '/lib/modules/2.6.16.60-0.21-bigsmp/kernel/drivers/acpi/dock.ko': No such file or directory


acpid: added to /var/lib/acpi/laptop_modules 7 [?25l
[80C [10D [1;32mdone [m 8 [?25h
Starting acpid [acpid]: starting up


[acpid]: 0 rules loaded


7 [?25l
[80C [10D [1;32mdone [m 8 [?25h
'acpid start' exits with status 1
Fri Jan 22 00:00:00 UTC 2010
/etc/init.d/hp-ilo: line 73: rc_reset: command not found
/etc/init.d/hp-ilo: line 74: rc_status: command not found
Already started hpilo module:/etc/init.d/boot.d/S36boot.hp-ilo: line 73: rc_reset: command not found
/etc/init.d/boot.d/S36boot.hp-ilo: line 74: rc_status: command not found

chmod: cannot access `/root/compaq/hplink.sh': No such file or directory
cp: target `/var/www/html/cfg/' is not a directory: No such file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
ls: /dev/cdrom: No such file or directory
Starting hpmouse helper process/etc/init.d/boot.d/S84hpmouse: line 52: rc_reset: command not found
/etc/init.d/boot.d/S84hpmouse: line 53: rc_status: command not found


Starting mouse support

X Window System Version 6.9.0
Release Date: 21 December 2005
X Protocol Version 11, Revision 0, Release 6.9
Build Operating System: SuSE Linux [ELF] SuSE
Current Operating System: Linux fwupdatesystem00237de9bc1c 2.6.16.60-0.21-bigsmp #1 SMP Fri Aug 14 16:12:25 UTC 2009 i686
Build Date: 22 April 2008
Before reporting problems, check http://wiki.X.Org
to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Fri Jan 22 00:00:10 2010
(==) Using config file: "/etc/X11/xorg.conf"
ACPI: OSPMOpen called
ACPI: Opening device
[acpid]: client connected from 9354[0:0]


[acpid]: 1 client rule loaded


dlopen: /usr/X11R6/lib/modules/extensions/libGLcore.so: undefined symbol: __glXLastContext
(EE) Failed to load /usr/X11R6/lib/modules/extensions/libGLcore.so
(EE) Failed to load module "GLcore" (loader failed, 7)
Starting autorun:
[H [Jfwupdatesystem00237de9bc1c:~ # CD information
mount directory: /mnt/boot
physical device:
volume label: HPFWUP870
SS_CD_MOUNTPOINT: /mnt/boot
Boot env: yes
ARCHITECTURE: i686
(WW) VESA(0): Failed to set up write-combining range (0xe8000000,0x4000000)
error opening security policy file /usr/X11R6/lib/X11/xserver/SecurityPolicy
The server is not powered on. The Virtual Serial Port is not available.
Peter Capriccio
Frequent Advisor

Re: PXE Boot Image from an ISO

I'm not sure, but I'm wondering your setting of "ramdisk_size=640000" has something to do with it? I've been using the value that is on the CD (that is, "ramdisk_size=202448" for V8.70). Since you are NFS mounting the bits beyond what is in the initrd, you shouldn't need a "ramdisk" that large (unless you are doing something else). Just my two cents...

Pete C.
Kevin Revell_1
New Member

Re: PXE Boot Image from an ISO

Has anyone tried and been successful using the Cam method on the 8.7 firmware maintenance CD? One of the last posts from Cam he attached a script for the 8.3 firmware maintanence CD which worked great no problems. That script doesn't work for the 8.7 CD :( ..
CamScott
Advisor

Re: PXE Boot Image from an ISO

Hi Kevin,

Here you go. I've updated the script for version 8.70 of the firmware update CD. I gzipped it to try and avoid ^M characters.

One more command is required with this script release 'cpio'.

As before just plonk the script and the iso and the same directory and run.

Let me know if you have any issues.

Cheers,
Cam
Kevin Revell_1
New Member

Re: PXE Boot Image from an ISO

Hi Cam,

Your script for the 8.7 firmware maintenance CD worked perfectly. Thank you so much!! Your work here and is greatly appreciatedâ ¦
And btw no ^M characters in the script. Thanks Again!!
reker
New Member

Re: PXE Boot Image from an ISO

...is it a good idea to combine your scripts with this little appliance ?!?

http://www.ultimatedeployment.org/

...or just use this appliance and the webservice to get a simple pxe-vm that serves different iso...

will try it tomorrow....

regards
Rene
Kyle Clark
Occasional Advisor

Re: PXE Boot Image from an ISO

Well the fun begins again with FW 9.00 which is totally different. This will require the initrd to be extracted and then a separate lzma archive of the filesytem to be extracted.

What I saw in my environment was that dhcpcd will return good with an IPV4LL address which basically stops us in our tracks. To make a long story short I modified /root/compaq/netconfig.sh to check for the IPV4LL address and kill it and move to the next device if found. Appears to be working fine on my end. Also changed the delay to 10 seconds for dhcp.

The other thing I noticed is that this one automatically kicks off updates and reboots automatically without intervention. I have not looked to see if there is a switch to change this on the pxe command line but will as I get more time.

The following is what changed in the netconfig.sh file.

Original dhcp section:
if [ $PROTOCOL == "dhcp" ]; then
echo Attempting to configure $1 using DHCP
dhcpcd -t 45 $1
TEMP=$?
echo return from dhcpcd $TEMP
if [ $TEMP != 0 ]; then
RETVAL=2
fi

New with rem'd out retval and other check:
if [ $PROTOCOL == "dhcp" ]; then
echo Attempting to configure $1 using DHCP
dhcpcd -t 10 $1
TEMP=$?
# echo return from dhcpcd $TEMP
# if [ $TEMP != 0 ]; then
# RETVAL=2
# fi

# Check if IPV4LL address and move to next if found
if [[ $(ifconfig |grep -c "169.254") -ge 1 ]]; then
RETVAL=2
ifconfig $1 down
else
echo
fi

Enjoy!
Peter Capriccio
Frequent Advisor

Re: PXE Boot Image from an ISO

Standing on the shoulders of giants (aka Kyle), I took a slightly different (aka "lazy") approach...

It turns out that the version of dhcpcd they are using has the "-L" option implemented (-L, --noipv4ll = Don't use IPv4LL), although you'd never know it from its "usage" output (I found it at: http://www.daemon-systems.org/man/dhcpcd.8.html ). So, I just modified netconfig.sh by adding a "-L" (NOTE that your timeout change made a lot of sense to me, but it seems to be too short in my environment because it times out every 2 out of 3 boots when I set it for 10 seconds):

# diff root/compaq/netconfig.sh root/compaq/netconfig.sh.original
43c43
< dhcpcd -L -t 45 $1
---
> dhcpcd -t 45 $1

Also, since I didn't want to figure out how to correctly unpack, update, and repack the lzma tarball (can you say "lazy"?), I looked for an easier way out. For whatever reason, they have a copy of netconfig.sh in the initrd and in the lzma tarball. When the "init" script in the initrd runs, it unpacks the tarball which I'm guessing overwrites the netconfig.sh from the initrd. Anyways, what I did was to edit the copy of netconfig.sh in the initrd and modified the init script (also in the initrd) to exclude extracting the copy of netconfig.sh in the tarball:

# diff init init.original
12c12
< /bin/busybox unlzma -c /fs.tar.lzma | /bin/busybox tar -xf - --exclude root/compaq/netconfig.sh
---
> /bin/busybox unlzma -c /fs.tar.lzma | /bin/busybox tar -x

You didn't mention it, but I assume our nemesis "bootrun" gave you heartburn the same way it did to me. It is still around, but doesn't appear to be in the lzma tarball (only in the "top" of the ISO at "_autorun/bootrun"), but somehow it is getting placed into "/usr/bin" as well. The good news is that it doesn't seem to be getting executed from "/usr/bin", so I only commented out that section in the "_autorun" directory (it causes a problem when I boot from an unmodified DVD, but maybe it is not an issue otherwise?).

The last thing you mentioned was the automatic update mode and you are correct -- there is a new kernel line option that appears in the pxelinux.cfg file named "TYPE" -- just set it for whatever mode you want or leave entries for both (ie: TYPE=AUTOMATIC for, uh, automatic mode or TYPE=MANUAL for interactive mode).
Kyle Clark
Occasional Advisor

Re: PXE Boot Image from an ISO

Peter, oustanding work as usual! BTW, I was the lazy one and didn't want to dig through everything. LOL

Kyle Clark
Occasional Advisor

Re: PXE Boot Image from an ISO

Can anyone else verify Peter's changes on a BL685c G5/G6? I am running into issue with it locking up after expanding the initrd. Works on all my other half height blades and standalone DL385 servers.
Kyle Clark
Occasional Advisor

Re: PXE Boot Image from an ISO

Problem identified. It appears the "mem=" statement must be removed for this version. Will work with systems less than 64G but if it has 64G or better the statement must be completely removed.
vancec
New Member

Re: PXE Boot Image from an ISO

Hi Everybody,

I got FW 8.70 and SS 8.30 working 8 weeks ago with help for all your posts.

Now onto 9.0 and hopefully it has P812 support.

What I did notice is that there is an actual guide and it has PXE booting info for 9.0:
ftp://ftp.hp.com/pub/c-products/servers/management/smartstart/FWUsersGuide9.00.pdf

The auto run will be a great help, my fingers need a break.

But, does anybody have any ideas on how to get logs from this? Would be nice to know if things failed. I guess you could ftp/mail it if you could figure out were to put the script. I do 20-75 systems in a stretch.

best,

Vance
Peter Capriccio
Frequent Advisor

Re: PXE Boot Image from an ISO

Well I'll be a monkey's uncle -- RTFM! :)

Using the method in the manual worked for me on the first try, however, that was on the first NIC (eth0) -- as soon as I booted from the second NIC, I hit the same wall that Kyle discovered. I'm a little puzzled about the whole "bootrun" file thing, because I swear it forced "eth0" to a static IP, but that was when I was booting from the physical DVD, so it looks like I've been chasing my tail on that one. Also the "media=network" boot parameter does not seem to apply to these later releases -- leaving "media=cdrom" seems to work fine.

Overall, I think this is good news -- we should just have to modify the initrd without having to touch the ISO, and better still, if this is now considered a "supported" method, maybe we will have a mechanism to report these types of problems to the developers.

Regarding the "auto run" mode -- the only thing I could find in the manual is a mention of passing "console" as a boot parameter in the "Special modes" section, but it seems to only apply to a blade server environment. When I tried it, all I got was a blank video screen. If I use something like "console=ttyS0,9600", I do get an interactive shell on the serial port along with the "normal" automation mode display on the video display, but the video session doesn't seem to behave any differently -- it still just reboots when it is done, leaving you in the dark as to what was done if you aren't babysitting it (guess that is why it is called "automation" mode, but it leaves a lot to be desired regarding the reporting in offline mode).

Anyhow, thanks Vance for the pointer to the manual...
Arco van Geest
Frequent Advisor

Re: PXE Boot Image from an ISO

I tried the options from the manual. It's probably a small typo or something.
I get an error saying /mnt/10.15.90.102/dist/hp/fw900/FW900.ISO is not a directory. Changing the case of ISO didn't work.

label vsos900
MENU LABEL Interactive Firmware Update Version 9.00
kernel /hp/fw900/vmlinuz
append initrd=/hp/fw900/initrd.img media=cdrom rw root=/dev/ram0 ramdisk_size=257144 init=/bin/init loglevel=3 ide=nodma ide=noraid pnpbios=off vga=791 splash=silent showopts TYPE=MANUAL iso1=nfs://10.15.90.102/dist/hp/fw900/FW900.ISO iso1mnt=/mnt/bootdevice
wrigtim
New Member

Re: PXE Boot Image from an ISO

Just an FYI - for those that would like to use a DNS name for the NFS server in the iso1 parameter (we do, as I just want to point this at our GSLB rather than a specific region's NFS servers).

I've hacked support in by...

1) Extracting initrd.img/fs.tar.lzma
2) Copy libnss_dns.so.2 to /lib64 (I used a copy of the library from SLES 11)
3) Re-pack everything
4) Set iso1=nfs://buildserver.xx.com/path

I've requested DNS support goes in to the next version via our HP account team.
Kyle Clark
Occasional Advisor

Re: PXE Boot Image from an ISO

Please have your HP contacts implement Peter's aforementioned fixes as well if possible. Especially the -L for dhcp etc.

Thanks!
J. Muellers
New Member

Re: PXE Boot Image from an ISO

wrigtim, can you give a hint where I can download that missing libnss_dns.so.2 ?

I tried the x86_64 version from http://download.opensuse.org/distribution/11.0/repo/oss/suse/x86_64/glibc-2.8-14.1.x86_64.rpm but now get "Segmentation Faults" as soon I do DNS lookups.


This is the libc FW900.2010_0403.93.iso uses:

# ./libc-2.9.so --version
GNU C Library stable release version 2.9 (20081117)
...
Configured for x86_64-suse-linux.
Compiled by GNU CC version 4.3.2 [gcc-4_3-branch revision 141291].
Compiled on a Linux 2.6.27 system on 2009-02-20.
Available extensions:
crypt add-on version 2.1 by Michael Glad and others
GNU Libidn by Simon Josefsson
Native POSIX Threads Library by Ulrich Drepper et al
BIND-8.2.3-T5B
wrigtim
New Member

Re: PXE Boot Image from an ISO

Hmmm I still have my re-compiled version of Busybox in the image too (I thought I'd backed it out). I've chucked my current image online if it helps - it was one of those late night sessions where I didn't really keep track of the changes I was making while trying to get it working...

http://www.binbash.co.uk/downloads/su9-wrigtim.img
http://www.binbash.co.uk/downloads/su9-wrigtim.img.md5

I'm writing the "RFE" email to HP as I speak...
Khang_VNG
New Member

Re: PXE Boot Image from an ISO

Hello Madis,

I used your quick guide to config smartstart 8.3 run on Network, but it failed

When I run smartstart from PXE, I could login smartstart shell use Alt+F1 (run some commands as fdisk or ifconfig ...). But smartstart could not start GUI, it was hung, I only saw blue backgound and mouse

please help me to fix this error

Thanks so much

KhangHV
agouny
New Member

Re: PXE Boot Image from an ISO

Quick summup I've put up for version 9.00:

mount ISO: mount -o loop,ro /path/to/ISO /mnt
copy kernel: cp /mnt/system/vmlinuz /tftpboot/hp/vmlinux-
create tmpdir: mkdir /tmp/initrd
extract initrd: cd /tmp/initrd && cat /mnt/system/initrd.img | gunzip | cpio -idm

vim /tmp/initrd/root/compaq/netconfig.sh :
- line 43: replace "dhcpcd -t 45 $1" by "dhcpcd -L -t 15 $1"
- (optional, if you know which interface has the DHCP) line 76: replace "NET_DEVICE=auto" by "NET_DEVICE=eth2"
- line 77: replace "PROTOCOL=undef" by "PROTOCOL=dhcp"

vim /tmp/initrd/init :
- line 12: replace "/bin/busybox tar -xf" by "/bin/busybox tar -xf - --exclude root/compaq/netconfig.sh"

re-package: cd /tmp/initrd && find . -print | cpio -o -H newc --reset-access-time | gzip -9 > /tftpboot/hp/initrd-.img


- Aurelien.
Peter Capriccio
Frequent Advisor

Re: PXE Boot Image from an ISO

With the SmartStart v8.50 release, we seem to be facing the same problem as the Smart Update Firmware v9.00 with regards to dhcpcd (by the way, SmartStart v8.40 does as well, in case it hasn't been mentioned before). Since we've got a handle on that situation, they felt it necessary to throw us another curve ball :) -- all the details can be found here:

http://forums13.itrc.hp.com/service/forums/questionanswer.do?threadId=1438546

Anyways, attached are my notes regarding my attempt at a workaround.

In addition, I made a slight change to the way the dhcpcd timeout value is handled. Originally, I had set it for 10 seconds per Kyle's fix, but depending on the circumstances, it would sometimes timeout on a legit network with a DHCP server on it. Playing it conservatively, I just set the timeout back to 45 seconds. However, when I ran into a system with a lot of network adapters and was not booting from what the Linux kernel considers the "first" adapter, waiting the 45 seconds for each port to timeout is painful. I saw that Aurelien used 15 seconds and thought I would give that a try, but doing the whole unpack-modify-repack of the initrd gets old for trial and error testing. So, I modified "netconfig.sh" to look for a parameter passed from the boot command line (stole it from "hp.sh"), so that way I can change it "on the fly" (either by editing the "default" file or by hitting the "Tab" key from the PXELINUX boot menu). Note that if the "dhcpcdto={some-value}" parameter is not present on the boot command line, the modified "netconfig.sh" just reverts back to its default of 45 seconds (or whatever you decide to hardcode it to).
Barney Jones
Occasional Advisor

Re: PXE Boot Image from an ISO

Dear HP Hardware Engineering and Firmware Engineering,
Here is a novel idea, why don't the two of you get together and build in PXE support to your Firmware update discs.

SIncerely yours,
User.
Barney Jones
Occasional Advisor

Re: PXE Boot Image from an ISO

Dear HP Hardware Engineering and Firmware Engineering,
Why don't the two of you get together and build in PXE support to your Firmware update discs.

SIncerely yours,
User.
Bill Streeter
Advisor

Re: PXE Boot Image from an ISO

I haven't seen any issues with running these off an untouched ISO from a PXE server.

Of course, I only boot off the first NIC and require no network access during the updates/firmware testing.

As far as I can tell with the Smart Start, I'm able to access network shares on my file server to load the operating system from the network. I haven't torn apart any initrd's, config files, or anything else.
Barney Jones
Occasional Advisor

Re: PXE Boot Image from an ISO

If I understand correctly, Smart Start is used mainly for installing the operating system and running diagnostics, but the firmware update CD is a completely different disc.

I guess the main issue is running the firmware update CD, and the issue that you have to download and re-package the firmware update CD to get the latest updates. You could enhance the firmware update CD to pull latest from the network as an option, no?