Created attachment 735501 [details] I get the above error when running grub2-mkconfig from root. Description of problem: grub2-mkconfig doesn't generate config file. Version-Release number of selected component (if applicable): How reproducible: Every time. Steps to Reproduce: 1. I rebuild a new kernel. 2. I use a helper app in Fedora Utils to create a new config file which I think runs grub2-mkconfig under the covers. 3. Reboot. Actual results: The configuration file in not updated, so I have the old kernels in the list. Expected results: New config file is generated and the new kernel is picked up. Additional info:
Created attachment 735502 [details] grub.cfg.new created in /tmp This is the grub.cfg.new that gets generated. - Raj
Something that isn't grub2 has put something bad in /etc/grub.d . Please run bash -x grub2-mkconfig and see where the problem is.
Here is the output you requested.. [root@rajhome2 ~]# bash -x grub2-mkconfig + set -e + transform='s&^&&;s,grub,grub2,' + prefix=/usr + exec_prefix=/usr + datarootdir=/usr/share + prefix=/usr + exec_prefix=/usr + sbindir=/usr/sbin + bindir=/usr/bin + sysconfdir=/etc + PACKAGE_NAME=GRUB + PACKAGE_VERSION=2.00 + host_os=linux-gnu + datadir=/usr/share + '[' x = x ']' + pkgdatadir=/usr/share/grub + grub_cfg= + grub_mkconfig_dir=/etc/grub.d ++ basename grub2-mkconfig + self=grub2-mkconfig ++ echo grub-probe ++ sed 's&^&&;s,grub,grub2,' + grub_probe=/usr/sbin/grub2-probe ++ echo grub-editenv ++ sed 's&^&&;s,grub,grub2,' + grub_editenv=/usr/bin/grub2-editenv ++ sed 's&^&&;s,grub,grub2,' ++ echo grub-script-check + grub_script_check=/usr/bin/grub2-script-check + export TEXTDOMAIN=grub + TEXTDOMAIN=grub + export TEXTDOMAINDIR=/usr/share/locale + TEXTDOMAINDIR=/usr/share/locale + . /usr/share/grub/grub-mkconfig_lib ++ transform='s&^&&;s,grub,grub2,' ++ prefix=/usr ++ exec_prefix=/usr ++ datarootdir=/usr/share ++ datadir=/usr/share ++ bindir=/usr/bin ++ sbindir=/usr/sbin ++ pkgdatadir=/usr/share/grub ++ test x/usr/sbin/grub2-probe = x ++ test x = x +++ echo grub-mkrelpath +++ sed 's&^&&;s,grub,grub2,' ++ grub_mkrelpath=/usr/bin/grub2-mkrelpath ++ which gettext ++ : + test 0 -gt 0 + '[' x0 = x ']' + '[' 0 '!=' 0 ']' + set /usr/sbin/grub2-probe dummy + test -f /usr/sbin/grub2-probe + : ++ /usr/sbin/grub2-probe --target=device / + GRUB_DEVICE=/dev/sda3 ++ /usr/sbin/grub2-probe --device /dev/sda3 --target=fs_uuid + GRUB_DEVICE_UUID=9ce6b483-8148-4ed6-86a8-539dbefddc4c ++ /usr/sbin/grub2-probe --target=device /boot + GRUB_DEVICE_BOOT=/dev/sda1 ++ /usr/sbin/grub2-probe --device /dev/sda1 --target=fs_uuid + GRUB_DEVICE_BOOT_UUID=b67abe95-9bef-4819-8b28-2d800bd9e615 ++ /usr/sbin/grub2-probe --device /dev/sda3 --target=fs + GRUB_FS=ext2 + test -f /etc/default/grub + . /etc/default/grub ++ GRUB_TIMEOUT=5 +++ sed 's, release .*$,,g' /etc/system-release ++ GRUB_DISTRIBUTOR=Fedora ++ GRUB_DEFAULT=saved +++ '[' -x /usr/sbin/rhcrashkernel-param ']' +++ : ++ GRUB_CMDLINE_LINUX='rd.md=0 rd.lvm=0 rd.dm=0 rd.luks=0 vconsole.keymap=us' ++ GRUB_DISABLE_RECOVERY=true ++ GRUB_THEME=/boot/grub2/themes/system/theme.txt + '[' x '!=' x ']' + termoutdefault=0 + '[' x = x ']' + GRUB_TERMINAL_OUTPUT=gfxterm + termoutdefault=1 + for x in '${GRUB_TERMINAL_OUTPUT}' + case "x${x}" in + GRUB_ACTUAL_DEFAULT=saved + '[' xsaved = xsaved ']' ++ /usr/bin/grub2-editenv - list ++ sed -n '/^saved_entry=/ s,^saved_entry=,,p' + GRUB_ACTUAL_DEFAULT='Fedora Linux, with Linux 3.6.10-4.fc18.i686' + export GRUB_DEVICE GRUB_DEVICE_UUID GRUB_DEVICE_BOOT GRUB_DEVICE_BOOT_UUID GRUB_FS GRUB_FONT GRUB_PRELOAD_MODULES GRUB_ACTUAL_DEFAULT + export GRUB_DEFAULT GRUB_HIDDEN_TIMEOUT GRUB_HIDDEN_TIMEOUT_QUIET GRUB_TIMEOUT GRUB_DEFAULT_BUTTON GRUB_HIDDEN_TIMEOUT_BUTTON GRUB_TIMEOUT_BUTTON GRUB_BUTTON_CMOS_ADDRESS GRUB_BUTTON_CMOS_CLEAN GRUB_DISTRIBUTOR GRUB_CMDLINE_LINUX GRUB_CMDLINE_LINUX_DEFAULT GRUB_CMDLINE_XEN GRUB_CMDLINE_XEN_DEFAULT GRUB_CMDLINE_LINUX_XEN_REPLACE GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT GRUB_CMDLINE_NETBSD GRUB_CMDLINE_NETBSD_DEFAULT GRUB_CMDLINE_GNUMACH GRUB_TERMINAL_INPUT GRUB_TERMINAL_OUTPUT GRUB_SERIAL_COMMAND GRUB_DISABLE_LINUX_UUID GRUB_DISABLE_RECOVERY GRUB_VIDEO_BACKEND GRUB_GFXMODE GRUB_BACKGROUND GRUB_THEME GRUB_GFXPAYLOAD_LINUX GRUB_DISABLE_OS_PROBER GRUB_INIT_TUNE GRUB_SAVEDEFAULT GRUB_ENABLE_CRYPTODISK GRUB_BADRAM + test x '!=' x + gettext 'Generating grub.cfg ...' Generating grub.cfg ...+ echo + cat # # DO NOT EDIT THIS FILE # # It is automatically generated by grub2-mkconfig using templates # from /etc/grub.d and settings from /etc/default/grub # + for i in '${grub_mkconfig_dir}/*' + case "$i" in + grub_file_is_not_garbage /etc/grub.d/00_header + test -f /etc/grub.d/00_header + case "$1" in + return 0 + test -x /etc/grub.d/00_header + echo + echo '### BEGIN /etc/grub.d/00_header ###' ### BEGIN /etc/grub.d/00_header ### + /etc/grub.d/00_header if [ -s $prefix/grubenv ]; then load_env fi set default="${saved_entry}" if [ x"${feature_menuentry_id}" = xy ]; then menuentry_id_option="--id" else menuentry_id_option="" fi export menuentry_id_option if [ "${prev_saved_entry}" ]; then set saved_entry="${prev_saved_entry}" save_env saved_entry set prev_saved_entry= save_env prev_saved_entry set boot_once=true fi function savedefault { if [ -z "${boot_once}" ]; then saved_entry="${chosen}" save_env saved_entry fi } function load_video { if [ x$feature_all_video_module = xy ]; then insmod all_video else insmod efi_gop insmod efi_uga insmod ieee1275_fb insmod vbe insmod vga insmod video_bochs insmod video_cirrus fi } if [ x$feature_default_font_path = xy ] ; then font=unicode else insmod part_msdos insmod ext2 set root='hd0,msdos3' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 --hint='hd0,msdos3' 9ce6b483-8148-4ed6-86a8-539dbefddc4c else search --no-floppy --fs-uuid --set=root 9ce6b483-8148-4ed6-86a8-539dbefddc4c fi font="/usr/share/grub/unicode.pf2" fi if loadfont $font ; then set gfxmode=auto load_video insmod gfxterm set locale_dir=$prefix/locale set lang=en_US insmod gettext fi terminal_output gfxterm Found theme: /boot/grub2/themes/system/theme.txt insmod part_msdos insmod ext2 set root='hd0,msdos1' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' b67abe95-9bef-4819-8b28-2d800bd9e615 else search --no-floppy --fs-uuid --set=root b67abe95-9bef-4819-8b28-2d800bd9e615 fi insmod gfxmenu loadfont ($root)/grub2/themes/system/DejaVuSans-10.pf2 loadfont ($root)/grub2/themes/system/DejaVuSans-12.pf2 loadfont ($root)/grub2/themes/system/DejaVuSans-Bold-14.pf2 loadfont ($root)/grub2/fonts/unicode.pf2 insmod png set theme=($root)/grub2/themes/system/theme.txt export theme set timeout=5 + echo '### END /etc/grub.d/00_header ###' ### END /etc/grub.d/00_header ### + for i in '${grub_mkconfig_dir}/*' + case "$i" in + grub_file_is_not_garbage /etc/grub.d/10_linux + test -f /etc/grub.d/10_linux + case "$1" in + return 0 + test -x /etc/grub.d/10_linux + echo + echo '### BEGIN /etc/grub.d/10_linux ###' ### BEGIN /etc/grub.d/10_linux ### + /etc/grub.d/10_linux Found linux image: /boot/vmlinuz-3.9.0-rc6 Found initrd image: /boot/initramfs-3.9.0-rc6.img menuentry 'Fedora' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-9ce6b483-8148-4ed6-86a8-539dbefddc4c' { load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod ext2 set root='hd0,msdos1' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' b67abe95-9bef-4819-8b28-2d800bd9e615 else search --no-floppy --fs-uuid --set=root b67abe95-9bef-4819-8b28-2d800bd9e615 fi echo 'Loading Linux 3.9.0-rc6 ...' linux /vmlinuz-3.9.0-rc6 root=UUID=9ce6b483-8148-4ed6-86a8-539dbefddc4c ro rd.md=0 rd.lvm=0 rd.dm=0 rd.luks=0 vconsole.keymap=us echo 'Loading initial ramdisk ...' initrd /initramfs-3.9.0-rc6.img } submenu 'Advanced options for Fedora' $menuentry_id_option 'gnulinux-advanced-9ce6b483-8148-4ed6-86a8-539dbefddc4c' { menuentry 'Fedora, with Linux 3.9.0-rc6' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.9.0-rc6-advanced-9ce6b483-8148-4ed6-86a8-539dbefddc4c' { load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod ext2 set root='hd0,msdos1' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' b67abe95-9bef-4819-8b28-2d800bd9e615 else search --no-floppy --fs-uuid --set=root b67abe95-9bef-4819-8b28-2d800bd9e615 fi echo 'Loading Linux 3.9.0-rc6 ...' linux /vmlinuz-3.9.0-rc6 root=UUID=9ce6b483-8148-4ed6-86a8-539dbefddc4c ro rd.md=0 rd.lvm=0 rd.dm=0 rd.luks=0 vconsole.keymap=us echo 'Loading initial ramdisk ...' initrd /initramfs-3.9.0-rc6.img } Found linux image: /boot/vmlinuz-3.8.3-203.fc18.i686 Found initrd image: /boot/initramfs-3.8.3-203.fc18.i686.img menuentry 'Fedora, with Linux 3.8.3-203.fc18.i686' --class fedora --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.8.3-203.fc18.i686-advanced-9ce6b483-8148-4ed6-86a8-539dbefddc4c' { load_video set gfxpayload=keep insmod gzio insmod part_msdos insmod ext2 set root='hd0,msdos1' if [ x$feature_platform_search_hint = xy ]; then search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' b67abe95-9bef-4819-8b28-2d800bd9e615 else search --no-floppy --fs-uuid --set=root b67abe95-9bef-4819-8b28-2d800bd9e615 fi echo 'Loading Linux 3.8.3-203.fc18.i686 ...' linux /vmlinuz-3.8.3-203.fc18.i686 root=UUID=9ce6b483-8148-4ed6-86a8-539dbefddc4c ro rd.md=0 rd.lvm=0 rd.dm=0 rd.luks=0 vconsole.keymap=us echo 'Loading initial ramdisk ...' initrd /initramfs-3.8.3-203.fc18.i686.img } } + echo '### END /etc/grub.d/10_linux ###' ### END /etc/grub.d/10_linux ### + for i in '${grub_mkconfig_dir}/*' + case "$i" in + grub_file_is_not_garbage /etc/grub.d/20_linux_tboot + test -f /etc/grub.d/20_linux_tboot + case "$1" in + return 0 + test -x /etc/grub.d/20_linux_tboot + echo + echo '### BEGIN /etc/grub.d/20_linux_tboot ###' ### BEGIN /etc/grub.d/20_linux_tboot ### + /etc/grub.d/20_linux_tboot submenu "tboot 1.7.0" { } + echo '### END /etc/grub.d/20_linux_tboot ###' ### END /etc/grub.d/20_linux_tboot ### + for i in '${grub_mkconfig_dir}/*' + case "$i" in + grub_file_is_not_garbage /etc/grub.d/20_linux_xen + test -f /etc/grub.d/20_linux_xen + case "$1" in + return 0 + test -x /etc/grub.d/20_linux_xen + echo + echo '### BEGIN /etc/grub.d/20_linux_xen ###' ### BEGIN /etc/grub.d/20_linux_xen ### + /etc/grub.d/20_linux_xen + echo '### END /etc/grub.d/20_linux_xen ###' ### END /etc/grub.d/20_linux_xen ### + for i in '${grub_mkconfig_dir}/*' + case "$i" in + grub_file_is_not_garbage /etc/grub.d/20_linux_xen_tboot + test -f /etc/grub.d/20_linux_xen_tboot + case "$1" in + return 0 + test -x /etc/grub.d/20_linux_xen_tboot + echo + echo '### BEGIN /etc/grub.d/20_linux_xen_tboot ###' ### BEGIN /etc/grub.d/20_linux_xen_tboot ### + /etc/grub.d/20_linux_xen_tboot + echo '### END /etc/grub.d/20_linux_xen_tboot ###' ### END /etc/grub.d/20_linux_xen_tboot ### + for i in '${grub_mkconfig_dir}/*' + case "$i" in + grub_file_is_not_garbage /etc/grub.d/20_ppc_terminfo + test -f /etc/grub.d/20_ppc_terminfo + case "$1" in + return 0 + test -x /etc/grub.d/20_ppc_terminfo + echo + echo '### BEGIN /etc/grub.d/20_ppc_terminfo ###' ### BEGIN /etc/grub.d/20_ppc_terminfo ### + /etc/grub.d/20_ppc_terminfo + echo '### END /etc/grub.d/20_ppc_terminfo ###' ### END /etc/grub.d/20_ppc_terminfo ### + for i in '${grub_mkconfig_dir}/*' + case "$i" in + grub_file_is_not_garbage /etc/grub.d/30_os-prober + test -f /etc/grub.d/30_os-prober + case "$1" in + return 0 + test -x /etc/grub.d/30_os-prober + echo + echo '### BEGIN /etc/grub.d/30_os-prober ###' ### BEGIN /etc/grub.d/30_os-prober ### + /etc/grub.d/30_os-prober + echo '### END /etc/grub.d/30_os-prober ###' ### END /etc/grub.d/30_os-prober ### + for i in '${grub_mkconfig_dir}/*' + case "$i" in + grub_file_is_not_garbage /etc/grub.d/40_custom + test -f /etc/grub.d/40_custom + case "$1" in + return 0 + test -x /etc/grub.d/40_custom + echo + echo '### BEGIN /etc/grub.d/40_custom ###' ### BEGIN /etc/grub.d/40_custom ### + /etc/grub.d/40_custom # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above. + echo '### END /etc/grub.d/40_custom ###' ### END /etc/grub.d/40_custom ### + for i in '${grub_mkconfig_dir}/*' + case "$i" in + grub_file_is_not_garbage /etc/grub.d/41_custom + test -f /etc/grub.d/41_custom + case "$1" in + return 0 + test -x /etc/grub.d/41_custom + echo + echo '### BEGIN /etc/grub.d/41_custom ###' ### BEGIN /etc/grub.d/41_custom ### + /etc/grub.d/41_custom if [ -f ${config_directory}/custom.cfg ]; then source ${config_directory}/custom.cfg elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then source $prefix/custom.cfg; fi + echo '### END /etc/grub.d/41_custom ###' ### END /etc/grub.d/41_custom ### + for i in '${grub_mkconfig_dir}/*' + case "$i" in + grub_file_is_not_garbage /etc/grub.d/README + test -f /etc/grub.d/README + case "$1" in + return 1 + test x '!=' x + gettext done done+ echo [root@rajhome2 ~]#
*** This bug has been marked as a duplicate of bug 929384 ***