I have two Harddrives installed in a PC, both have MATE 24.04 on them. Individually, they both boot. I cannot get the Grub menu, using “sudo update-grub”, to display a menu with two choices as to which HD to boot into.
I ran update-grub on both Hds individually, then returned to the Primary HD and ran grub again – subsequent booting does not give two choices in the grub menu, only the primary HD boots. On another PC I have MATE and Win10, each on their own drive, the grub menu displays the two choices. Boot choice on that computer seemed easy to get going.**
I would appreciate it if someone would provide rather clear, detailed steps to get both HDs offered in the grub boot menu.**
Only one grub system will be used; your machine firmware settings usually control the bootable drive; but there is great variation in hardware & booting is really a hardware specific detail (the OS is the last step of that process).
My understanding of your system from your first paragraph is your have two installs, on one install that Ubuntu MATE 24.04 system was the only Ubuntu system it was aware of, or was a single OS thus the need to scan other drive/devices/partitions was not tagged; as is default with grub 2.06+
Your second Ubuntu MATE 24.04 LTS may have knowledge of the other OS and thus may offer both, but that won't matter at all, IF this isn't the grub your machine firmware passes control too... ie. only one version of grub will be used by your machine during boot.
( Please note: I have no idea how you installed; I'm describing only one possibility of where you can get what you describe. Also that you have two drives, or had two installs on the same drive could result in the same circumstance; its the result of install, of which I have no details; and probably doesn't matter )
Do you know which grub is being used by your system?
ie. if you sudo update-grub you should see what OSes options will be offered on boot WHEN that grub is offered. Are your two installs giving the same output when you run update-grub? as you'll be using the one the matches the update its update-grub displays when it runs.
I'm betting you don't see the other OSes in one of your installs; thus you need to patch that grub & allow it to scan other OSes.. Ubuntu carries patches to allow this; but if a system is seen as single-OS during install; this patch isn't used.
You can alternatively boot the other Ubuntu-MATE and have its grub take ownership of the boot, using grub-install.
I believe I caused some confusion, plus I was not able to follow all that you said. First, running grub on each drive independently and then with both HDs connected was just a shot in the dark - hoping that that was the problem. So let me sort of start over again.
Each drive has 24.04 installed independently, ie, one at a time with the other drive not connected. And so each can boot independently. If both are connected, the
BIOS setting must be changed to adjust boot priority. Now I could of course, leave both HDs connected and go to one or the other via the BIOS, but of course, this is not very practical.
I ran update-grub as you suggested and differences are shown below:
Update-grub on Primary drive, both HDs plugged in:
mark@mark:~$ sudo update-grub [sudo] password for mark: Sourcing file `/etc/default/grub' Generating grub configuration file ... Found linux image: /boot/vmlinuz-6.8.0-47-generic Found initrd image: /boot/initrd.img-6.8.0-47-generic Found linux image: /boot/vmlinuz-6.8.0-45-generic Found initrd image: /boot/initrd.img-6.8.0-45-generic Found memtest86+ 64bit EFI image: /boot/memtest86+x64.efi Warning: os-prober will not be executed to detect other bootable partitions. Systems on them will not be added to the GRUB boot configuration. Check GRUB_DISABLE_OS_PROBER documentation entry. Adding boot menu entry for UEFI Firmware Settings ... done
Update-grub on Secondary HD, only this HD plugged in (oops, maybe should have had both plugged in?):
mark@mark:~$ sudo update-grub
[sudo] password for mark:
Sourcing file `/etc/default/grub'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.8.0-31-generic
Found initrd image: /boot/initrd.img-6.8.0-31-generic
Found memtest86+ 64bit EFI image: /boot/memtest86+x64.efi
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ... done
I hope this info is helpful? Of note again, I had no trouble establishing dual boot with a MATE HD and a Win10 HD on same computer. Grub picked up both systems and gave choice in its menu.
If you removed or disabled a drive for a new install; the install was made as a single-boot system, and with Grub 2.06 & later that will means no other OSes will be searched for, which is the default GNU Grub2.06 & newer behavior for security reasons... You triggered this with your type of install
Ubuntu includes patches to revert this behavior (ie. to keep behavior consistent with prior releases where dual boot install is detected), but your install method didn't match a dual-boot install so default GNU Grub security was used.
As for reverting this, I'll refer you to @ugnvs earlier prior response. This response maybe useful in understanding the 'why'.
I replied to you via email method, but my response does not show.
I will respond again a little later today. I followed @ugnvs and "get the picture of what the problem is all about". I modified the grub file on the 1st drive such that the expanded grub menu now shows the 2nd HD boot option, but received an error message when booting that option.
o.k. I altered the grub file on the 1st HD (primary HD) show "OS_PROBER=false". The grub menu now shows both drives. However, selecting in the grub menu the 2nd HD to boot, an error message occurs. Please see the images.
Do you have any suggestions?
mark@mark:~$ sudo update-grub [sudo] password for mark: Sourcing file `/etc/default/grub' Generating grub configuration file ... Found linux image: /boot/vmlinuz-6.8.0-47-generic Found initrd image: /boot/initrd.img-6.8.0-47-generic Found linux image: /boot/vmlinuz-6.8.0-45-generic Found initrd image: /boot/initrd.img-6.8.0-45-generic Found memtest86+ 64bit EFI image: /boot/memtest86+x64.efi Warning: os-prober will be executed to detect other bootable partitions. Its output will be used to detect bootable binaries on them and create new boot entries. Found Ubuntu 24.04 LTS (24.04) on /dev/sda2 Adding boot menu entry for UEFI Firmware Settings ... done
The error "no such device" tells that given UUID is not found. It is not clear why partition on the second drive can not be found by UUID. Try to identify which partition has that UUID using lsblk -f command like this
"lsblk -f" generates a long list; i have included below what I believe is relevant. UUID is a bit over my head, but willing to try.
However, I am going to install 24.04.01 on the 2nd HD, then run grub from 1st HD and see what happens. Normally I unplug which ever HD I am not installing to just for safety. In this case, I will install with both HDs plugged in.
First, make sure that the following line is active in /etc/default/grub: "GRUB_DISABLE_OS_PROBER=false to /etc/default/grub.
Second, do a reinstall of 24.04.1 on the 2nd HD with the 1st HD (primary) connected.
Third, run grub-update on the 1st (primary) HD and reboot.
The grub menu now displays the dual boot choice. Interestingly, when I first selected the 2nd HD from the first displayed grub menu, it presents a "second menu" where I selected the 2nd HD again; it then boots the 2nd HD. On the next computer boot there was no "second menu".
Thanks for trying to help me and very generally giving me a better understanding of use of grub.