ProLiant Deployment and Provisioning
1829508 Members
2283 Online
109991 Solutions
New Discussion

PXE Boot Image from an ISO

 
shocko
Honored Contributor

Re: PXE Boot Image from an ISO

Hey Guys,
Just an update for anyone who's interested. I have successfully implemented to 2 main methods here of providing smartstart/firmware CD functionality via PXE.

The only difference in my setup was that i had to use a windows box for NFS sharing. I used Windows Service for Unix. The steps are outlined below for anyone interested in using NFS. As stated you could use CIFS/SMB but i wanted to try out NFS.

- Install SFU
- Create a local account on the server called nfsuser
- Extract the group/passwd files from the initrd.img on the original .iso
- Map the nfsuser account ot the root account using SFU
- Share out a folder using the NFS Sharing tab on its properties.
- Using standards TFS security assign nfsuser at least read/read and execute permissions (as the linux root account will be mapped to this ;)
- Specify the path to this share in your pxelinux.cfg file, as outlined by peter, and done!

Verified this with 8.10/8.00 of smart start.
If my post was helpful please award me Kudos! or Points :)
Jason Kates
New Member

Re: PXE Boot Image from an ISO

With 8.0 I was able to use the suggested patch to the iso to automate the install.

The fix to automate the install via:
cd ${MNTPT}/compaq/swpackages/
./hpsum -express_install -reboot
cd /bin/
./reboot -cold


I am attempting to move to the 8.3 firmware CD now. This doesn't seem to work with the change in I end up with a bash-3.1# prompt. I see the hpsum when I rebuild the CD but it doesn't seem to be visible via the pxe boot.


Thanks -Jason
Jason Kates
New Member

Re: PXE Boot Image from an ISO

I found my issue. I didn't have enough space on the ram disk. I had set the ramdisk to 127464. It turns out that was too small, thus the missing files. I expanded the ram disk to 290000 and it's running again.

Thanks -Jason
shocko
Honored Contributor

Re: PXE Boot Image from an ISO

Hey Guys,
Just a quick one for you as this has been driving me mad the last couple of days. I'm using HP ALtiris Pxe sevrer and my PXE boot meu is full up so i cant add in new options. What i wanted to do though was just have one option for all HP Firmware/SmartStart and then use pxelinux menu.c32 to provide a menu system once booted to pxelinux. I changed my default config file to this as a test:

default menu.c32
prompt 0
menu title My test pxe menu

label fw830
menu label fw830
menu default
kernel vmlinuz-8.30
append initrd=fw830.img rw root=/dev/ram0 loglevel=3 ramdisk_size=320000 init=/bin/init ide=nodma ide=noraid pnpbios=off splash=silent showopts iso1=nfs:///NFSROOT/Firmware/FW830.iso


The problem is, it boots into pxelinux and displays the menu but when i hit enter on this only menu item there, nothing happens??!!

ANy of you guys done somehting similar? cant see whats going wrong here.
If my post was helpful please award me Kudos! or Points :)
Arco van Geest
Frequent Advisor

Re: PXE Boot Image from an ISO

Is this your whole file?
I think you should have something like:

prompt 0
default menu

label menu
kernel menu.c32

label fw830
menu label Firmware 8.30
kernel vmlinuz
append initrd.........etc
shocko
Honored Contributor

Re: PXE Boot Image from an ISO

Unfortunately that yeilds the same result!
Strange as i have followed the documentation on the syslinux website.

I think i may be getting an error about an invalid option in the default file but i have check my syntax and all looks ok
If my post was helpful please award me Kudos! or Points :)
Peter Capriccio
Frequent Advisor

Re: PXE Boot Image from an ISO

I think your menu entry might be okay, although I'm not sure which takes precedence, the "default menu.c32" statement or the "menu default" statement (I wouldn't think you could have more than one default). If the "default menu.c32" is acting as the default, then I think it might be a path problem to your kernel -- if you select your firmware entry and it returns to the menu, then it is likely it couldn't find the file or something related to that so it reloads menu.c32 (at least that has been my experience). You can test this by booting to the menu and then edit your "pxelinux.cfg/default" file (add a temporary label or change the title, etc) and then select the firmware entry and see if the menu reloads with the changes.
shocko
Honored Contributor

Re: PXE Boot Image from an ISO

Hi peter,
Yes i agree that it appears to be a path proble. Problem is, i have copied the kernel throughout the directory structure as a test and it still doesn't pick it up.

I have even copied in the latest pxelinux.0 file from.

Starnge problem. I'd love to get this going as everything else is running smoothly thanks to you guys here at this thread!! ;)
If my post was helpful please award me Kudos! or Points :)
Arco van Geest
Frequent Advisor

Re: PXE Boot Image from an ISO

you can test with the tftp client if you can download the kernel and ramdisk.

You can also try to rename the kernel to something without extension. All unknowns extensions are treated as a kernel but you can never be sure enough.

From the pxelinux prompt it should be possible to start the kernel with "vmlinuz.830"
Arco van Geest
Frequent Advisor

Re: PXE Boot Image from an ISO

For people without linux affinity there is another way. Use Windows PE.

In short this is the procedure:
PREPARATION:
- use the Microsoft WAIK (Vista/2008)
- create boot.wim
- inject the proliant drivers
- make it available by cd or PXE/WDS
- put the firmware CD on a windows share
- put ilo drivers on the same share

AFTER BOOT:
mount the share on T: (for example)

t:
drvload cpqrib2.inf
drvload CpqCiDrv.inf
drvload hpqilo2.inf

cd compaq\swpackages\
hpsum.exe



shocko
Honored Contributor

Re: PXE Boot Image from an ISO

Hey Arco, i used to use the WinPE method for my firmware updates but the only reason i changed was that the linux based method seems a lot quicker (in my experience the wim images can get quite large ;)

On the other issue, tried removing all extensions o the vmlinuzX files and also, i can run them directly from the prompt.

Strange. Still cannot slect them from the menu.c32 menu system.

Thanks for your help!
If my post was helpful please award me Kudos! or Points :)
martymcfly1955
Advisor

Re: PXE Boot Image from an ISO

I was wondering if we could take these same principals and apply them to the hp insight offline diagnostics iso? I have very rudimentary linux skills and its beyond me as several attempts at reworking the instructions for this iso have been fruitless ;(
Arco van Geest
Frequent Advisor

Re: PXE Boot Image from an ISO

Can you point me to the download?
CamScott
Advisor

Re: PXE Boot Image from an ISO

Hi martymcfly1955,

In short, Yes.

The latest version I've done this for though is 8.1.100.2677 (11 Jun 2008).

http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en&cc=us&prodTypeId=15351&prodSeriesId=3577708&prodNameId=3577715&swEnvOID=1005&swLang=8&mode=2&taskId=135&swItem=MTX-18478c431597437684c412f795

Because the .iso is so small (<90MB) you can fit everything within the one boot file.

The steps are:
- mount the .iso
- copy the initrd.img and vmlinuz files from the .iso/isolinux/ directory to your working directory
- unmount the .iso
- rename, unzip, then mount the initrd.img file
- edit the initrd.img/root/compaq/cdrom.sh file, line 126, replace '-o ro /dev/cdrom' with '-o loop,ro /mnt/HP-Offline.iso'
- create a bigger version of the initrd.img file (200MB is plenty) as explained in previous scripts
- mount the bigger initrd.img file
- copy the original .iso to initrd.img/mnt/HP-Offline.iso or whatever name you put in the cdrom.sh file.
- unmount the initrd.img file
- copy the initrd.img and vmlinuz file to your tftpboot directory.
- the entry in the pxe server configuration file for this image must have BOOT_IMAGE=vmlinuz_filename in the append line along with the normal entries.

Hope this helps. If you get stuck I (or one of the Linux gurus) can create a script to do most of the above for you.

Cheers,
Cam
shocko
Honored Contributor

Re: PXE Boot Image from an ISO

Hey guys, i have had some time in the last day or 2 to do some testing around the problem i was having with menu.c32 and my Altiris RDP solution. Basically, i wanted to create a menu system using pxelinux for all HP tools so that i wouldn't have to create a boot menu item for each firmware/smartstart cd but rather a single entry that would load menu.c32 and provide our staff with a gui to choose which package to load. problem is, it dont work!!

Here is the content of my directory on the pXE server:

menu.c32
MenuOption161.0
pxelinux.0
| - pxelinux.cfg
rdss790.gz
ss790.zi

and the contents of pxelinux.cfg
default

The default file has the following contents:

default menu.c32
prompt 0

menu title PXE Special Boot Menu

LABEL SS790
MENU LABEL ^SS790M
kernel ss790.zi
append initrd=rdss790.gz media=network rw root=/dev/ram0 ramdisk_size=111088 init=/bin/init loglevel=3 ide=nodma ide=noraid pnpbios=off splash=silent showopts iso1=nfs:///NFSROOT/Smartstart/SS790.iso

The problem is that when pxelinux.0 loads it initially loads menu.c32 and displays a single menu option namely 'SS790'. But, when i select this entry and hit return, nothing happens, the screen just flickers and it returns to this menu system. If i press the escape key and type ss790.zi at the 'boot' prompt it loads the kernel.

I'd love to get this working as it would save me a lot of work as my altiris boot menu is full. I cant understand why it does not work as i have followed th guide at

http://syslinux.zytor.com/wiki/index.php/PXELINUX#Custom_Menu_Example_with_sub-menus

If my post was helpful please award me Kudos! or Points :)
Peter Capriccio
Frequent Advisor

Re: PXE Boot Image from an ISO

This usually indicates that PXELINUX cannot find the kernel file -- since "menu.c32" is the default, if it cannot find the menu entry you have selected, it uses "menu.c32" as the "kernel" entry (with the "default" file as the "append"). It is strange though that you can type it in at the "boot" prompt and it finds the kernel file. If you hit the "Tab" key at the menu, the kernel name and append line should display (allowing you to edit it) -- does it look right? Any typos (not to be *too* anal, but there is an errant "M" at the end of your menu label)?

To rule out a problem related to "menu.c32", you can eliminate it to see if it finds the kernel -- for example, edit your "default" file to look like:

#default menu.c32
default SS790
prompt 0

menu title PXE Special Boot Menu

LABEL SS790
MENU LABEL ^SS790M
kernel ss790.zi
append initrd=rdss790.gz media=network rw root=/dev/ram0 ramdisk_size=111088 init=/bin/init loglevel=3 ide=nodma ide=noraid pnpbios=off splash=silent showopts iso1=nfs:///NFSROOT/Smartstart/SS790.iso

One more thing -- what version of PXELINUX are you using and which TFTP server?
shocko
Honored Contributor

Re: PXE Boot Image from an ISO

OK, i decided to actually attack this properly. I took Peters ( :) ) advice and found out what version of pxelinux Altiris RDP builds into it's menu items by simply watching the banner display as the pxe image loads. Its version 2.13! This version doesn't support the MENU tags in the config file so the menu.c32 will not work!

;)

I should have checked the version and the documentation and i would not have wasted so much tie with this! Lesson learned! ALWAYS find out what version of a system you are using and what it CAN and CANNOT do.

The next problem was where to update my altiris installation to update the pxelinux.0 file to a version that did support menu.c32. Well by running filemon.exe (thank you mark and the guys at winternals :) ) i was able to see that the file bstrap.0 was loaded at boot (obviously the pxe bootstrap folder) and then it loaded a specific file called menuoption161.o when I selcted HP tools menu option from my pxe boot menu. I did a MD5 hash of this file and compared it to an MD5# of pxelinux.0 from sysl;inux 2.13. Guess what, they are the same and also have the same file size. Swapped in pxelinux.0 version 3.72 and renamed the file to menuoption161.0 and hey presto it all works!

Thanks so much Peter for pointing me in the correct direction and thanks to all on this thread. It is one of the most useful threads i've come accross in the course of my work with RDP.
If my post was helpful please award me Kudos! or Points :)
shocko
Honored Contributor

Re: PXE Boot Image from an ISO

Hey Guys,
Just wondering if it is possible to specify a sub directory of a usb key to the kernel i.e. I am trying to get the smartstart/firmware image onto a single USB. The default append line on the uSB key is

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

SO this tells the kernel to mount the USB key. Subsequent smart start scripts will use the USB top level as a basis for finding sub folders. The proble is that both firmware/smartstart use the same folder structure and so cant co-exists on the same key unless there is some way of telling the kernel to mount the USB stick root as USB/Firmware or USB/SmartStart.

I was going to try and modify the init script to do this but if there is a way to do this on the append line in the default config file that would be even better!

I was thinking i could change this line in supermount.sh:

mount -t vfat ${device}
to
mount -t vfat ${device}/firmware

Will that work?

If my post was helpful please award me Kudos! or Points :)
forhad12
New Member

Re: PXE Boot Image from an ISO

Thanks CamScott. I am trying to boot the latest offline diagnostic from my pxe server. I followed your instructions. But could not get this working. I am getting this error. Kernel panic -not syncing: VFS: unable to mount fs on unknown-block(a,0)

Here what I have on pxe configuration file

LABEL HP INSIGHT DIAGNOSTICS
KERNEL vmlinuz-hp
APPEND initrd=hpdiag.img root=/dev/ram0 loglevel=3 ide=nodma ide=noraid pnpbios=off media=usb

Thanks
Forhad
shocko
Honored Contributor

Re: PXE Boot Image from an ISO

Hey forhad12, i got this working but i think your append line is wrong:

LABEL HP INSIGHT DIAGNOSTICS
KERNEL vmlinuz-hp
APPEND initrd=hpdiag.img root=/dev/ram0 loglevel=3 ide=nodma ide=noraid pnpbios=off media=usb

Should be

LABEL HP INSIGHT DIAGNOSTICS
KERNEL vmlinuz-hp
APPEND initrd=hpdiag.img root=/dev/ram0 loglevel=3 ide=nodma ide=noraid pnpbios=off BOOT_IMAGE=vmlinuz-hp

Cam does mention that in his post ;)
If my post was helpful please award me Kudos! or Points :)
forhad12
New Member

Re: PXE Boot Image from an ISO

Thanks Darragh O'Shaughnessy for your quick reply. I am still getting the same error. I think I did something wrong somewhere. If it is possible can please upload your version of image somewhere. If it is not possible can you tell me how did you get that working. I am a newbie in Linux. And I am using ubuntu.

Thanks in advance.

Forhad
shocko
Honored Contributor

Re: PXE Boot Image from an ISO

Hey, i'm pressed for time as it's 19:20 here but i implemented mine as a script so i'll upload the script 2moro ;)

Could you tell me which version of insight offline diagnostics you are running??

Also,did you use the md5 hash checksum to verify the download was fully intact?

I can't remember how times i have downloaded stuff from the hp website thorugh our proxy server and the check sum hasn't matched (i.e. the packed isn't intact)

Make sure you use the checksum on the download page to verify the package

If my post was helpful please award me Kudos! or Points :)
shocko
Honored Contributor

Re: PXE Boot Image from an ISO

More to the point your append line should look like this (obviously your ramdisk file may be named differently ;):

append initrd=initrd.img rw root=/dev/ram0 ramdisk_size=300000 init=/sos quiet ide=nodma loglevel=2 pci=nommconf vga=0x317 BOOT_IMAGE=vmlinuz-hp

This is taken from the syslinux.cfg file within the origianl iso
If my post was helpful please award me Kudos! or Points :)
ElectroPhil
Occasional Advisor

Re: PXE Boot Image from an ISO

Cam,

Can you update your script to use 8.20 and post it here? I attempted to replace all 8.10 references in your script, but i was unable to get it past loading the initrd...

It gets to loading it..and says "ready" and then just sits there.

Here is the output in case you see anything odd:
The Smartstart firmware iso was found.
rsync was found.
mkisofs was found.
sed was found.
mke2fs was found.

Copying the contents of the iso in order to create a trimmed down version.
Removing extra files to reduce the size of the trimmed iso.
rm: cannot lstat `isoTrimmed/compaq/swpackages/*.tgz': No such file or directory
rm: cannot lstat `isoTrimmed/compaq/swpackages/*.bin': No such file or directory
Removing the initrd.img and vmlinuz files from the image.
Creating trimmed down iso file.
Creating a large (320MB) initrd.img file.
Making necessary changes to supermount.sh.
Merging the trimmed iso into the new large initrd.img file.

** Finished creating fw820.img and vmlinuz-8.20!
** Please copy these to your tftpboot directory!

Finish at
Wed Feb 4 03:27:25 PST 2009

** Append the following to your default pxelinux configuration file
label fw820
kernel vmlinuz-8.20
append initrd=fw820.img rw root=/dev/ram0 loglevel=3 ramdisk_size=320000 init=/bin/init ide=nodma ide=noraid pnpbios=off media=usb CDVOLUME=HPFWUP820