USB Boot BIOS client into FOG menu
-
Why do you need this you may ask?
I can think of two/three situations where you may not be possible to PXE boot computers into the FOG PXE menu.
- The computer is so old or has a really broken PXE boot loader
- Some third party manages your DHCP server or the DHCP server you use doesn’t have the ability to set dhcp options 66 and 67
- Your build in network device (or USB dongle) doesn’t support PXE booting.
The process steps are not hard at all. You will need to acquire these things.
- A 2GB (min) flash drive
- A pxe boot image from https://rom-o-matic.eu/
- Win32 Disk Imager from sourceforge http://sourceforge.net/projects/win32diskimager/
I do have to add this caveat, in that the rom-o-matic servers include the most of the common network drivers. They may not have every possible driver built into this kernel. If you know how to build kernels you may have to download the ipxe source code and build a custom kernel with the specific drivers for your application. In general this method will work for most applications
One time actions for this process
- Download and install the Win32 Disk Imager.
Image creation Process
- From a browser access the rom-o-matic web site at https://rom-o-matic.eu/
- Ensure that “Standard, for most common use” is selected (default)
- Set the “Choose an output format” to “USB Keychain disk image (.usb)”
- Set the “Embedded script” to (in the past your script section).
Be sure to change the ip address of **192.168.1.88** to the actual IP address of your FOG server.
#!ipxe dhcp set next-server 192.168.1.88 set filename undionly.kpxe chain tftp://${next-server}/${filename}
- Set “Which Revision” to “Master” (default)
- Press the Proceed button at the bottom of the page. It may take up to 2 minutes to build this kernel depending on how busy the rom-o-matic servers are at the time you submit your request.
- When your kernel build is done the system should prompt you to download the “ipxe.usb” file. Go ahead and download that file to a known location.
(continued below)
-
(default placeholder)
-
(default placeholder)
-
(default placeholder)
-
- Insert your flash drive into an open USB port. Use the computer browser to
ensure you "know"
the Drive letter of this flash drive.The next steps are destructive and we don't want to erase a drive that has important data on it.
- Once you know the drive letter launch the Win32DiskImager with “Run as Administrator” (you need to have admin credentials on the computer to be able to write the raw image to the disk. I you don’t have the rights you might as well stop here.) Accept any UAC prompts to show the Win32DiskImager user surface.
- Select the folder icon next to the edit box for image name.
- Change the drop down listbox next to the file name filed from “Disk Images (.img)" to ".*”
- Navigate to the location where you downloaded the “ipxe.usb” from step 7 above.
- Select the file and press open
- Back in the main application, make sure the drive listed in the drop down list for Device is correct.
Warning: If you get this part wrong you may end up overwriting something important
- When everything is set and you know what will be overwritten press the Write button.
- The write happens really fast.
I do have to warn you once you write the linux boot kernel to the flash drive windows will no longer see the drive as a windows compatible drive and will want to format it every time you insert it into the computer.
Don’t worry because the format is correct for pxe booting from a flash drive. - At this point remove the usb thumb drive from the build up computer and insert the drive into a target computer
- Power on the target computer and press F10 or F12 (depending on the mfg) to call up the boot menu.
- Ensure the network cable is attached to the target computer and then select the USB boot media.
- You should see the iPXE boot banner and then the target computer pick up the dhcp address and connect to the fog menu. This should be a fast action.
- Once in the fog menu remove the USB boot drive and you are done.
- Insert your flash drive into an open USB port. Use the computer browser to
-
-
@george1421 Is this thread made unneeded/obsolete by either of these threads?
https://forums.fogproject.org/topic/6350/usb-boot-uefi-client-into-fog-menu-easy-way
https://forums.fogproject.org/topic/6400/usb-boot-uefi-client-into-fog-menu-harder-way
-
Not exactly. This thread discusses pxe booting (in BIOS mode) into the fog menu, were the others are for UEFI booting. You would need this if for some reason you could not pxe boot in bios mode, such as a broken pxe implementation on the nic or unable to setup pxe booting on your dhcp server. Since you will need to sit in front of the computer to select the fog menu item, usb booting may be an option.
-
@george1421 Great instructions!
I can’t seem to get this to work though When I do this exactly as you have laid it out, this is as far as I get until it tries to boot into the Windows 7 OS I’m trying to capture an image of.
Perhaps it’s an issue with the TFTP server? I have all defaults through the FOG install other than the SQL (MirandaDB) database password.
Any help would be appreciated!
-
@cschneider-tech All those posts are pretty up to date I think. The difference is that the other two posts are talking about UEFI instead if BIOS (like this one here)!
From your picture it looks all pretty good. iPXE comes up, gets an IP and tries to load the next iPXE binary from the TFTP server. By the way, I’d suggest loading default.ipxe from the TFTP straight away instead of going through another iPXE loop. But anyhow. Make sure you got the IP address correct and make sure your TFTP server is properly running: https://wiki.fogproject.org/wiki/index.php/Troubleshoot_TFTP
-
@cschneider.tech I agree with Sebastian, this looks good. While its not working just yet. All of the right bits are lining up. Just to confirm your fog server is at 192.168.13.236?
-
@Sebastian-Roth said:
By the way, I’d suggest loading default.ipxe from the TFTP straight away instead of going through another iPXE loop.
Just so I’m clear on this I should change the chain to default.ipxe instead of undionly.kpxe in this document. My original intent was to just emulate the pxe booting but via usb flash drive. If I can cut an additional kernel download and startup I’m all for that. I just wanted to keep it generic in case things structurally changed inside the tftp boot folder.
-
@george1421 said:
@Sebastian-Roth said:
By the way, I’d suggest loading default.ipxe from the TFTP straight away instead of going through another iPXE loop.
Just so I’m clear on this I should change the chain to default.ipxe instead of undionly.kpxe in this document. My original intent was to just emulate the pxe booting but via usb flash drive. If I can cut an additional kernel download and startup I’m all for that. I just wanted to keep it generic in case things structurally changed inside the tftp boot folder.
I think the way you did it is fine. That said, the boot process could be shorter. I’m indifferent about it.
-
@george1421 I do understand your intend to emulate PXE booting as close as possible. This is fine. I was just suggesting that it can be cut down by a fair bit. Right now I can’t see a reason why we would abandon loading default.ipxe straight away.
If you like you can edit your initial post and add this as a second step. Like, if loading iPXE worked for you, try loading default.ipxe to straighten things up. This is no have to!