How to multi-boot via multiple drives on UEFI?

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
User avatar
GS3
Level 8
Level 8
Posts: 2384
Joined: Fri Jan 06, 2017 7:51 am

Re: How to multi-boot via multiple drives on UEFI?

Post by GS3 »

Dirkoir wrote: Wed Feb 24, 2021 7:40 pmYes, multi-boots and multiple OS installations have become way too complicated and risky, and failing often in this horrible UEFI world. (ALL my attempts to boot from clones made on external USB disks have so far failed, except for the Win8 case in one situation in the past)
Just guessing here but I think the BIOS sees a drive connected with ATA/SATA and the same drive connected through USB very differently. If connected directy to the mobo with ATA/SATA then it sees it as a "real" drive and can access SMART data, boot from it, etc whereas if it is connected via USB it sees it only as memory but will not boot from it. There is an extra translation layer which prevents it. I do not think I have ever been able to boot from a HDD connected via USB. I do not think the mobo sees it as a bootable device. On the other hand you can boot from a USB pendrive so go figure.

In my case, I have just installed LM20.1 on my new SSD and so far so good. Three separate LM (18, 19, 20) physical drives and when the computer starts up in BIOS I get FOUR Ubuntu choices. In three of them I get GRUB showing all three choices but in one of them only 18 and 19 show and 20 is missing. Go figure. For now I am not going to try fixing anything because I do not want to take any risks of messing things up.

I have never tried installing two OS on the same physical drive; things are complicated enough even when using separate drives. Using separate drives I have always been able to get things working even if after some problems. Like you, I like to have the new OS for some time while I configure it before I discard the old one.
Please do not use animated GIFs in avatars because many of us find them distracting and obnoxious. Thank you.
Dirkoir
Level 4
Level 4
Posts: 329
Joined: Wed Jul 30, 2014 12:43 pm

Re: How to multi-boot via multiple drives on UEFI?

Post by Dirkoir »

ajgringo619 wrote: Fri Feb 26, 2021 12:47 pm Systemd-boot is a simple boot loader, nothing more. The only thing it will automatically scan for is Windows installations. It also adds a boot entry to go directly into your UEFI BIOS settings.
And does it create a boot menu (like GRUB does) that will pop up during one's startup?
ajgringo619 wrote: Fri Feb 26, 2021 12:47 pm One huge caveat: systemd-boot does not have the equivalent of update-grub. I wrote one myself (a fork of a bash script I found), but it's still in testing.
Wow! Cool effort to make things better! :-)
______
Linux Mint 17 Cinnamon 64-bit | LM19 Cinnamon | LM20.1 MATE | LM20.3 Cinnamon
Dirkoir
Level 4
Level 4
Posts: 329
Joined: Wed Jul 30, 2014 12:43 pm

Re: How to multi-boot via multiple drives on UEFI?

Post by Dirkoir »

GS3 wrote: Sat Feb 27, 2021 5:49 am
Dirkoir wrote: Wed Feb 24, 2021 7:40 pmYes, multi-boots and multiple OS installations have become way too complicated and risky, and failing often in this horrible UEFI world. (ALL my attempts to boot from clones made on external USB disks have so far failed, except for the Win8 case in one situation in the past)
Just guessing here but I think the BIOS sees a drive connected with ATA/SATA and the same drive connected through USB very differently. If connected directy to the mobo with ATA/SATA then it sees it as a "real" drive and can access SMART data, boot from it, etc whereas if it is connected via USB it sees it only as memory but will not boot from it.
My worry, too. So very odd that this USB-issue practically never gets addressed in articles and discussions about multi-booting. Also sad that I rarely come across articles or discussions about bootability of clones. Nearly ALL boot writings I come across only deal with new OS installations.
GS3 wrote: Sat Feb 27, 2021 5:49 am I do not think I have ever been able to boot from a HDD connected via USB.
Good to hear a confirmation from someone else. Another hint that USB connection is a hurdle. (I should add that safe removal is another problem issue)
GS3 wrote: Sat Feb 27, 2021 5:49 am On the other hand you can boot from a USB pendrive so go figure.
Yes, that's been making me wonder about this potential boot hurdle of USB connection, too.

GS3 wrote: Sat Feb 27, 2021 5:49 am In my case, I have just installed LM20.1 on my new SSD and so far so good. Three separate LM (18, 19, 20) physical drives and when the computer starts up in BIOS I get FOUR Ubuntu choices. In three of them I get GRUB showing all three choices but in one of them only 18 and 19 show and 20 is missing.
I fail to understand the BIOS-GRUB connection.
GS3 wrote: Sat Feb 27, 2021 5:49 am I have never tried installing two OS on the same physical drive; things are complicated enough even when using separate drives. Using separate drives I have always been able to get things working even if after some problems.
I bought my work laptop used (because in my precarious life I lack wealth). I came with Windows 8 installed, and since software compatibility could force me switch back to Windows sometimes (and a that time I was myself just freshly switching to Linux) I installed LM17 on that same internal drive (not having another one) without removing Win8. A post in this forum explained well how to do it. It was a lot less problematic as now trying to make multi-boot possible across more than one drive. *sigh*
GS3 wrote: Sat Feb 27, 2021 5:49 am Like you, I like to have the new OS for some time while I configure it before I discard the old one.
Yep. That's the logical approach for power users. We need our computers as tools that need time consuming configuration, and we can't just stop doing our vital work for days or weeks configuring a new OS 24/7.
______
Linux Mint 17 Cinnamon 64-bit | LM19 Cinnamon | LM20.1 MATE | LM20.3 Cinnamon
ajgringo619

Re: How to multi-boot via multiple drives on UEFI?

Post by ajgringo619 »

ajgringo619 wrote: Fri Feb 26, 2021 12:47 pm Systemd-boot is a simple boot loader, nothing more. The only thing it will automatically scan for is Windows installations. It also adds a boot entry to go directly into your UEFI BIOS settings.
Dirkoir wrote: Sat Feb 27, 2021 11:39 amAnd does it create a boot menu (like GRUB does) that will pop up during one's startup?
Yes. Here's an example of one I have created for my test VMs:
systemd-boot-menu.jpg
ajgringo619 wrote: Fri Feb 26, 2021 12:47 pm One huge caveat: systemd-boot does not have the equivalent of update-grub. I wrote one myself (a fork of a bash script I found), but it's still in testing.
Dirkoir wrote: Sat Feb 27, 2021 11:39 amWow! Cool effort to make things better! :-)
Thanks. I still have a long way to go, but it's getting closer.
Dirkoir
Level 4
Level 4
Posts: 329
Joined: Wed Jul 30, 2014 12:43 pm

Re: How to multi-boot via multiple drives on UEFI?

Post by Dirkoir »

Being in desperate need for finally getting the recent LM version (since LM 17 no longer meets certain Internet requirements), I finally made a second attempt to install it as an extra OS on an extra drive (sdb). And, while the first attempt a month or two ago had looked like it was working but at the end had utterly failed (possibly because legacy mode was allowed), this time -- following good advice -- I did get LM 20.1 MATE installed, BUT I was stabbed in the back nevertheless.

I followed the
viewtopic.php?p=2023951#p2023951
suggestions as much as possible. (sadly NOT 100% possible)

After setting "UEFI/Legacy Boot" to [UEFI Only] and "CSM Support" to [No] in my "ThinkPad Setup" (which is the name of the UEFI-firmware BIOS-like interface on my main laptop reached with the F1-key during startup), my LM20.1 MATE installer DVD would no longer boot (many, many tries). I even burnt me a new LM20.1 MATE installer DVD after having booted LM 17 on sda under these conditions in the hope to get a LM20.1 MATE installer DVD that would boot under these UEFI-only settings. But it didn't help.

So, I switched "CSM Support" on again (but left the "UEFI/Legacy Boot" at [UEFI Only]). I still had several boot failures, but eventually the DVD finally did boot. (Who knows why?)

I then went through the many (and partly very obscure) steps of installing LM 20.1 MATE on sdb2 with its ESP on sdb1 (sdb1 to be exact, but asked by me merely for sdb as suggested). (And, by the way, in the partition table making with GParted I had to manually switch from a silly [ms dos] default setting to [GPT], though. Yikes! MSDOS as default in 2021???)

Picking sdb2 for the LM 20.1 MATE install was incredibly obscure to achieve. Clicking on the partition for "Change" only gave drop-down options not including this. When I finally picked the Ext4 blabla from it ("Ext 4 journaling file system") I finally got another dialog where I could enter a "Mount point" where I then entered the root slash (/) and -- because perhaps not yet formatted by GParted -- I also checked the formatting checkbox. That finally worked.

But...

The backstab:

When restarting, LM 20.1 MATE booted by default WITHOUT giving me a GRUB2 menu, AND when I entered the "ThinkPad Setup" (the UEFI firmware BIOS equivalent) I only found among booting options the Windows 8 (that's on sda like LM 17 is) and Ubuntu (set at the top of the boot order). This Ubuntu clearly is LM 20.1 MATE. But the LM 17 (which I think was also called Ubuntu in the BIOS equivalent (but I don't know for sure) while maybe actually called LM 17 in the GRUB2 menu (also not sure)) has disappeared.

Apparently the LM 20.1 MATE installer erased the sda's LM 17 "Ubuntu" entry from the firmware's NVRAM. Thanks a lot! :-( --- And this despite me using the 'something else' option! I wonder if the switching off of the esp and boot flags on the sda's ESP partition or the 'something else' option itself is the reason for the installer (or the firmware ?) to erase the access to the older Linux Mint installation. (Or could it have even been my error of forgetting to re-establish the esp and boot flags on the sda's ESP partition before the restart (an error I fixed after the restart)?)

Out of my utter despair (needing the well configured LM 17 to continue my daily things to do until in the far future I have LM 20.1 properly configured) I then installed rEFInd even though on my other laptop ("travel laptop") rEFInd had been hit with "secure boot" blue screens DESPITE having "secure boot" turned off. After all, I had figured out how to let the other laptop boot again (by moving rEFInd in the UEFI firmware (BIOS equivalent) down from the top of the boot options). So, I were fairly sure I could do that on my main laptop, too, if necessary.

BUT -- Surpise! -- on this laptop rEFInd has not been attacked with those blue screens. So, GRUB has utterly abandoned me (even update-grub and boot-repair did nothing for me) and only rEFInd rescued me. Let's hope rEFInd stays alive for years to come. And tips of how to fix the GRUB and/or UEFI firmware mess if it's possible would be welcome.

Holy moly!
______
Linux Mint 17 Cinnamon 64-bit | LM19 Cinnamon | LM20.1 MATE | LM20.3 Cinnamon
Dirkoir
Level 4
Level 4
Posts: 329
Joined: Wed Jul 30, 2014 12:43 pm

Re: How to multi-boot via multiple drives on UEFI?

Post by Dirkoir »

BTW, report by update-grub even looked as if it might have repaired the issue:

Code: Select all

~$ sudo update-grub
[sudo] password for dirkoir:       
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/50_linuxmint.cfg'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.4.0-58-generic
Found initrd image: /boot/initrd.img-5.4.0-58-generic
Found Windows Boot Manager on /dev/sda2@/efi/Microsoft/Boot/bootmgfw.efi
Found Linux Mint 17 Qiana (17) on /dev/sda6
Adding boot menu entry for UEFI Firmware Settings
done
But no. Without rEFInd there comes no boot menu. :-(
______
Linux Mint 17 Cinnamon 64-bit | LM19 Cinnamon | LM20.1 MATE | LM20.3 Cinnamon
User avatar
AndyMH
Level 21
Level 21
Posts: 13757
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: How to multi-boot via multiple drives on UEFI?

Post by AndyMH »

What model thinkpad?
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Dirkoir
Level 4
Level 4
Posts: 329
Joined: Wed Jul 30, 2014 12:43 pm

Re: How to multi-boot via multiple drives on UEFI?

Post by Dirkoir »

AndyMH wrote: Fri Jun 18, 2021 5:22 am What model thinkpad?
Lenovo Thinkpad Edge E540
______
Linux Mint 17 Cinnamon 64-bit | LM19 Cinnamon | LM20.1 MATE | LM20.3 Cinnamon
User avatar
AndyMH
Level 21
Level 21
Posts: 13757
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: How to multi-boot via multiple drives on UEFI?

Post by AndyMH »

And this despite me using the 'something else' option! I wonder if the switching off of the esp and boot flags on the sda's ESP partition or the 'something else' option itself is the reason for the installer (or the firmware ?) to erase the access to the older Linux Mint installation. (Or could it have even been my error of forgetting to re-establish the esp and boot flags on the sda's ESP partition before the restart (an error I fixed after the restart)?)
That wouldn't help.

On my desktop, it won't boot from a usb stick with the BIOS set UEFI and it will only boot from the nvme pcie drive in UEFI mode. I was able to install mint and win10 by writing the isos to DVD and booting from them. This was with sticks generated with mint's usb image writer.

From what you have said with rEFind it boots win/LM20/LM17? I wonder if you have LM17 installed in legacy mode. You can check with efibootmgr:

Code: Select all

andy@T432 ~ $ efibootmgr
EFI variables are not supported on this system.
this is LM20 booting in legacy mode.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Dirkoir
Level 4
Level 4
Posts: 329
Joined: Wed Jul 30, 2014 12:43 pm

Re: How to multi-boot via multiple drives on UEFI?

Post by Dirkoir »

AndyMH wrote: Fri Jun 18, 2021 12:26 pm That wouldn't help.
What wouldn't help?

AndyMH wrote: Fri Jun 18, 2021 12:26 pm On my desktop, it won't boot from a usb stick with the BIOS set UEFI and it will only boot from the nvme pcie drive in UEFI mode. I was able to install mint and win10 by writing the isos to DVD and booting from them. This was with sticks generated with mint's usb image writer.
So... if the DVD only boots under legacy mode, how can one then have the 'BIOS' set to only UEFI mode in order to prevent the Linux Mint installer from trying to install in legacy mode and fail on a UEFI-built drive? I read of UEFI mode being necessary for the installer and myself had an installation failure somea month or two ago when I had not set the 'BIOS' to UEFI-only. And yesterday I did get through with UEFI-only mode, but only after permitting "CSM Support" again. But even then, the DVD failed to boot several times but then suddenly succeeded. Very confusing.

AndyMH wrote: Fri Jun 18, 2021 12:26 pm From what you have said with rEFind it boots win/LM20/LM17? I wonder if you have LM17 installed in legacy mode. You can check with efibootmgr:
sudo efibootmgr works on my LM 17.
______
Linux Mint 17 Cinnamon 64-bit | LM19 Cinnamon | LM20.1 MATE | LM20.3 Cinnamon
Dirkoir
Level 4
Level 4
Posts: 329
Joined: Wed Jul 30, 2014 12:43 pm

Re: How to multi-boot via multiple drives on UEFI?

Post by Dirkoir »

Some more infos:

During booting sdb's LM 20.1 MATE I get a brief ACPI errors flash on the dark screen (not so when booting sda's LM 17).

--- --- ---

Also, boot-repair run on LM 20.1 MATE gave one error (coming from efibootmgr):

"Locked-NVRAM detected."

More detailed in its Boot-info report file:

Error: NVram is locked (Linuxmint not found in efibootmgr).

--- --- ---

Other problems I currently have is partitions access:

When booting LM 17 (on sda), all of the sdb partitions (except the ESP) show up in Nemo as "Devices" but cannot be mounted (with the exception of a FAT32 partition I made --- so all the ext4 partitions cannot be mounted). (and the LM 20.1 MATE partition is listed only by size, not its name or label --- but possibly only after I picked a Timeshift "location").

Example of those mount failure errors:

Code: Select all

Error mounting /dev/sdb5 at /media/dirkoir/d2Data: Command-line `mount -t "ext4" -o "uhelper=udisks2,nodev,nosuid" "/dev/sdb5" "/media/dirkoir/d2Data"' exited with non-zero exit status 32: mount: wrong fs type, bad option, bad superblock on /dev/sdb5,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

Oddly, sdb's LM 20.1 MATE's Nemo can not only see but also mount the sda's ext4 partitions (plus sda's Windows 8 partition) as "Devices".
______
Linux Mint 17 Cinnamon 64-bit | LM19 Cinnamon | LM20.1 MATE | LM20.3 Cinnamon
Dirkoir
Level 4
Level 4
Posts: 329
Joined: Wed Jul 30, 2014 12:43 pm

Re: How to multi-boot via multiple drives on UEFI?

Post by Dirkoir »

Hmm... too bad I was stuck in extreme time and energy consuming work plus relocation... and coming back into this thread there are no continuations despite several unsolved issues. Investigating or even clarifying or solving them could be useful for anybody else for whom a single boot drive and OS are not sufficient.
______
Linux Mint 17 Cinnamon 64-bit | LM19 Cinnamon | LM20.1 MATE | LM20.3 Cinnamon
Locked

Return to “Beginner Questions”