Translated message

A translation of this page exists in English.

grub2-mkconfig が "no command and will do nothing" エラーで失敗する理由

Solution In Progress - Updated -

Issue

  • grub2-mkconfig grub 設定ファイルの生成に失敗しました。
[root@rhel8 ~]# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
Generating grub configuration file ...
Script `/boot/efi/EFI/redhat/grub.cfg.new' contains no commands and will do nothing
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/efi/EFI/redhat/grub.cfg.new file attached.

作成された /boot/efi/EFI/redhat/grub.cfg.new は空のファイルです。

[root@rhel8 ~]# cat /boot/efi/EFI/redhat/grub.cfg.new
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

Environment

Red Hat Enterprise Linux 7
Red Hat Enterprise Linux 8

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content