2

I want to boot the current Antergos Live CD via . To do this, I downloaded the ISO, mounted it and copied the contents into /tftp/antergos/.

Then I set up to offer and used

grub-mkstandalone -d /usr/lib/grub/x86_64-efi/ -O x86_64-efi \
                  --fonts="unicode" -o bootx64.efi grub/grub.cfg

to generate an efi loader in /tftp/antergos/arch/boot/ from the following grub.cfg:

set timeout=5

menuentry 'Antergos x86_64' {
     insmod net
     insmod tftp
     insmod efi_gop
     set net_default_server=192.168.0.1
     net_add_addr eno0 efinet0 192.168.0.150

        linux   (tftp)/antergos/arch/boot/vmlinuz archisobasedir=arch archisolabel=ANTERGOS modules-load=loop rd.modules-load=loop udev.log-priority=crit rd.udev.log-priority=crit quiet splash
        initrd  (tftp)/antergos/arch/boot/archiso.img
}

is configured to deliver bootx64.efi:

enable-tftp
tftp-root=/tftp
dhcp-option=option:Bootfile-name,"/antergos/arch/boot/bootx64.efi"
dhcp-boot=/antergos/arch/boot/bootx64.efi
dhcp-option-force=210,/antergos/
dhcp-option-force=66,192.168.0.1
dhcp-option=3,192.168.0.101

However, when I select (IPv4) booting on my machine, it recieves the bootx64.efi and then goes straight to the shell. In the shell I can cat (memdisk)/grub/grub.cfg and get the contents of above grub.cfg so I assume that the shell is coming from bootx64.efi and not from my existing local installation.

How do I diagnose what is going wrong here?

2 Answers 2

2

The problem was, that grub looks by default for grub.cfg in (memdisk)/boot/grub. The memdisk created by the command in the question (grub-mkstandalone [...] -o bootx64.efi grub/grub.cfg) looked like this:

- boot
- grub
 - grub.cfg

So grub would not find the grub.cfg and do nothing.

The solution was to call grub-mkstandalone from outside the boot folder and to pass it as part of the grub.cfg path like so:

grub-mkstandalone -d /usr/lib/grub/x86_64-efi/   -O x86_64-efi  --fonts="unicode"  \
                  -o boot/bootx64.efi boot/grub/grub.cfg

which generates the following (memdisk) contents:

- boot
 - grub
  - grub.cfg
0

The accepted answer solves the problem by embedding configuration in bootx64.efi (aka grub.efi), but it's not the only way.

Check your DHCP server is setting the next-server option. For example with ISC DHCPd:

next-server 192.168.0.254;

grub uses this to know where to look for a config file as described here: https://www.gnu.org/software/grub/manual/grub/html_node/Network.html

If the client is downloading grub.efi, but not grub.cfg, the client boots to the grub> prompt and $net_default_server is empty, missing or incorrect next-server is likely the cause.

grub> echo $net_default_server

In my experience, $prefix will always be a (memdisk) path, whether or not next-server is set correctly and grub downloads a configuration file from the TFTP server:

grub> echo $prefix
(memdisk)/boot/grub

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .