ProLiant Deployment and Provisioning
1829102 Members
2482 Online
109986 Solutions
New Discussion

PXE Boot Image from an ISO

 
e o'rourke
Advisor

Re: PXE Boot Image from an ISO

HI Cam,
Excellent work all round herre i must say! I am using altiris pXE server with Rapid Deployment pack.

I followed all your instructions. It loads up the linux image and the firmware but just stays on a blue screen

There is no supermount.sh in the CD .ISO?? yet it is referenced in the script??
CamScott
Advisor

Re: PXE Boot Image from an ISO

Hi e,

supermount.sh is located within the expanded initrd.img file. When you view the script the details are in the "# Create a big initrd.img" section. If you unzip and mount the initrd.img file, supermount.sh is in the /root/compaq/ directory.

If you ran the script and got no errors, could you tell me the size of the final image created by the script?

Cheers,
Cam.
e o'rourke
Advisor

Re: PXE Boot Image from an ISO

Apologies Cam,
I am a linux newbie and made some rookie mistakes whilst running your script!

Firstly, it was running the mount of initrd.img as there was some hidden ^m caracters in the .sh file! This is probably because i downloaded your .sh file in windows then copied in into a VM running ubunto. I used the 'vi' command from bash to strip out any ^m symbols. I ran your script (removing all &>/dev/null for verbose output) and i have attached the output from BASH. It seems to be having some problems with 'losetup' part towards the end. COuld this affect it?? I am then trying to boot from my Windows Altris RDP server. I can attach a .avi of the actual PXE boot if this would help. It gives a lot of erros abbot symbolic links not being found etc.

PS: I greatly appreciate any help from people on these formums. I am eager to learn and appreciate how silly some of these questions might be to you linux guru's!!
CamScott
Advisor

Re: PXE Boot Image from an ISO

Hi e,

I'm guessing that the ^m characters appeared after you opened the file in windows and then saved it!?!? I tried downloading the file I previously attached in this forum and copying it directly to a linux box and I didn't see any ^m characters. That may be a cause for some issues.

I don't get the same output for the first losetup line you do. Yours appears to indicate the output you get when there is an error in the command line, or no options have been passed to losetup. The script is not very good for error checking, if there is an error it just chugs along. Something to work on for future versions of the script.

I'm not sure how altiris passes the kernel options, so that may be another source for your problem.

If you could attach the script your now using that may help. The .avi file won't hurt either.

Cheers,
Cam.
e o'rourke
Advisor

Re: PXE Boot Image from an ISO

Hi,sorry for the delay in updating this.
It's working now!!!

Ok, i managed to bridge the network connection between my host and vmware Ubuntu build. I downloaded the shell script file from this forum and saved it to the desktop. I copied it using the GUI and renamed it to myscript.sh also changing the permissions on the file to allow execution from the terminal. I use the command sudo bash to enter bash shellas an admin then change my working directory to the desktop. I then run
vi ./myscript.sh and get the output in screen shot vi-myscript.sh.png

Notice all the ^m symbols. These of course prevent the script for executing properly so i remove them all from within the vi editor (I'm still not sure why they are being inserted). So.. i manually take them out using the vi editor (I'm sure i could do a reg exp search but just to be sure) and I'm left with normal formatting. I made no other changes. So this time i again ran the script and it created the following:

vmlinuz-8.10 : 1.6 MB (1716370 bytes)
fw810.img : 189.4 MB (198651747 bytes)

I copy these over to my Altiris PXE server and use the following default file:
default fw810

label fw810

kernel vmlinuz-8.10

append initrd=fw810.img rw root=/dev/ram0 loglevel=3 ramdisk_size=320000 init=/bin/init ide=nodma ide=noraid pnpbios=off media=usb CDVOLUME=HPFWUP810

Tried it out on a HP bl460c and it worked first time!!.

Thanks you very much CAM. Obviously the ^M characters were the problem. Just posting this so anyone as naive as myself wont get caught with the same problem ;)

Note: I still get some messages about symbolic links not being valid but I'd imaging that is due to certain files being ripped out to reduce the size of the RAMDISk.

Next project will be to try and get both the smartstart & firmware running of a single USB key

Again, thanks CAm for taking the time to help.
willbrown
Occasional Advisor

Re: PXE Boot Image from an ISO

Hello,
I have successfully got this working over nfs with firmware maintenance versions 7.50 onwards.

There was a suggestion about using a knoppix type cd, well I tried this and it works - almost.
Booted from Knoppix V5.3, and set up samba share to a directory holding the compaq directory files from a FM790 CD and then ran ./hpsum via a script.
HP Smart Update mamager runs fine.
I can update motherboard, raid, network fine.
Unfortunately, because no driver exists for the iLO, I am prevented from doing this update.

Does anyone have any ideas how to make an iLO driver for knoppix, I do realise it is a knoppix issue really. But this is what I have tried. Downloaded both the debian3.1 Sarge x86 and Debian4 Etch HP proliant software deb packages.
1 - hpasm compiled and appeared to install OK
2 - hpasm compiled and appeared to install OK
3 - hprsm failed, with error "failed to rebuild for custom kernel"
What I am really asking here is, is there any other way of obtaining an iLO driver which will work under this build?
A google search shows there are other HP iLO drivers around but I am stuck on how to use/install them ie here: http://lwn.net/Articles/286434/

This idea does have some merits, hopefully the firmware share directory could simply have the new bios files added when a new version is released. I have some experience of re-mastering knoppix and simply have the upgrade function as a menu option.


Sorry for the long mail
CamScott
Advisor

Re: PXE Boot Image from an ISO

Hi willbrown,

Try copying the .scexe files from the smartstart firmware iso that start with a lower case cp, there are only a few. Most have an uppercase CP. I noticed that whenever I didn't put these files in my firmware repository, I wasn't able to update the ILO. Hope that helps. i.e. cp005604.scexe, cp006590.scexe, cp007797.scexe, cp008924.scexe.

Cheers,
Cam.
Arco van Geest
Frequent Advisor

Re: PXE Boot Image from an ISO

In initrd.img in /root/compaq are scripts with names like load_drivers.sh. You can peek inside them to see if the ilo drivers are loaded there.

/root/compaq/compressed/usr.iso is another place to search for it.
willbrown
Occasional Advisor

Re: PXE Boot Image from an ISO

Thanks for the quick replies

Cam, I have added these files but still get the same problem.
The actual category is "No Device Driver Installed", then underneath the actual device is "iLO ROM Flash".
I still believe I need a device driver for the iLO.

Arco, I am having trouble expanding the initrd.img.
The first stage is fine "gunzip initrd.img" expands the file from 35m to 120M approx.
I then was planning on "mount -o loop initrd.img /somefolder" but I get a "mount: must specify a file type".
I tried ext2 & ext3 but here my knowledge runs out. Have I tackled this as you would expect?

Regards,
Arco van Geest
Frequent Advisor

Re: PXE Boot Image from an ISO

willbrown,

copy the initrd.img to a temp and rename it to initrd.img.gz . You can unzip it then.

cp initrd.img /tmp/initrd.img.gz
gzip -d /tmp/initrd.img.gz

You can check with the "file" command what kind of file it is.

mkdir /tmp/mnt
mount /tmp/initrd.img /tmp/mnt

If the file is correct linux will use the magic to detect the filesystem type.

you should see files under /tmp/mnt, especially the /tmp/mnt/root/compaq directory.

Does this work for you and is this clear enough?
Peter Capriccio
Frequent Advisor

Re: PXE Boot Image from an ISO

Boy, I wish I had seen this thread a long time ago -- would have saved me a lot of work! Anyway, attached is yet another method for network booting SmartStart and ProLiant firmware ISO images for the lazy caveman -- the difference here is that you don't need to extract the ISO or modify any of its files (unless we are talking about versions prior to V7.91, if memory serves, but then it is just a modification to the "cdrom.sh" file within initrd.img).

As already mentioned in here before, the support is built-in for NFS access and if you pass it the path to the ISO and set the media to "network", it will automatically loopback mount it (see "supermount.sh"). I've never tried it, but "mount_url.sh" shows support for SMB/CIFS in addition to NFS, so I would think you could apply the same method but via a Samba share (or, heaven forbid, from a Windows-proper file share).

Now, the downside to this method is that you are dealing with the "static" ISO image, so you can't add updates (via .scexe files). Also, I'm curious to see what the performance is like when you extract the files as mentioned in the other methods versus the loopback mount, but I haven't heard any complaints so far. The other consideration is regarding the "unattended" updates -- I've never looked into using the firmware ISO for that, but the SmartStart Scripting Toolkit can do this.

Pete C.
Eric_141
Occasional Advisor

Re: PXE Boot Image from an ISO

Hi Dan:

I have followed your instructions for creating a PXE boot of the SmartStart 810 CD. The only difference is that I'm using an http:// rather than an nfs:// source for the .iso files.

Despite repeated attempts, I end up with the same result where I get errors about symbolic links just prior to the start GUI SmartStart interface. The GUI interface starts up and I end up with no images and none of the links work. The errors are as follows:

ldconfig: Can;t link /usr/X11R6/lib/libXRes.so.1 to libXRes.so.1.0

ldconfig: /usr/lib/libntfs.so.7 is not a symbolic link

a couple more similar errors, then

ldconfig: Can't link /usr/lib/libdfc.so.3

Did you get any of these errors? If so how do you get around it.

One other note: As compared to booting from CD, the resulting PXE booted version lacks a pop-up screen showing up asking to boot from the SS CD, or boot from HD, along with another screen showing a progess bar with the text "loading media".

Thanks in advance.
Eric_141
Occasional Advisor

Re: PXE Boot Image from an ISO

Sorry, that say Pete, not Dan!
Peter Capriccio
Frequent Advisor

Re: PXE Boot Image from an ISO

I don't think that http is supported as a transport -- "mount_url.sh" only mentions SMB/CIFS and NFS, however you could open a terminal session (Ctrl+F1) and see what is mounted (Ctrl+F2 will get you back to the GUI session). On the SmartStart releases, they startup X and a browser but expect the images to be on the CD (or from the secondary RAMFS that gets unpacked from the CD, I forget which) and so if you get the GUI with no images it is because the files on the CD/image are not mounted/accessible.

As far as the link errors, I get those as well (and they vary, depending on the release of SmartStart/Firmware), but it works despite of them (and being lazy, I haven't looked any further!).

Regarding the splash screen -- this is because we're loading via PXELINUX versus ISOLINUX/SYSLINUX that is on the CD. I suppose you might be able to integrate the image into your PXELINUX menu, but I'm not sure if you could have it display after you load the kernel. You can add the "boot from HD" option in your PXELINUX configuration file, for example:

label local
MENU LABEL Boot Local Device (per Controller Boot Order)
localboot 0

Hope this helps...
Mortimer_1
Occasional Advisor

Re: PXE Boot Image from an ISO

Has anyone tried to PXE boot the ProLiant Essentials Server Migration Pack P2P Boot CD using this method? It also seems to support NFS, I'm trying now but have some difficulties getting this to work in RDP.

Any help with this in combination with RDP is greatly appreciated!

Thanks
Eric_141
Occasional Advisor

Re: PXE Boot Image from an ISO

Hi Peter:

Thanks for the reponse. I've changed over to NFS instead of HTTP, but end up with the same problem, no icons and I cannot run the HP Insight Diagnostics Tool (the whole reason I'm going through this process). I've tested the NFS share and the .iso is visible.

I've tried a (CTRL+f1,f2,f3,f4,etc...) within the GUI of the smartstart with no access to any console. Any other advice would be great.

Thanks
Peter Capriccio
Frequent Advisor

Re: PXE Boot Image from an ISO

>I've tried a (CTRL+f1,f2,f3,f4,etc...) within the GUI of the smartstart with no
>access to any console.

My bad -- that should have read:

...you could open a terminal session (Ctrl+Alt+F1) and see what is mounted (Ctrl+Alt+F2 will get you back to the GUI session).

Sorry about that...

If/when you get to a terminal session, issue a "mount" command and see if your NFS share is mounted.

[see the attachment for an example -- it is what I see when using SmartStart V8.00]

Note that there are two entries related to the NFS share -- the first is the exported mount point (in my case, "/SS-0800") and the next is the loopback-mounted SmartStart ISO image (which resides in the NFS share).
Arco van Geest
Frequent Advisor

Re: PXE Boot Image from an ISO

We had some troubles with DHCP. When the DHCP-reply is close to 15 seconds a timeout can occur.
Without an IP, the image can't be mounted and the screen stays blank/grey.
A workaround for that could be a simple switch or *uch uch* a hub.
Eric_141
Occasional Advisor

Re: PXE Boot Image from an ISO

Excellent... I got it running. Thanks Peter! Once I saw that I had a mount problem, I realized that it was due to a syntax error. Muchly Appreciated!
Eric_141
Occasional Advisor

Re: PXE Boot Image from an ISO

Peter: Can you use the same methodology as you have outlined for SmartStart CD's with the Firmware CD? It seems that most of what I read requires modifying the initrd.img file to make it small enough. Is it likely that you can use the media=network switch and point iso1 to an NFS share... or something like that?
Peter Capriccio
Frequent Advisor

Re: PXE Boot Image from an ISO

Absolutely -- I'm using that same method here without having to modify the ISO image, that is, anything at version V7.91 or higher works -- if memory serves, prior to that version, you can use the same method, but you need to modify the "cdrom.sh" script in the initrd image (at least that is the way I did it) -- attached are some (hopefully not too cryptic) notes on how I did that (the notes are from a SmartStart image, but the same method and files applies to the ProLiant Firmware CD as well).
e o'rourke
Advisor

Re: PXE Boot Image from an ISO

Hi Guys,
This is such a useful/interesting thread! I have been using Cam Scotts excellent method to boot the Firmware CD's into ramdisk as i like the idea of loading the entire source onto the target server them not worrying about the network afterwards. However, i am still trying to understand fully the method involved. Maybe you guys could cast your eyes over the follwing and tell me if i'm 'getting it':

The method it seems is as follows:
1) Take the firmware iso and mount it.
2) Strip out any executables such as .exe's that will not be needed when running it from a linux os
3) Take out the kernel (vmlinux) and the initial ram disk (intird.img)
4) Created a new trimmed down .iso from the stripped down version. This .iso will not contain a vmlinuz/initrd.img file as these will be loaded by pxelinux when using pxe
5) Edit the initrd.im to make it large enough to hold the new stripped down iso.
6) Edit the file supermount.sh so that it mounts this new .iso when the kernel loads. This is the bit i dont fully understand. I presume when the kernel loads up the OS it calls the supermount.sh script. I juts little confused about why Cam you change the USBLIST? Is this because the kernel thinks it's being run from a CD?

Thanks in advance guys!
CamScott
Advisor

Re: PXE Boot Image from an ISO

Hi e o'rourke,

Yep that's pretty much it.

Depending on the options you set in the PXE configuration file (pxelinux.cfg/default) to send to the kernel (on the append line) the image will assume it is being loaded from that particular media. This is important because all file references will point to this predetermined location. So instead of trying to find all file references and trying to change them, just make the system think the USB media is being used.

In this case I've set media=usb so that all references will point to the predetermined mount point for the USB version of smartstart. I think I chose this in the beginning because I was using the USB version of the firmware update as a basis and I thought it would be easier to work with.

I think the way Arco and others have recompiled everything into one image and directly running the firmware update is much more efficient because you don't need to care about all this. :) I understand people wanting to just get the firmware update or adding new features, but I jsut want an easy way to convert the .ISO image into a PXE image whilst keeping the same structure etc, that HP put into these CD's.

Cheers,
Cam
shocko
Honored Contributor

Re: PXE Boot Image from an ISO

Hey Guys!!!
new to the forum (and to linux!!) been reading over the stuff here all this week and it has saved me a huge amount of time! Still a little unsure of a few things so i have attached my understanind of things (like e o'rourke!)

Maybe you could give me some feedback.

Thanks in adnvance.

PS: This is coll stuff!
If my post was helpful please award me Kudos! or Points :)
Peter Capriccio
Frequent Advisor

Re: PXE Boot Image from an ISO

Darragh,

It looks to me as if you've summed it up quite nicely. As you have stated, the advantage of using Cam's method is that you no longer need the network connection. Also, by extracting the contents (Cam, Arco, and Madis) it gives you the opportunity to pare out unnecessary stuff and/or add additional updates. For those of us that are more hypokinetic (like myself), I take the easy way out!

Since you have only Windows servers, you could try using an SMB share instead of NFS to serve out the ISO image -- "mount_url.sh" shows support for SMB/CIFS in addition to NFS. I've never tried it, but it looks like you should just have to modify the "iso1=nfs://..." section in the kernel append line on your PXE server. The "mount_url.sh" script states:

Description: mounts a smbfs/cifs or nfs volume when given the path in
url format

Where:
url - a url of the device to mount
examples:
smb://server/share/path/to/file
cifs://server/share/path/to/file
cifs:user:password@server/share/path/to/file
cifs://\\\\server\\share\\path\\to\\file
\\\\server\\share\\path\\to\\file
nfs://server/path/to/file

For example, in my case I would change:

iso1=nfs://192.168.1.254/SS-0810/SS810.2008_0814.85-x86.iso

to:

iso1=smb://192.168.1.254/SS-0810/SS810.2008_0814.85-x86.iso

Of course, you would have to make the appropriate path and/or authentication changes.