how to get grub to load "last selected OS"?
-
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...
-
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...
-
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.
-
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.
-
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.
-
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...
-
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...
-
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.
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.
-
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.
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.