Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
linux options
2014-05-01, 16:38
Post: #1
linux options
I've got this ISO with a linux-based diagnostics tool and I'd like to boot it from the network using iPXE.

Here's the original boot configuration file (isolinux-based):
Code:
label ldiag
    kernel /live/vmlinuz
    append file=/live/filesystem.squasfs boot=live vga=791 initrd=/live/initrd.img ro quiet 2

I'd like to know how to translate that into a iPXE script, especially the "file" argument?
This is what I got
Code:
#!ipxe
set boot-path=http://srv1/lenovo-diags
initrd ${boot-path}/initrd.img
imgfetch ${boot-path}/filesystem.squashfs
kernel ${boot-path}/vmlinuz boot=live vga=791 ro file=filesystem.squashfs
boot vmlinuz

The kernel boots and the script inside initrd seem to run but after it complains it cannot find the filesystem...
Find all posts by this user
Quote this message in a reply
2014-05-02, 08:14 (This post was last modified: 2014-05-04 10:16 by MultimediaMan.)
Post: #2
RE: linux options
This shouldn't be too hard...

Let's walk through the syslinux script:

Code:
label ldiag
    kernel /live/vmlinuz
    append file=/live/filesystem.squasfs boot=live vga=791 initrd=/live/initrd.img ro quiet 2

The only thing getting downloaded directly is vmlinuz... vmlinuz is locating it's next files from kernel arguments, not as initrd downloads.

So, assuming your vmlinuz kernel can follow a URI, you get this in iPXE:

Code:
#!ipxe
set boot-path http://srv1/lenovo-diags
kernel ${boot-path}/vmlinuz
imgargs file=${boot-path}/filesystem.squashfs boot=live vga=791 initrd=${boot-path}/initrd.img ro quiet 2
boot

Bibliography...

http://www.ipxe.org/cmd/imgfetch
http://www.ipxe.org/cmd/imgargs
http://www.ipxe.org/cmd/chain

"Thus far, you have been adrift within the sheltered harbor of my patience..."
Find all posts by this user
Quote this message in a reply
2014-05-04, 16:56 (This post was last modified: 2014-05-04 17:06 by MultimediaMan.)
Post: #3
RE: linux options
It looks as if there is a typo in the syslinux commands.

I can get it to start through iPXE, but there is an error: UNSUPPORTED feature, and the shortly thereafter it will panic... probably because it can't find squashfs.

That being the case, I tried:

Code:
#!ipxe
set boot-path http://srv1/lenovo-diags
initrd ${boot-path}/initrd.img
initrd ${boot-path}/filesystem.squashfs
kernel ${boot-path}/vmlinuz
imgargs file=filesystem.squasfs boot=live vga=791 initrd=initrd.img ro quiet 2
boot

And that seemed to work. I need to try this on some Lenovo hardware.

"Thus far, you have been adrift within the sheltered harbor of my patience..."
Find all posts by this user
Quote this message in a reply
2014-11-04, 03:57
Post: #4
RE: linux options
Working on this specific problem myself and having tried every possible iteration I can think of (or reference elsewhere on the web) between pxelinux (kernel/initrd with args and/or memdisk iso loading) and iPXE, I can't seem to get this to work either...

Seems to be made worse by the fact that the original kernel image doesn't (as a rule?) load with network support for i217 family chipset (for my application), outright killing the possibility of just throwing a fetch over http:// argument at it to get it to work (which does seem like it would work if the drivers were present...)

Short of rebuilding the initrd.img, I haven't found any other suggestions anywhere as a possible solution.

urgh.
Find all posts by this user
Quote this message in a reply
2014-11-04, 11:02 (This post was last modified: 2014-11-05 07:33 by numbnuts.)
Post: #5
RE: linux options
After racking my brain for weeks trying to figure out how to get this to load, I decided to boot the actual CD on some Lenovo (M93P) hardware...

The 'file=filesystem.squashfs' portion of the imgargs isn't even valid and looks like a deliberate miskey -- with it enabled, it causes an error but continues processing startup... I decided to remove it from my args, and lo and behold, it booted into the diags.

Further, and even *more* ridiculous is the fact that I tried removing it as an initrd altogether to see if it would boot -- guess what? yeah... Thanks Lenovo... It doesn't even appear to be a necessary component to the operation of the diagnostics interface loading as far as I can tell, so I've been throwing 300MB files across the network for no apparent reason other than Lenovo seemingly half-assing their diagnostics release with no drivers and unnecessary files and doing it with, as MultimediaMan pointed out, a "typo" (sorry if I sound like I'm raggin on 'em, but this whole thing kinda irked me).

Here's the iPXE config that works for me:

Code:
#!ipxe
set boot-path http://path/to/file
initrd ${boot-path}/initrd.img
kernel ${boot-path}/vmlinuz boot=live vga=791 initrd=initrd.img ro quiet 2
boot

As for PXELINUX, I can't seem to get any version I've tried (4.07, 5.01, 6.03-pre19 or 6.03-pre20) to load properly -- I've confirmed the initrd.img file is being served, but in each instance the kernel attempts to load, bombs with a "unable to find a medium containing a live file system" error and then dumps to the BusyBox shell.

I chain from iPXE into PXELINUX and have noticed that I can do a 'localboot 0' and throw the iPXE shell prompt an iPXE script and it works -- what I can't seem to figure out is if it's possible to drop out of PXELINUX -AND- pass the script to it automatically... Anyone have any thoughts on how that might be achieved, since PXELINUX isn't loading this image properly? I'm currently loading iPXE (dhcp is ridiculously slow on the M93P via iPXE) to PXELINUX back out to iPXE (dhcp slooooow) to load the ipxe script, strictly for automation purposes... I'd rather avoid manually having to key in the boot path.
Find all posts by this user
Quote this message in a reply
2014-12-03, 15:38
Post: #6
RE: linux options
You need to figure out what kernel param you need to use with the initrd to specify that it should load the squashfs from the network. The initrd is probably based on Gentoo OpenRC, Debian Casper/debinstall or RedHat Anaconda. Checking their documentation resources should probably give you an answer. Worst case you can unpack the initrd and trace the bootup scripts for details.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)