Jump to content











Photo
- - - - -

How to make a menu with iPXE firmware

ipxe menu script vesamenu

Best Answer Sha0 , 05 December 2012 - 01:31 AM

Ok Sha0...but...I still have a doubt....

For your information: "Doubt" versus "question".

What about the wimboot option in the menu?

Will it work with ipxe?

wimboot is developed by the same author who was previously the Lead Developer for gPXE and is now the project owner/maintainer of iPXE. wimboot was designed for use with iPXE, not gPXE. Not too long ago, changes were made to both Syslinux and wimboot so that wimboot will work with Syslinux.

Since recent Syslinux -> recent wimboot works, then yes, you can have a wimboot item in the menu. PXELINUX is a type of Syslinux. You need to learn about how Syslinux config-files work. They are not the same as iPXE commands/scripts. Your wimboot item above will not work as-is. You need to change it for Syslinux syntax. See here, for example.

I don't see the difference cuase both are loading the same file: pxelinux.0

What you seem to be planning on doing is: BIOS -> El Torito optical disc boot -> ISOLINUX -> ipxe.lkrn -> embedded script -> pxelinux.0 (PXELINUX) -> menu.c32 -> Menu choice.

You are correct: If PXELINUX is loading wimboot, then whether gPXE or iPXE loaded PXELINUX is irrelevant.

¿What is pxelinux.0? Is it part of gpxe. ipxe or both?

pxelinux.0 is PXELINUX; one kind of Syslinux.

I'm not sure if chaining the same file in the script it will work...I don't really get it cause if I try to boot multiple initrd files from gpxe the wimboot fails cause it only gets the first initrd file so...

gPXE does not support wimboot.

What I get is the following: if ipxe loads the pxelinux.0 is leaving the ipxe firmware and loading the gpxe firmware so it won't load the multiple initrd files...

I have no idea what that means; sorry. :) Go to the full post


  • Please log in to reply
15 replies to this topic

#1 69jakk

69jakk

    Member

  • Members
  • 46 posts
  •  
    Spain

Posted 04 December 2012 - 08:40 PM

Hi everyone!

I'm trying to make a bootable cd with the ipxe firmware... I know how to do that with the dead gpxe firmware but I changed to ipxe when realized how powerful is that tool.

I used ROM-O-MATIC to make my own script and then chaining the menu default.cfg...

But the problem is that I have no idea how to make my own menu and script compiling the ipxe.iso image...

I'm a newbie so please...post some links for dummies if you really want to help me...

I have tried to find some information about this topic but google only shows me old posts about gpxe and not ipxe firmware.

Any help would be very appreciated.

Greeetings to everyone!

Edited by 69jakk, 04 December 2012 - 08:41 PM.


#2 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 04 December 2012 - 09:47 PM

Hi everyone!
...
I'm a newbie so please...post some links for dummies if you really want to help me...
...
I have tried to find some information about this topic but google only shows me old posts about gpxe and not ipxe firmware.

Any help would be very appreciated.

I have a personal request: If you are going to post a question both here and on a mailing-list or other forum, please allow at least a little bit of time to pass, in-between... That would have saved the time of the person who responded on the mailing-list to your last question, which I had already answered. I don't mean a great amount of time, but at least some. Otherwise, you could have many people all sending you the same answer and all that time adds up. This is just a personal request for the future; no harm done. :)

I'm trying to make a bootable cd with the ipxe firmware... I know how to do that with the dead gpxe firmware but I changed to ipxe when realized how powerful is that tool.

I used ROM-O-MATIC to make my own script and then chaining the menu default.cfg...

But the problem is that I have no idea how to make my own menu and script compiling the ipxe.iso image...

Are you actually trying to make a physical CD/DVD? In your last thread, you were trying to use a USB storage device. You said there was no boot-loader, but if it booted anything, then you were mistaken. If you can identify the boot-loader, then perhaps someone can help you to add iPXE's ipxe.lkrn to your boot-loader's choices.

If you are really trying to make a physical CD/DVD with only iPXE on it, simply build/download ipxe.iso and write it to the optical disc. If you want to build an .ISO with several boot-options, then you'll want to look into something like making an ISOLINUX .ISO, which is documented with Syslinux at doc/isolinux.txt inside a Syslinux download.

However, if you are just trying to make an .ISO so that you can try to boot it with some other boot-loader (such as whatever boot-loader "Yumi" uses), then, in my opinion, You're Doing It Wrong. Whatever boot-loader "Yumi" uses can probably boot iPXE and your other tools directly, without wrapping things in an .ISO.

Greeetings to everyone!

And to you!

#3 69jakk

69jakk

    Member

  • Members
  • 46 posts
  •  
    Spain

Posted 04 December 2012 - 10:16 PM

Sorry Sha0...

I took to much coffee this afternoon... I don't know what I want and how to do it...

Best regards :rolleyes:

#4 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 04 December 2012 - 10:33 PM

I took to much coffee this afternoon... I don't know what I want and how to do it...

Well you can start simply.
  • What kind of device would you really enjoy being able to boot on whatever computers you'll be working with?
  • What kind of device would be easiest to carry?
  • What kind of device would work with all of the computers?
  • What tools do you want to have available on the device?


#5 69jakk

69jakk

    Member

  • Members
  • 46 posts
  •  
    Spain

Posted 04 December 2012 - 10:39 PM

Well Shao...for me it's not so easy :(
  • What kind of device would you really enjoy being able to boot on whatever computers you'll be working with?---->A bootable mini-CD
  • What kind of device would be easiest to carry?---->A pendrive I think
  • What kind of device would work with all of the computers?---->A pendrive too I think but I need a Bootable mini-CD
  • What tools do you want to have available on the device?----->A ipxe.iso firmware with an embedded script...


    :(

Edited by 69jakk, 04 December 2012 - 10:40 PM.


#6 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 04 December 2012 - 10:51 PM

  • What kind of device would you really enjoy being able to boot on whatever computers you'll be working with?---->A bootable mini-CD
  • What kind of device would be easiest to carry?---->A pendrive I think
  • What kind of device would work with all of the computers?---->A pendrive too I think but I need a Bootable mini-CD
  • What tools do you want to have available on the device?----->A ipxe.iso firmware with an embedded script...

No problem. Do you have a Linux build environment that you can compile iPXE on?

$ cd

$ pwd

$ echo #!ipxe> test.ipxe

$ echo echo Hello, world!>> test.ipxe

$ echo shell>> test.ipxe

$ cd /path/to/ipxe/

$ cd src/

$ make EMBEDDED_IMAGE=~/test.ipxe bin/ipxe.iso

$ cp bin/ipxe.iso ~/

$ cd

$ ls -l ipxe.iso


  • 69jakk likes this

#7 69jakk

69jakk

    Member

  • Members
  • 46 posts
  •  
    Spain

Posted 04 December 2012 - 11:11 PM

Well... I'm going to download CentOS but I don't have it yet...

Anyway...I think I can or I know how to rebuild or modify the ipxe.iso image with the embedded script...

The problem is that I don't really know what to write on the script...

As I see you are being very helpful to me I will try to explain better what I did with gpxe...All below works with gpxe but I need the enviroment configured with ipxe because wimboot doesn't work with gpxe...so this is my gpxe based environment:

1. I make this little script and get the gpxe.iso image from Rom-o-matic:

dhcp net0
set 209:string pxelinux.cfg/default
set 210:string http://69ddwrt.no-ip.org//
chain ${210:string}pxelinux.0

2. Then, the pxelinux.0 chains the default.cfg menu which looks like this:

ui menu.c32
menu title Utilities

label hd00
MENU LABEL Boot Hard Disk (hd0,0)
kernel http://69ddwrt.no-ip.org/chain.c32
append hd0 0


label Puppy
MENU LABEL Puppy Lupu
kernel http://69ddwrt.no-ip...es/lupu/vmlinuz
append root=http://69ddwrt.no-ip.org/images/lupu/ boot=lupu netboot=nfs nfsroot=http://69ddwrt.no-ip.org/images/lupu/ initrd=http://69ddwrt.no-ip.org/images/lupu/initrd.gz


label pmagic
MENU LABEL Parted Magic
linux http://69ddwrt.no-ip.../pmagic/bzImage
initrd http://69ddwrt.no-ip...agic/initrd.img
append root=http://69ddwrt.no-ip.org/images/pmagic_pxe/pmagic/ edd=off load_ramdisk=1 prompt_ramdisk=0 rw vga=normal loglevel=9 max_loop=256


label HBCD
MENU LABEL Hiren's BootCD 15.0
kernel http://69ddwrt.no-ip.org/memdisk
initrd http://69ddwrt.no-ip...rens/hirens.iso
append iso


label Win7PE
MENU LABEL Windows 7 PE
kernel http://69ddwrt.no-ip.org/wimboot
initrd http://69ddwrt.no-ip.org/bootmgr bootmgr
initrd http://69ddwrt.no-ip.org/boot/bcd BCD
initrd http://69ddwrt.no-ip...sdi����boot.sdi
initrd http://69ddwrt.no-ip...ources/boot.wim boot.wim
boot

So the problem is... How could I do all this with an ipxe script? What should contain? How many an which files I need? I think that making just the script of the step 1 it should work but I'm not sure....

What could you tell me about it Sha0?

Edited by 69jakk, 04 December 2012 - 11:14 PM.


#8 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 04 December 2012 - 11:36 PM

The problem is that I don't really know what to write on the script...
...
1. I make this little script and get the gpxe.iso image from Rom-o-matic:


dhcp net0

set 209:string pxelinux.cfg/default

set 210:string http://69ddwrt.no-ip.org//

chain ${210:string}pxelinux.0

There is no ROM-O-Matic for iPXE, that I'm aware of. You'll have to build iPXE, yourself.

For iPXE, your script can be changed to:

#!ipxe

dhcp net0

set 209:string pxelinux.cfg/default

set 210:string http://69ddwrt.no-ip.org/

chain ${210}pxelinux.0



label pmagic

MENU LABEL Parted Magic

linux http://69ddwrt.no-ip.../pmagic/bzImage

initrd http://69ddwrt.no-ip...agic/initrd.img

   append root=http://69ddwrt.no-ip.org/images/pmagic_pxe/pmagic/ edd=off load_ramdisk=1 prompt_ramdisk=0 rw vga=normal loglevel=9 max_loop=256

Since you are using option 210, you can drop http://69ddwrt.no-ip.org/ almost everywhere (the kernel arguments via APPEND are an exception) in your PXELINUX config-file; it's implied.

I also suggest using nice indentation.

LABEL pmagic

  MENU LABEL Parted Magic

  LINUX /pmagic/bzImage

  INITRD /pmagic/initrd.img

  APPEND root=http://69ddwrt.no-ip.org/images/pmagic_pxe/pmagic/ edd=off load_ramdisk=1 prompt_ramdisk=0 rw vga=normal loglevel=9 max_loop=256


  • 69jakk likes this

#9 69jakk

69jakk

    Member

  • Members
  • 46 posts
  •  
    Spain

Posted 05 December 2012 - 12:35 AM

Ok Sha0...but...I still have a doubt....

What about the wimboot option in the menu?

Will it work with ipxe?

I don't see the difference cuase both are loading the same file: pxelinux.0

Sorry for this dummy question but I'm almost a newbie...

¿What is pxelinux.0? Is it part of gpxe. ipxe or both?

I'm not sure if chaining the same file in the script it will work...I don't really get it cause if I try to boot multiple initrd files from gpxe the wimboot fails cause it only gets the first initrd file so...What I get is the following: if ipxe loads the pxelinux.0 is leaving the ipxe firmware and loading the gpxe firmware so it won't load the multiple initrd files...

Could you explain me this a little bit?

Thanks by now and in advance! ;)

PD: All the information you're giving me is very useful...I'm learning a lot...you sould feel yourself great!

Edited by 69jakk, 05 December 2012 - 12:39 AM.


#10 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 05 December 2012 - 01:31 AM   Best Answer

Ok Sha0...but...I still have a doubt....

For your information: "Doubt" versus "question".

What about the wimboot option in the menu?

Will it work with ipxe?

wimboot is developed by the same author who was previously the Lead Developer for gPXE and is now the project owner/maintainer of iPXE. wimboot was designed for use with iPXE, not gPXE. Not too long ago, changes were made to both Syslinux and wimboot so that wimboot will work with Syslinux.

Since recent Syslinux -> recent wimboot works, then yes, you can have a wimboot item in the menu. PXELINUX is a type of Syslinux. You need to learn about how Syslinux config-files work. They are not the same as iPXE commands/scripts. Your wimboot item above will not work as-is. You need to change it for Syslinux syntax. See here, for example.

I don't see the difference cuase both are loading the same file: pxelinux.0

What you seem to be planning on doing is: BIOS -> El Torito optical disc boot -> ISOLINUX -> ipxe.lkrn -> embedded script -> pxelinux.0 (PXELINUX) -> menu.c32 -> Menu choice.

You are correct: If PXELINUX is loading wimboot, then whether gPXE or iPXE loaded PXELINUX is irrelevant.

¿What is pxelinux.0? Is it part of gpxe. ipxe or both?

pxelinux.0 is PXELINUX; one kind of Syslinux.

I'm not sure if chaining the same file in the script it will work...I don't really get it cause if I try to boot multiple initrd files from gpxe the wimboot fails cause it only gets the first initrd file so...

gPXE does not support wimboot.

What I get is the following: if ipxe loads the pxelinux.0 is leaving the ipxe firmware and loading the gpxe firmware so it won't load the multiple initrd files...

I have no idea what that means; sorry. :)
  • 69jakk likes this

#11 69jakk

69jakk

    Member

  • Members
  • 46 posts
  •  
    Spain

Posted 05 December 2012 - 11:22 AM

Hi again Sha0!

Well...we're almost there...

But just one little problem...

I'm still trying my stuff with gpxe as it seems the point with wimboot is the syslinux syntax...

So my Win7Pe menu entry looks like this:

label Win7PE
MENU LABEL Windows 7 PE
com32 linux.c32
append http://69ddwrt.no-ip.org/wimboot initrd=bootmgr@bootmgr,bcd@BCD,boot.sdi@boot.sdi,boot.wim@boot.wim

And when I select this enty this error appears on the screen:

Loading bootmgr@bootmgr... failed: File not found
linux.c32: Boot aborted!


So the problem is that syslinux doesn't recognize the parameter @ in order to reference the names...

What could I do?

Maybe the problem is my syslinux version...I'm using syslinux-4.06...

If I don't use the @ parameter the files are downloaded but I get the error Bad CPIO because the names are missing...so...Any solution?

Greets..

#12 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 05 December 2012 - 11:32 AM

Yes, you need a more recent version, or can use this branch: http://git.zytor.com...ds/multi_initrd
  • 69jakk likes this

#13 69jakk

69jakk

    Member

  • Members
  • 46 posts
  •  
    Spain

Posted 05 December 2012 - 11:53 AM

Dear Sha0...

I won't disturb you anymore...just the last little help...

I don't know how to patch syslinux and I cannot find a linux.c32 file in the repositories link you have just given to me... I only find the "linux.c" file I don't know how to compile it.

Could you pass me the linux.c32 file patched by you so I can replace my old linux.c32 file?

Thanks.

#14 69jakk

69jakk

    Member

  • Members
  • 46 posts
  •  
    Spain

Posted 05 December 2012 - 11:37 PM

Yes, you need a more recent version, or can use this branch: http://git.zytor.com...ds/multi_initrd

I have tried the same with syslinux-4.06-pre13.zip downloaded from http://www.kernel.or...esting/4.06/...

But still the same error...it doesn't recognize the @ parameter :(

Sha0...I know it's a little bit silly what I'm gonna tell you but...

Today is my birthday... could you please make me a good present helping me with this? :cheerleader: 



#15 69jakk

69jakk

    Member

  • Members
  • 46 posts
  •  
    Spain

Posted 06 December 2012 - 12:24 AM

I fixed it!!!

Actually I didn't fix anything... I just found the correct repositories...-----> http://www.kernel.or...x/Testing/5.00/

Everything works fine now...

Sorry for the dummy questions Sha0...you helped me a lot!

I'm toooooooooooooo fooooooooooooooooooooooooooooooooooooooooooooolllllll!!!!!



#16 Sha0

Sha0

    WinVBlock Dev

  • Developer
  • 1682 posts
  • Location:reboot.pro Forums
  • Interests:Booting
  •  
    Canada

Posted 07 December 2012 - 02:57 PM

I fixed it!!!

Great! I am sorry that I didn't reply in time for your birthday... But I hope you had a Happy Birthday! :) I was having a lot of issues posting due to a recent reboot.pro update.

It is important to know that all ComBoot32 modules (but not MEMDISK) must match the exact version of Syslinux being used. Thus when you asked about a substitute linux.c32 from me, I would have needed to know the exact Syslinux version you were planning on using.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users