Unable to boot to network on VirtualBox+rEFInd
I’m trying to set up a FOG server for a class project. I’m doing it in VirtualBox but the goal is to implement it in a real classroom.
So far everything is going well but I’m having trouble trying to recreate the real setup that is already on the computers in the class.
The computers have 2 HDD. 1 with Windows 10 and Ubuntu and the other with Windows 10. They use rEFInd as a boot manager.
I have a VM already with this HDD and OS setup and EFI enabled and it works fine.
The problem is when I change the boot order to only enable the network boot. It goes directly into the rEFInd menu.
I’m using virtual box. The VMs have a bridged network adapter, DHCP is provided by my home router and I have a dnsmasq (compiled with EFI support) proxyDHCP as shown here: https://wiki.fogproject.org/wiki/index.php?title=ProxyDHCP_with_dnsmasq.
The FOG server is running Ubuntu 18 LTS.
I’ve also tried disabling the dnsmasq service and seting DHCP options 66 and 67 in my router. Same results.
Any idea about how can i do it?
Thank you all for your responses. Thye have been very useful.
I’ve been able to do it using a real machine. It was indeed a Virtualbox problem.
Virtualbox does not support UEFI PXE booting.
You can still capture an UEFI image by disabling EFI mode and booting into PXE as per usual.
- Normally you would see some mention of the file name “ipxe.efi” on the boot screen, downloading… You might be able to look in the /var/logs to see if the tftp service logs that the file has been asked for and delivered. You will see 2 tftp requests one will be to check the file size and the second will be to request the file.
- The prefernece would be to use the distro’s version of dnsmasq as long as its 2.76 or newer. There is no advantage to compiling your own. When those instructions were created the common version shipping with linux was 2.68. But you do what works best for you.
- As far as FOG is concerned, when you exit the iPXE menu in uefi mode AND the exit mode is configured as rEFInd in FOG, it will use refind from the fog server as well as the config file from the fog server. This is used when the exit to hard drive menu item is selected. FOG will always use rEFInd.efi and refind.conf from the FOG server when its configured.
@george1421 Thank you very much for your response.
1 How can I check if it tries to downlad that file?
2 I will do that later, right now I don’t have access but later in the day I will
3 Didn’t specify… I’m using dnsmasq 2.79 (the same as if installed via apt) compiled with the modifications shown in the post
4 rEFInd is installed in the host machine, not on the server.
There is a few things here.
- I’m not sure if virtual box supports uefi pxe booting. I don’t have a virtualbox vm host server setup at the moment where I’m at. I can confirm later in the day. If you configure the VM for pxe booting in uefi mode and it tries to download the NBF file from dnsmasq then its does support uefi booting.
- I would test with a second laptop and see when its in uefi mode, do you get to the FOG menu. If you do then you know that dhcp and ProxyDHCP is working correctly.
- I would use your distro’s version of dnsmasq as long as its greater than version 2.75. There is no reason to compile dnsmasq now that almost all distros have versions later than 2.75
- If you need to tweak FOG’s refind config file its in /var/www/html/fog/service/ipxe directory.