Hi,
TryHarder wrote:Hey everybody,
I've brought up tftp server on my build machine (B), and I have GRUB2 at my work machine (W).
Obviously, I want to boot W from B via tftp. W has GRUB2 and several other OSes that I don't want to mess up, so
basically my question is how can I do that with single GRUB2 entry in menu?
I don't have DHCP, so let's say I will hardcode an IP of B. I'm looking for solution like this, but for GRUB2:
I don't think many (any?) people have tried using network boot with GRUB2. I know I haven't.
The idea for network boot is that the firmware (or network card ROM) has a basic network card driver, UDP/IP stack, DHCP client and TFTP client. The firmware uses this to get DHCP information, and the server responds with DHCP that has an extra optional information (the IP address of the TFTP server to boot from, and the file name to download/boot).
For GRUB2 there'd be 3 different scenarios. The first is that GRUB2 boots from network and then boots the OS from network. In this case GRUB could use the firmware/network cards ROM's network driver, UDP/IP stack and TFTP client; but it gets messy if you want to use the "file name to download" from the DHCP server to tell GRUB2 what it should boot.
The next scenario is that GRUB2 boots from somewhere else (e.g. hard drive) and then boots the OS from network. This is what I think you're attempting. In this case GRUB2 can't use the firmware's/network cards ROM's network driver (because it didn't start from network itself so the PXE API isn't provided for it to use); and GRUB2 would need to have its own network card driver, DHCP client, UDP/IP stack and TFTP client. I'd assume GRUB2 is designed to allow these things to be loaded (as "GRUB modules") and used; but I don't know which network cards it supports, which "GRUB modules" you've enabled/installed, etc. I also don't know if GRUB2 actually does implement any of this (I'm only assuming it could).
The final scenario is that you don't use the network boot (e.g. DHCP, TFTP) at all; but instead GRUB2 downloads file/s to boot using FTP or HTTP. This is similar to the previous scenario (GRUB2 has to have drivers, etc) but requires more complex code in GRUB2 (TCP, FTP/HTTP). This would probably be the fastest option too; but I don't know if GRUB2 had the driver and code to support this either.
Cheers,
Brendan