grub2-reboot does not take into account the gentoo-specific grub2 path change, so running grub2-reboot 'some-entry' results in: ############ # bash -x grub2-reboot 'Windows 7 (loader) (on /dev/sda1)' + prefix=/usr + exec_prefix=/usr + bindir=/usr/bin + sysconfdir=/etc + PACKAGE_NAME=GRUB + PACKAGE_VERSION=2.00 + datarootdir=/usr/share + datadir=/usr/share + '[' x = x ']' + pkgdatadir=/usr/share/grub ++ basename grub2-reboot + self=grub2-reboot + grub_editenv=/usr/bin/grub2-editenv + rootdir= + bootdir= ++ echo /boot/grub ++ sed 's,//*,/,g' + grubdir=/boot/grub + export TEXTDOMAIN=grub + TEXTDOMAIN=grub + export TEXTDOMAINDIR=/usr/share/locale + TEXTDOMAINDIR=/usr/share/locale + . /usr/share/grub/grub-mkconfig_lib ++ prefix=/usr ++ exec_prefix=/usr ++ datarootdir=/usr/share ++ datadir=/usr/share ++ bindir=/usr/bin ++ sbindir=/usr/sbin ++ pkgdatadir=/usr/share/grub ++ test x = x ++ grub_probe=/usr/sbin/grub2-probe ++ test x = x ++ grub_mkrelpath=/usr/bin/grub2-mkrelpath ++ which gettext ++ : ++ grub_tab=' ' + test 1 -gt 0 + option='Windows 7 (loader) (on /dev/sda1)' + shift + case "$option" in + test x '!=' x + entry='Windows 7 (loader) (on /dev/sda1)' + test 0 -gt 0 + test 'xWindows 7 (loader) (on /dev/sda1)' = x + '[' -z '' ']' + bootdir=/boot + '[' -n '' ']' ++ echo /boot/grub ++ sed 's,//*,/,g' + grubdir=/boot/grub ++ /usr/bin/grub2-editenv /boot/grub/grubenv list ++ sed -n 's/^prev_saved_entry=//p' /usr/bin/grub2-editenv: error: cannot open `/boot/grub/grubenv.new': No such file or directory. + prev_saved_entry= + '[' '' ']' + /usr/bin/grub2-editenv /boot/grub/grubenv set 'next_entry=Windows 7 (loader) (on /dev/sda1)' /usr/bin/grub2-editenv: error: cannot open `/boot/grub/grubenv.new': No such file or directory. + exit 0 ############ When a symlink /boot/grub2 → /boot/grub is created the script works as expected. Needs patching in the installation process. Reproducible: Always Steps to Reproduce: 1. run grub2-reboot 'entry' Actual Results: script fails upon not being able to find /boot/grub Expected Results: expect script to set a single-time default grub entry for next reboot
Read your elog messages: I moved /boot/grub2 to /boot/grub with the last grub revbump (grub-2.00_p5107-r1). Sorry for the confusion, but it's better to have it there long-term. Please re-run grub2-install and grub2-mkconfig.