Announcement

Collapse
No announcement yet.

choosing boot option at reboot

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    choosing boot option at reboot

    Hi, new to Kubuntu. A long time ago I used Mandrake/Mandriva. I could choose reboot using Grub and, from a dropdown, select what to reboot to - MS windows, the default kernel, older kernel, safe mode, whatever. Is there a way to do that now? It's a PITA to sit and wait for the boot menu if I want to boot anything except the default.

    FF

    Sorry, belay that. I'm finding it now, just did a poor job of searching before

    FF

    #2
    The GRUB menu gives you those options, if you have dual boot. If not, hit ESC after BIOS loads and the GRUB menu will come up.

    Comment


      #3
      Thank you. That's not quite what I meant. I thought I found the solution but grub-reboot doesn't offer a menu?

      IIRC I went to the app menu just like now, went to the power icon, chose reboot, chose the boot option from a drop-down a menu, then walked away to get a cup of coffee. The machine shut down and rebooted into whichever I had chosen. If I just clicked on reboot it booted the default, same as if I were rebooting from MSwin. I could go fix a sandwich and when I came back my choice would be booted. No need to hang around through the shutdown and BIOS loading.

      My apologies for the vague memory, but it was a long time ago :-)

      FF

      Comment


        #4
        They had grub configured differently/ Also likely you were using legacy grub back then and now we're using grub 2.

        This may help (skip to the grub 2 part): https://wiki.debian.org/GrubReboot

        Please Read Me

        Comment


          #5
          The functionality is there:
          stuart@skull:~$ grub-reboot --help
          Usage: 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
          --boot-directory=DIR 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 identifier. 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 thi
          s is available
          in the GRUB Manual in the section about the 'default' command.

          NOTE: In cases where GRUB cannot write to the environment block, such as when it is stored on an MDRAID or LVM device, the chosen boo
          t menu entry will remain the default even after reboot.

          Report bugs to <bug-grub@gnu.org>.

          Seems easy enough to script. Surely someone has written one.

          Please Read Me

          Comment


            #6
            This will get you a list of bootable menu entries:

            Code:
            [FONT=monospace][COLOR=#000000]grep -i "menuentry '" /boot/grub/grub.cfg | awk -F "'" '{ print $2 }'[/COLOR][/FONT]
            sample output:
            Code:
            [FONT=monospace][COLOR=#000000]neon GNU/Linux[/COLOR]
            neon GNU/Linux, with Linux 5.0.0-23-generic
            neon GNU/Linux, with Linux 5.0.0-23-generic (recovery mode)
            neon GNU/Linux, with Linux 4.18.0-25-generic
            neon GNU/Linux, with Linux 4.18.0-25-generic (recovery mode)
            Memory test (memtest86+)
            Memory test (memtest86+, serial console 115200)
            Windows 10 (on /dev/sdb1)
            
            [/FONT]

            Please Read Me

            Comment


              #7
              Alternatively, you could:
              - Use rEFInd as a boot manager.
              - Make a little script that asks you which OS you want to boot, and grep-and-replace the string in refind.conf.

              The advantage of rEFInd (it has many, but in this case) is that you don't have to sudo-update it.
              It updates itself at boot (it's fast).
              And the config file is dead simple.

              Alternatively, you could (·:
              Improve your startup and shutdown times, and forget about it...

              Comment


                #8
                NOTE: In cases where GRUB cannot write to the environment block, such as when it is stored on an MDRAID or LVM device, the chosen boot menu entry will remain the default even after reboot.
                This still applies to btrfs, too (at least for the grub version in disco).
                Regards, John Little

                Comment


                  #9
                  This is what I do

                  sudo "text editor" /etc/default/grub

                  set the following lines:

                  GRUB_DEFAULT=saved
                  GRUB_SAVEDEFAULT=true

                  Save and exit the file.
                  Run the command: sudo update-grub

                  Now you will automatically boot into the last OS being used
                  Dell OptiPlex 9010 SFF, 8GB RAM, i7 3770, Kubuntu 18.04, MB 051FJ8

                  Comment

                  Working...
                  X