My test hw, on which I want to boot, is MinnowBoard Max Turbot which is an x86 machine with UEFI and so far, I have successfully built GRUB2 from source and it successfully boots kernel from USB.

Now, I want to boot the linux kernel and rootfs from network. Since, Minnowboard's UEFI firmware doesn't support PXE (network drivers unavailable), I chose to get it through GRUB2, which can be built with network drivers.

I can setup dhcp server and tftp server, however, I am not able to find any Wiki/tutorial on how to specify grub2 the IP address of the tftp and dhcp servers. How do I tell GRUB2 to boot from network?

The best I could find was this : https://tr.opensuse.org/SDB:Booting_from_the_Network_with_GRUB

However, it uses grub-legacy. The GRUB2 documentation is also not clear.

Can someone please tell me the steps and commands to tell grub2 to boot kernel from network? Also what modules do I need to build GRUB2 with (full command to build GRUB2 would be appreciated)


I have built GRUB2 with the following command :

./grub-mkimage -d ./grub-core -o bootx64.efi -O x86_64-efi -p "" fat iso9660 part_gpt part_msdos normal boot linux configfile loopback chain efifwsetup efi_gop efi_uga ls search search_label search_fs_uuid search_fs_file gfxterm gfxterm_background gfxterm_menu test all_video loadenv exfat ext2 ntfs btrfs hfsplus udf tftp efinet

I have a tftp server running on IP a.b.c.d. Now when I set linux as below in GRUB2 console :

linux (tftp,a.b.c.d)/tftpboot/bzImage

I get the error destination unreachable. Also when I do net_ls_cards, I don't get any cards listed. But I have confirmed that internet over ethernet works on this board by booting Ubuntu on it.


Thanks to @telcoM , to point out that 64-bit version has needed network UEFI support. This gave me confidence to spend another day trying and I finally had success.

I setup tftp, dhcp and nfs servers (out of scope of this title).

The in GRUB2, I hit net_bootp and this is the juice. Though name is misleading it worked as the first step to request IP from DHCP server. This puts the HW on the network with legal network settings. Now I could set kernel path

grub> linux (tftp,a.b.c.d)/tftpboot/bzImage

Now the kernel boots. But I am still one step behind - the rootfs !!! Kernel fails while loading rootfs, which is expected.

I am not able to figure out how to tell grub2 to set rootfs location as NFS server. Is there some function like (tftp) ? I am checking through docs. If someone already know, please point out.

  • Did you try following the procedures in the document you linked?  What happened? Please do not respond in comments; edit your question to make it clearer and more complete. – G-Man Dec 8 '18 at 19:48
  • Regarding your EDIT2: you're on the right track, but you should open a new question. Although your problem is related to your original question, it is still a different question and StackExchange has an "one question per question post" principle. – telcoM Dec 11 '18 at 11:22

The Release Notes for the latest firmware for your board (November 2018 release) seems to indicate that the 64-bit version of the firmware actually does support network boot, even using the HTTP/HTTPS protocols. Only the 32-bit version of the firmware still has the UEFI network support disabled. Perhaps a firmware upgrade would solve your problem?

I see you are using efinet as your GRUB network driver module. I think it assumes that the firmware will have already initialized the network interface and received an IP address, either by DHCP or from firmware configuration.

If the firmware won't initialize the hardware and provide the appropriate UEFI protocol for GRUB to use, the efinet driver won't work... unless of course you find the right UEFI network driver from Intel's support webpages and do some UEFI scripting to first load and configure the NIC driver and the TCP/IP driver stack from some other media before starting up grubx64.efi. But that would sort of defeat the purpose of network boot.

To support UEFI PXE boot and UEFI 2.5 HTTP(S) boot, your DHCP server will need to be able to detect the PXE architecture option in the client's DHCP request and add the appropriate boot information to the DHCP response. If you happen to be using ISC dhcpd as your DHCP server, the part of DHCP server configuration that relates to network boot should be similar to this:

option pxearch code 93 = unsigned integer 16;
class "pxeclients" {
    match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
    next-server <IP address of boot server>;   # bootp style option
    option tftp-server-name "<IP address of boot server>";  # DHCP style option
    if option pxearch = 00:10 {
        # 0x0010 = UEFI 2.5 HTTP boot for x86_64
        filename "<HTTP or HTTPS URL pointing to a .efi bootloader file>";
    } elsif option pxearch = 00:0f {
        # 0x000f = UEFI 2.5 HTTP boot for 32-bit x86
        filename "<HTTP or HTTPS URL pointing to a .efi bootloader file>"
    } elsif option pxearch = 00:09 {
        # TFTP-based UEFI PXE boot for x86_64 according to original RFC 4578
        filename "/some/TFTP/path/grubx64.efi";
        option boot-size <nnnn>; # size of grubx64.efi as reported by "du -B 512 grubx64.efi"
    } elsif option pxearch = 00:07 { 
        # TFTP-based UEFI PXE boot for x86_64 according to current IANA registry
        # and RFC 4578 errata
        filename "/some/TFTP/path/grubx64.efi";
        option boot-size <nnnn>; # as above
    } elsif option pxearch = 00:06 {
        # TFTP-based UEFI PXE boot for 32-bit x86
        filename "/some/TFTP/path/grubia32.efi";
        option boot-size <nnnn>;
    } else {
        # plain old x86 BIOS PXE boot options here

    # end of PXE boot specific options

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.