Post Reply 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Entirely disk based?
2012-03-20, 08:48
Post: #1
Entirely disk based?

Would it be possible to have iPXE and the operating system (Windows) on the same disk?
A default boot should be iPXE with the possibility to hit F12 and reinstall the machine. If no interaction it would continue booting the OS.
I've browsed the documentation but can't seem to find an answer to this.

Find all posts by this user
Quote this message in a reply
2012-03-21, 17:56
Post: #2
RE: Entirely disk based?
You need to compile iPXE with an embedded image. Look for documentation on the EMBED_IMAGE parameter on how to embed a customized ipxe script.

Your embedded ipxe script will have to use the prompt command to ask the user to press some key within a configurable timeout. If they do nothing, the script can use the exit command to let the normal BIOS boot order take over.

All this of course relies on your BIOS being proper and honoring the exit command to continue the boot order properly.

You could avoid using an embedded script, but then it would only work when the computer is in the "home network" where you have DHCP setup properly (then again, this might be the only place you actually need this, unless you have laptops needing this kind of setup).
Visit this user's website Find all posts by this user
Quote this message in a reply
2012-03-23, 16:04
Post: #3
RE: Entirely disk based?
OK, thanks.
I've compiled the steps I did if it is of interest for somebody else.

-Download grub4dos
-If you need an extraction utility 7zip is a good candidate ( )
-Extract and copy grldr and menu.lst to root of C drive
-Edit menu.lst to look like (hyphens not included)
timeout 5
default 0

title iPXE
kernel (hd0,0)/ipxe.lkrn

title windows 7
find --set-root --ignore-floppies --ignore-cd /bootmgr
chainloader /bootmgr
For Windows XP replace /bootmgr with /ntldr

-Download Bootice
-Extract files and run bootice.exe on Windows system and
--Select Hard disk, Process MBR
--Select Grub for DOS and Install / Config
--Save to Disk

-Download ipxe as documented on this site.
-Copy grub.exe from grub4dos to <ipxe-tree>src
-Download SYSLINUX from
-Extract and copy isolinux.bin to <ipxe-tree>/src/util
-Create a script file <ipxe-tree>/my-script.ipxe with the following content (hyphens not included)
dhcp net0
prompt --key 0x02 --timeout 3000 Press Ctrl-B for the iPXE command line... && shell ||

imgargs grub.exe --config-file="root (hd0,0); chainloader /bootmgr"
boot grub.exe

For some reasons the chain command did not work. Possibly because our RIS-server hands out a file name to the PXE-client and that gets the context mixed up. However imgargs followed by boot made the trick.

-Build with make EMBEDDED_IMAGE=<ipxe-tree>/src/my-script.ipxe,grub.exe bin/ipxe.lkrn
-Copy ipxe.lkrn to root of C drive

Now I can;
A: Boot Windows by doing nothing.
B: Make a network installation by pressing F12 when iPXE asks for it.
C And most important, I get the same ip-address for the iPXE-client and Windows.
That is of HUGE interest if your dhcp ranges cannot accomodate dual leases for your workstations, one for the pxe-client, mac-address based, and another for Windows, Client Identifier based (DHCP option 61 ). iPXE does seem to send the same client identifier as Windows, ie 01 plus mac address.

Now I only need to make this scriptable for WindowsPE and Windows 7 deployment with WDS, but that's another story...
Any thoughts or comments are welcome.

Thank you for your good work,
Find all posts by this user
Quote this message in a reply
Post Reply 

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