Web lists-archives.com

Re: Booting once on a different OS (with grub)

On Fri, 22 Jun 2018, Pétùr wrote:

Is there a way to tell grub to boot the next time (and only this time)
to a different OS than the default one?

   $ man -k reboot
   grub-reboot (8) - set the default boot entry for GRUB, for the next
   boot only

Caveat: I have never used it.

   $ man grub-reboot

   GRUB-REBOOT(8)  System Administration Utilities    GRUB-REBOOT(8)

          grub-reboot - set the default boot entry for GRUB, for the
          next boot only

          grub-reboot [OPTION] MENU_ENTRY

          Set the default boot menu entry for GRUB, for the next boot only.

          -h, --help
                 print this message and exit

          -V, --version
                 print the version information and exit

                 expect GRUB images under the directory DIR/grub
                 instead of the /boot/grub directory

          MENU_ENTRY is a number, a menu item title or a menu item

	  Please note that menu items in submenus or sub-submenus
          require specifying the submenu components and then the menu
          item component.  The titles should be separated using the
          greater-than character (>) with no extra spaces.

	  Depending on your shell some characters including > may need
          escaping. More information about this is available in the
          GRUB Manual in the section about the 'default' command.

I have a bluetooth keyboard which does not work in grub. This is why
I want to tell grub, while I am on debian, to boot at the next reboot
to entry n°3 (which is a window I keep for some specific softwares).

I do not want to change grub order each time. I am looking more to
something like "touch /forcefsck" to force check filesystem (but for
booting to entry 3 in grub).

Good luck.