Author Topic: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1  (Read 35420 times)

Pete

  • Hero Member
  • *****
  • Posts: 1352
  • Karma: +11/-0
    • View Profile
Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
« Reply #30 on: November 01, 2023, 05:32:02 am »
Hi Dave

No install script used here, simply unzipped and followed manual install instructions - Basically copy the refind dir to ESP:/EFI/refind and then delete the unneeded bits in my case leaving

Y:\EFI\REFIND>dir

Volume in drive Y has no label.
The Volume Serial Number is E0F8:0378.
Directory of Y:\EFI\refind

29-10-23   1:35a     <DIR>           0  .
29-10-23   1:35a     <DIR>           0  ..
29-10-23   1:36a     <DIR>           0  icons
29-10-23  12:51p     <DIR>           0  tools_x64
 1-11-23   4:05a     <DIR>           0  vars
 1-11-23   4:03a     36100           0  refind.conf
 6-03-23  11:04p    266936           0  refind_x64.efi
        7 file(s)     303036 bytes used
                    65771520 bytes free

vars directory was created by rEFInd.

Of course, the problem with installing on ArcaOS is that there does not seem to be a way to add rEFInd to the BIOS boot list - unless anyone knows differently?

I did copy refind.efi and the conf file into /EFI/Boot as I thought that was where they needed to be put, but looking back at how I added refind to the BIOS boot list shows why the refind files in /EFI/Boot are not used:-

bcdedit /set "{bootmgr}" path \EFI\refind\refind_x64.efi

The above windows command adds the EFI\refind\refind_x64.efi to the boot order...


Regards

Pete








Dave Yeo

  • Hero Member
  • *****
  • Posts: 5096
  • Karma: +117/-1
    • View Profile
Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
« Reply #31 on: November 01, 2023, 07:13:55 am »
Hi Pete, I originally added rEFInd with the deb, did a lot of beta testing and also upgraded Mint, swapped a HD for an SSD and recently did "apt reinstall refind"
The deb put rEFInd in EFI\boot, here's my current directly listing after installing AOS5.1, renaming oldX64.EFI (I think that was the name) back to BOOTX64.EFI and renaming the AOS BOOTX64.EFI to new_bootx64.efi. I also added some stuff like the fonts directory from the rEFInd zip today.
Reading the documentation, it seems that as long as the refind.conf etc is in the same directory as refind.efi or whatever you rename it to such as BOOTX64.EFI, it will find its stuff. There's also an empty tools directory in the root that was also installed.
Code: [Select]
[U:\EFI\BOOT]dir

The volume label in drive U is EFI_SYSTEM.
The Volume Serial Number is 1CED:064C.
Directory of U:\EFI\BOOT

 9-10-23  8:06p         <DIR>      0 ----  .
 9-10-23  8:06p         <DIR>      0 ----  ..
 9-30-23  2:39p        60,224      0 ---r  LAUNCHER.EFI
10-23-23  8:33p         1,402      0 a---  LAUNCHER.CFG
10-17-23  2:06a         <DIR>      0 ----  keys
10-17-23  2:06a         <DIR>      0 ----  icons
10-31-23  9:08p        36,110      0 a---  refind.conf
10-17-23  2:06a        35,633      0 a---  refind.conf-sample
10-17-23  2:06a           134      0 a---  BOOT.CSV
10-22-23  7:38p         <DIR>      0 a---  vars
 9-30-23  2:39p        60,224      0 ---r  new_bootx64.efi
10-17-23  2:06a       335,904      0 a--r  BOOTX64.EFI
10-31-23  7:36p         <DIR>      0 ----  drivers
 2-21-21  4:39p         <DIR>      0 ----  fonts
       14 file(s)     529,631 bytes used
                    266,104,832 bytes free

Here, it was simple to add/change boot options/order in the BIOS, so rEFInd is now the first choice.
As for changing the boot order list, it was considered at one point to do it, but Arca Noae decided to go as simple as possible, at least for now, with the Wiki to make suggestions on changing things.

Neil Waldhauer

  • Hero Member
  • *****
  • Posts: 1073
  • Karma: +27/-0
    • View Profile
    • Blonde Guy
Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
« Reply #32 on: November 01, 2023, 02:20:55 pm »
Thanks, everybody. If you do succeed in directly booting an old MBR/BIOS-based ArcaOS directly from rEFInd, post it here. Otherwise, I think booting AirBoot is going to be the best we can do.

Directly editing refind.conf and using setboot, I think the defaults can be set appropriately so I can select the next boot volume.
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Pete

  • Hero Member
  • *****
  • Posts: 1352
  • Karma: +11/-0
    • View Profile
Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
« Reply #33 on: November 01, 2023, 03:17:59 pm »
Hi Dave

Not Changing BIOS boot order- Adding to the BIOS boot list.

As AN Launcher adds itself to the BIOS boot list I guess what we need is the code that is used to do that made into a simple utility app that could add other bootable *.efi files (boot managers) to the BIOS boot list rather than booting an alternative OS (Windows) to do the job.


Regards

Pete





Dave Yeo

  • Hero Member
  • *****
  • Posts: 5096
  • Karma: +117/-1
    • View Profile
Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
« Reply #34 on: November 01, 2023, 04:46:20 pm »
Seems to me that you should be able to add new boot options using the UEFI shell.

Rich Walsh

  • Sr. Member
  • ****
  • Posts: 370
  • Karma: +24/-0
  • ONU! (OS/2 is NOT Unix!)
    • View Profile
Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
« Reply #35 on: November 01, 2023, 06:18:24 pm »
If you do succeed in directly booting an old MBR/BIOS-based ArcaOS directly from rEFInd, post it here.

3 years ago while I was still working for AN, I added an undocumented feature which allows you to do exactly what you want:  seamlessly boot both UEFI and CSM-based installs with a menu entry for each in the boot manager of your choice. The only downside is that you lose the DOS video improvements that 5.1 UEFI offers.

I no longer have a CSM/UEFI machine, so I can't confirm that this feature is still in place in 5.1GA (though I have no reason to believe it has been removed). @Neil, if you'd like to try it, send me an email or PM. I'll send you the instructions. If they work for you, I'll post them here.

Pete

  • Hero Member
  • *****
  • Posts: 1352
  • Karma: +11/-0
    • View Profile
Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
« Reply #36 on: November 02, 2023, 07:09:35 pm »
Hi Dave

Well, using the UEFI shell looks like fun but could be the answer to a couple of incorrect descriptions - not sure how - in the boot list:

a] AN Launcher shows as UEFI-OS
b] rEFInd shows as Windows Boot Manager
(Note: the 2 Windows 11 installations also show the name of the disk they are installed to ie Netarac SSD or Crucial P3, so I know which of the 3 Windows Managers is which)

So, the plan was to delete those (a] and b]) entries then add them back to the boot list with the correct descriptions.

My mainboard BIOS did have an option for booting a UEFIShell but that seems to have disappeared...

Downloaded the ShellBinPkg.zip linked into the rEFInd UEFI install instructions and put a copy of shell_x64.efi into \EFI\Boot

Then I used miniLVM, aka Logical Volume Manager (Simple), to re-install AN Launcher as that would pick up the shell_64.efi and offer it as a boot option.
On reboot started AN Launcher and selected shell_x64.efi.

Oh, What Fun!!! - Find the correct fs*: where "*" represents a number
fs0: was the ESP on the SATA drive so changed to fs1: without any problem but issuing ls resulted in system hang
Issuing ls on fs2: caused the same system hang
fs3: turned out to be the correct (NVMe) ESP.

Followed the rEFInd UEFI install instructions steps 12 to 15 to:

1] use bcfg dump -b to get the list of NVRAM entries
2] delete a] and b] entries above.
3] add the rEFInd entry
4] move the rEFInd entry to the top of the boot list

As I had already (re)installed AN Launcher it now had an entry with the correct name so no further action required for that.

Result: Checking BIOS on reboot rEFInd is the 1st entry, AN Launcher is correctly listed and the unwanted entries (a] and b] above) are now gone.

Exited BIOS and rEFInd appeared onscreen.

So, all worked well but it would still be easier to make those NVRAM changes from a nice little ui in ArcaOS.


Regards

Pete

Pete

  • Hero Member
  • *****
  • Posts: 1352
  • Karma: +11/-0
    • View Profile
Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
« Reply #37 on: November 02, 2023, 07:25:45 pm »
Hi All

I seem to recall something about being able to boot both GPT and MBR volumes on the same disk somewhere in the ArcaOS 5.1.0 related docs but have not been able to find it again to check exactly what was stated.

I am wondering what exactly os2ldr.efi does... something to prepare ArcaOS to boot I guess.
Does that end up with starting \os2ldr on the ArcaOS boot drive?

If "Yes" maybe this will work for Neil

menuentry "ArcaOS-H" {
    icon /EFI/BOOT/icons/os_arcaos.png
    loader \EFI\OS2\OS2LDR.EFI
    options "H:"
}


Regards

Pete

Rich Walsh

  • Sr. Member
  • ****
  • Posts: 370
  • Karma: +24/-0
  • ONU! (OS/2 is NOT Unix!)
    • View Profile
Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
« Reply #38 on: November 02, 2023, 08:40:17 pm »
using the UEFI shell looks like fun but could be the answer to a couple of incorrect descriptions - not sure how - in the boot list:
a] AN Launcher shows as UEFI-OS
b] rEFInd shows as Windows Boot Manager

rEFInd shows as Windows Boot Manager because you didn't change the name when you were using 'bcdedit' to change its path to reFind. AN Launcher shows as UEFI-OS because the firmware found another 'BOOTx64.EFI' in your other ESP. You can delete the entry as often as you wish but it will keep coming back until you delete/rename the file.

From a command prompt run 'bootorder /v' to see the list of items in your firmware's bootlist and reorder them as needed. I wrote both 'bootorder' and 'bootdelete', and planned to write a 'bootadd' but quit AN before I got around to it. 'bootorder' made it into 5.1 but 'bootdelete' didn't, so I've attached it here.

I seem to recall something about being able to boot both GPT and MBR volumes on the same disk somewhere in the ArcaOS 5.1.0 related docs but have not been able to find it again to check exactly what was stated.

Perhaps you saw it 2 or 3 postings above this one... (edit: I assume you meant UEFI and BIOS installs on the same disk rather than GPT and MBR)

What really amazes me is that seemingly no one has tried to simply use 'os2ldr.efi' to boot a BIOS-based install in the exact same fashion as a UEFI install. Had they done so, they would have found that all text-mode output is hosed: inital bootup messages and all full-screen sessions are just colored dots at the top of the screen. However, the Desktop comes up just fine and Win/OS2 works as well. The fix I referred to above (if it still works) simply restores text-mode video. Neil has my instructions on how to do so. If it works, I'll post them in a new thread.
« Last Edit: November 02, 2023, 08:44:24 pm by Rich Walsh »

Pete

  • Hero Member
  • *****
  • Posts: 1352
  • Karma: +11/-0
    • View Profile
Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
« Reply #39 on: November 03, 2023, 12:16:05 am »
Hi Rich

Thanks for your explanations re the incorrect boot list descriptions.

Presuming bootdelete works as well as bootorder - Yes, had a quick "play" - the only missing bootlist utility is the bootadd you mention you did not get around to writing before leaving AN.
Any plans to complete your bootlist utilities? :-)

Yes, sorry, probably not the only person to mix up the terms... I thought I'd seen something in the AN docs or wiki... Which led me to suggest the menuentry using OS2LDR.EFI with desired boot drive as the option. Pleased to read that it should work although with text mode problems.


Regards

Pete



Dave Yeo

  • Hero Member
  • *****
  • Posts: 5096
  • Karma: +117/-1
    • View Profile
Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
« Reply #40 on: November 03, 2023, 12:47:25 am »

What really amazes me is that seemingly no one has tried to simply use 'os2ldr.efi' to boot a BIOS-based install in the exact same fashion as a UEFI install. Had they done so, they would have found that all text-mode output is hosed: inital bootup messages and all full-screen sessions are just colored dots at the top of the screen. However, the Desktop comes up just fine and Win/OS2 works as well. The fix I referred to above (if it still works) simply restores text-mode video. Neil has my instructions on how to do so. If it works, I'll post them in a new thread.

Tried this, the BIOS install came up at 640x480, which stuck when I rebooted through airboot and used the screen object to fix.

Neil Waldhauer

  • Hero Member
  • *****
  • Posts: 1073
  • Karma: +27/-0
    • View Profile
    • Blonde Guy
Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
« Reply #41 on: November 03, 2023, 02:22:31 am »
Rich, your instructions do work, and I can boot ArcaOS 5.0 directly from rEFInd.
I can also boot ArcaOS 5.1 directly as I did before.

As you pointed out, DOS window does not work in ArcaOS 5.1, and it never worked in ArcaOS 5.0. This is fine for me, as I rarely use DOS.




Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Rich Walsh

  • Sr. Member
  • ****
  • Posts: 370
  • Karma: +24/-0
  • ONU! (OS/2 is NOT Unix!)
    • View Profile
Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
« Reply #42 on: November 03, 2023, 05:08:48 am »
Rich, your instructions do work, and I can boot ArcaOS 5.0 directly from rEFInd.
I can also boot ArcaOS 5.1 directly as I did before.

As you pointed out, DOS window does not work in ArcaOS 5.1, and it never worked in ArcaOS 5.0. This is fine for me, as I rarely use DOS.

Just to confirm: "success" means you can see whatever messages are displayed during bootup and that you can open full-screen DOS and OS/2 sessions. Is that what you see on both the 5.1 and legacy installs? And yes, if DOS windows didn't work under 5.0, they shouldn't work under this arrangement because you've reverted to 5.0-style video support.

OS4User

  • Sr. Member
  • ****
  • Posts: 406
  • Karma: +10/-0
    • View Profile
Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
« Reply #43 on: November 03, 2023, 08:43:33 am »
I was recently shown such a layout on ESP:
Code: [Select]
EFI
    BOOT
        LAUNCHER.CFG
        LAUNCHER.EFI
    WINDOWS
        {all stuff without changes}
    OS2
        OS2LDR.BIN
        OS2LDR.EFI
    QSINIT
        qsinit.efi
        qsinit.ldi

Here is no bootx64.efi at all.

LAUNCHER.CFG:
Code: [Select]
[menu]
ArcaOS (C:) = \EFI\OS2\OS2LDR.EFI C:
Windows 11  = \EFI\Microsoft\Boot\bootmgfw.efi
QSINIT      = \EFI\QSINIT\qsinit.efi

Rich Walsh

  • Sr. Member
  • ****
  • Posts: 370
  • Karma: +24/-0
  • ONU! (OS/2 is NOT Unix!)
    • View Profile
Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
« Reply #44 on: November 03, 2023, 09:25:36 am »
I was recently shown such a layout on ESP:
[...]
Here is no bootx64.efi at all.

BOOTX64.EFI is a fall-back that is only used if:
* the firmware finds an ESP that has no entries in its boot list but does have this file
or
* the firmware is booting an MBR disk, in which case it always boots this file regardless of the boot list

Basically, the firmware assumes that if it is looking at an MBR disk, it must be a removable disk (i.e. USB stick or the like) that is being used to install an OS. This isn't unreasonable given that 99.9% of all UEFI installs are to GPT disks while most install media are still MBR.