Grub-mkconfig not working

I’ve installed EOS last week and decided that I wanted to change the default boot order. I can’t update grub as per Arch wiki instructions. My efforts are shown below:

sudo grub-mkconfig -o /boot/grub/grub.cfg 

gives me

zsh: no such file or directory: sudo grub-mkconfig -o /boot/grub/grub.cfg


bash: sudo grub-mkconfig -o /boot/grub/grub.cfg: No such file or directory

here’s my grub config:

GRUB_CMDLINE_LINUX_DEFAULT='nowatchdog nvme_load=YES resume=UUID=38c84c2d-13e4-4a3c-b783-a720cc141e46'

Welcome to the forums. :hello:

On a different distro, this would happen if “grub-mkconfig” were in a directory not indicated in “PATH” environment variable. But the error message is strange, it’s indicating the entire line that you typed including “sudo”. It’s something that frustrated me because I still don’t know how to acquire “grub-install” and “grub-mkconfig” if they’re not available. This stumped me in Slackware in particular.

That gave me food for thought. Instead of pasting the command, I typed it out. I have a new error now. Some unwanted characters must’ve come along for the ride.
New error:

/usr/bin/grub-mkconfig: line 265: /boot/grub/ No such file or directory

edit same occurs in bash

Can you run ls -l /boot? Does the grub directory exist inside /boot?

Also, you said you installed EOS last week. Did you choose grub as your preferred bootloader during the installation? If you installed using the latest ISO, the default bootloader is systemdboot unless you explicitly select grub during installation.


Anything show up using this terminal command?

sudo find / -name grub-mkconfig

By default we use systemd-boot.

Are you sure you are using grub?

Your grub config looks like it came from a systemd-boot install.

1 Like

@Rick if you are using systemd-boot which is what the installer defaults to (for Grub the user must explicitly toggle the eption), you could run

bootctl status

to see the status of installed boot loader and EFI variables.


I probably should add instructions for how to set the default kernel to boot to the systemd-boot wiki.

EDIT: The wiki is now updated with those instructions.


What a neat tool :slight_smile:

~ ❯ bootctl status
/efi/loader/loader.conf:5: Unknown line 'reboot-for-bitlocker', ignoring.
      Firmware: UEFI 2.50 (HP 1.2305)
 Firmware Arch: x64
   Secure Boot: disabled (disabled)
  TPM2 Support: yes
  Boot into FW: supported

Current Boot Loader:
      Product: systemd-boot 252.3-1-arch
     Features: ✓ Boot counting
               ✓ Menu timeout control
               ✓ One-shot menu timeout control
               ✓ Default entry control
               ✓ One-shot entry control
               ✓ Support for XBOOTLDR partition
1 Like

I am indeed running with systemd boot. I haven’t seen systemd rants in a while, so I guess systemd won the fight :smiley:
Thanks for your assistance fellas.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.