Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Hardware & Devices
  4. how to get grub to load "last selected OS"?

how to get grub to load "last selected OS"?

Scheduled Pinned Locked Moved Hardware & Devices
linuxquestiontutorialannouncement
9 Posts 1 Posters 31 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    I hope this question belogs here. I have asked this many times and still have no real answer. In multiboot ( all Linux) system "grub" has an option to boot (automatically) last used OS. When "grub" menu is displayed such " saved " OS is indicated by asterisk (*) as first character on the line. However, UEFI gets into the act and FIRST option in "grub" menu is an entry "*Ubuntu" and it is marked , incorrectly , as "last saved OS used". Allegedly, UEFi "boot firmware " also monitors last SUCCESSFULLY used OS... No matter how often I change "grub" options - and then update grub - the menu ALWAYS set the asterisk next to the "Ubuntu" label. It only works when I install new , clean Ubuntu using ISO. ...and I do change the OS using other then "Ubuntu" option in "grub" menu...

    L 1 Reply Last reply
    0
    • L Lost User

      I hope this question belogs here. I have asked this many times and still have no real answer. In multiboot ( all Linux) system "grub" has an option to boot (automatically) last used OS. When "grub" menu is displayed such " saved " OS is indicated by asterisk (*) as first character on the line. However, UEFI gets into the act and FIRST option in "grub" menu is an entry "*Ubuntu" and it is marked , incorrectly , as "last saved OS used". Allegedly, UEFi "boot firmware " also monitors last SUCCESSFULLY used OS... No matter how often I change "grub" options - and then update grub - the menu ALWAYS set the asterisk next to the "Ubuntu" label. It only works when I install new , clean Ubuntu using ISO. ...and I do change the OS using other then "Ubuntu" option in "grub" menu...

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      I have done this successfully in the past using the edit feature on the grub menu. As far as I am aware UEFI only controls which device the system boots from.

      L 1 Reply Last reply
      0
      • L Lost User

        I have done this successfully in the past using the edit feature on the grub menu. As far as I am aware UEFI only controls which device the system boots from.

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        It does not help me if it works for you. I need somebody to tell me why it works the way it does on my hardware.

        L 2 Replies Last reply
        0
        • L Lost User

          It does not help me if it works for you. I need somebody to tell me why it works the way it does on my hardware.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Member 14968771 wrote:

          I need somebody to tell me why it works the way it does on my hardware.

          And how are we expected to do that, given we have no access to your system?

          1 Reply Last reply
          0
          • L Lost User

            It does not help me if it works for you. I need somebody to tell me why it works the way it does on my hardware.

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            See Ubuntu GRUB Linux Bootloader and Configuration[^].

            L 1 Reply Last reply
            0
            • L Lost User

              See Ubuntu GRUB Linux Bootloader and Configuration[^].

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              I did look at the link, it still does not help finding the relations between "hardware" - firmware setting when multiple OS is involved. I am including part of copy of the most recent OS upgrade

              Generating grub configuration file ...
              Found linux image: /boot/vmlinuz-5.13.0-40-generic
              Found initrd image: /boot/initrd.img-5.13.0-40-generic
              Found linux image: /boot/vmlinuz-5.13.0-39-generic
              Found initrd image: /boot/initrd.img-5.13.0-39-generic
              Found linux image: /boot/vmlinuz-5.13.0-37-generic
              Found initrd image: /boot/initrd.img-5.13.0-37-generic
              Found Ubuntu 21.04 (21.04) on /dev/sda2
              Found Ubuntu 21.10 (21.10) on /dev/sda4
              Found Ubuntu 21.04 (21.04) on /dev/sda5
              Found Ubuntu 21.10 (21.10) on /dev/sdb22
              Found Ubuntu 21.04 (21.04) on /dev/sdb23
              Found Ubuntu 21.04 (21.04) on /dev/sdb25
              Found Ubuntu 21.04 (21.04) on /dev/sdb3
              Found Ubuntu 21.04 (21.04) on /dev/sdb6
              Found Ubuntu 21.10 (21.10) on /dev/sdc17
              Found Ubuntu 20.10 (20.10) on /dev/sdc2
              Found Ubuntu 21.04 (21.04) on /dev/sdc3
              Found Ubuntu 20.10 (20.10) on /dev/sdc4
              Found Ubuntu 21.10 (21.10) on /dev/sde10
              Found Ubuntu 21.10 (21.10) on /dev/sde30
              Adding boot menu entry for UEFI Firmware Settings
              done
              q5@q5-desktop:~$

              The upgrade was performed on /dev/sde31 partition , I should be able to manually set the /dev/sde31 grub default file to activate "save last OS used " . Most of these "upgrades " wipe out this settingn ! I have done that multiple times and it never works. The "grub menu" always select "ubuntu" and in general runs the first menu - such as /dev/sda2. There are multiple "ubuntu" files in "setup" and I really do not know how to access these "ubuntu" files to determine which one is actually used. Since "ubuntu" selection in grub menu is BEFORE the system is active I cannot simply "cut and copy" the "grub menu" to post here . Anybody who uses multiple OS system (ubuntu) will be able to understand this . Since I have never run single OS my guess is "grub" menu should not show on such system...no need for multiple OS selection...

              L 1 Reply Last reply
              0
              • L Lost User

                I did look at the link, it still does not help finding the relations between "hardware" - firmware setting when multiple OS is involved. I am including part of copy of the most recent OS upgrade

                Generating grub configuration file ...
                Found linux image: /boot/vmlinuz-5.13.0-40-generic
                Found initrd image: /boot/initrd.img-5.13.0-40-generic
                Found linux image: /boot/vmlinuz-5.13.0-39-generic
                Found initrd image: /boot/initrd.img-5.13.0-39-generic
                Found linux image: /boot/vmlinuz-5.13.0-37-generic
                Found initrd image: /boot/initrd.img-5.13.0-37-generic
                Found Ubuntu 21.04 (21.04) on /dev/sda2
                Found Ubuntu 21.10 (21.10) on /dev/sda4
                Found Ubuntu 21.04 (21.04) on /dev/sda5
                Found Ubuntu 21.10 (21.10) on /dev/sdb22
                Found Ubuntu 21.04 (21.04) on /dev/sdb23
                Found Ubuntu 21.04 (21.04) on /dev/sdb25
                Found Ubuntu 21.04 (21.04) on /dev/sdb3
                Found Ubuntu 21.04 (21.04) on /dev/sdb6
                Found Ubuntu 21.10 (21.10) on /dev/sdc17
                Found Ubuntu 20.10 (20.10) on /dev/sdc2
                Found Ubuntu 21.04 (21.04) on /dev/sdc3
                Found Ubuntu 20.10 (20.10) on /dev/sdc4
                Found Ubuntu 21.10 (21.10) on /dev/sde10
                Found Ubuntu 21.10 (21.10) on /dev/sde30
                Adding boot menu entry for UEFI Firmware Settings
                done
                q5@q5-desktop:~$

                The upgrade was performed on /dev/sde31 partition , I should be able to manually set the /dev/sde31 grub default file to activate "save last OS used " . Most of these "upgrades " wipe out this settingn ! I have done that multiple times and it never works. The "grub menu" always select "ubuntu" and in general runs the first menu - such as /dev/sda2. There are multiple "ubuntu" files in "setup" and I really do not know how to access these "ubuntu" files to determine which one is actually used. Since "ubuntu" selection in grub menu is BEFORE the system is active I cannot simply "cut and copy" the "grub menu" to post here . Anybody who uses multiple OS system (ubuntu) will be able to understand this . Since I have never run single OS my guess is "grub" menu should not show on such system...no need for multiple OS selection...

                L Offline
                L Offline
                Lost User
                wrote on last edited by
                #7

                Sorry, I cannot offer any suggestions beyond what is in that link. But I am a little concerned as to all those different devices in use on your system. Maybe it's time for a complete reinstall from clean.

                L 1 Reply Last reply
                0
                • L Lost User

                  Sorry, I cannot offer any suggestions beyond what is in that link. But I am a little concerned as to all those different devices in use on your system. Maybe it's time for a complete reinstall from clean.

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  The problem is - as can be seen - I have done the clean install (of OS) many times and the "select last used OS" only works on clean ISO. I do not like new installs because I have to start all over to install all the "support" software I am using. I do manage to keep my software stuff most of the time... I really need someone to tell me about these "ubuntu" files and how they fit into OS loading process. They seems to reside on different HDD and I do not know how "UEFI " setup manages them.

                  L 1 Reply Last reply
                  0
                  • L Lost User

                    The problem is - as can be seen - I have done the clean install (of OS) many times and the "select last used OS" only works on clean ISO. I do not like new installs because I have to start all over to install all the "support" software I am using. I do manage to keep my software stuff most of the time... I really need someone to tell me about these "ubuntu" files and how they fit into OS loading process. They seems to reside on different HDD and I do not know how "UEFI " setup manages them.

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #9

                    Sorry, I have use ubuntu in multi-boot situations a number of times and have never encountered anything like the situation you are showing. I can only suggest you find a specialist Linux support website where you may find someone with a deeper knowledge.

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups