OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Setup & Installation => Topic started by: Martin Iturbide on September 07, 2023, 04:52:22 am

Title: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Martin Iturbide on September 07, 2023, 04:52:22 am
Hello

Is it real? Was it that easy?

I just installed ArcaOS 5.1 on an UEFI HP Pavillion x360. It has Windows 11 and I wanted a dual boot machine.... and it worked.
It was too easy that I'm still rebooting from one OS to other to see when it will fail  ;D

1) On the UEFI first I disable "Secure Boot". When trying to boot Windows 11 the UEFI BIOS asked me to type a code that was showed on the screen (crazy UEFI stuff).
2) Booted Windows 11 and reduce the size of the Win11 partition to have some free space before it to install ArcaOS. I used Easus Partition Manager on Windows to reduce its size. (Check Dual_001.jpg for reference on how the partitions look like).
3) Booted the ArcaOS Flash drive.
4) Created the partition on the free space.
5) Finish the install
6) It shows a "AN Launcher" where I can select ArcaOS or Windows... (Dual_007.jpg) The only thing is that Windows shows like "old_x86".

I just want to know how to change the names of the options on the "AN Launcher", so I can rename one to "ArcaOS 5.1" and the "Windows 11" the other.
But I'm very happy on how easy it was.

Regards

Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Rich Walsh on September 07, 2023, 06:14:38 am
Is it real? Was it that easy?

Yes, this is exactly the way it's supposed to be: no drama.

Quote
6) It shows a "AN Launcher" where I can select ArcaOS or Windows... (Dual_007.jpg) The only thing is that Windows shows like "old_x86".

I just want to know how to change the names of the options on the "AN Launcher", so I can rename one to "ArcaOS 5.1" and the "Windows 11" the other.

Launcher's Help screen gives a brief how-to; here's a slightly more detailed explanation:
Use MiniLVM to assign a drive letter to your ESP (e.g. 'U:'), then navigate to U:\EFI\BOOT\LAUNCHER.CFG. Open it and edit the "[menu]' section. Each line is in the form "<menu text> = <program>.EFI [options]". Here's my menu:

[menu]
ArcaOS (N:) = \EFI\OS2\OS2LDR.EFI N:
ArcaOS (C:) = \EFI\OS2\OS2LDR.EFI C:
ArcaOS (*) = \EFI\OS2\OS2LDR.EFI
Win11 = \EFI\Microsoft\Boot\bootmgfw.efi
Kubuntu22 = \EFI\ubuntu\shimx64.efi
Shell = \EFI\Boot\shell.efi
Help = ??

Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Roderick Klein on September 07, 2023, 09:17:57 am
That is what makes GPT disc layout a lot easier compared to MBR disc layout. MBR setup, especially with more then one operating booting from a disc an be problematic to say the least.
If you have a setup that currently works, keep it. New to setup that support UEFI boot, dump MBR.
GPT discs, because of the filter driver, is slower then MBR setup disc. But on an SSD or NVMe disc in daily usage you will not really notice the performance the GPT filter driver introduces.

Roderick
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Martin Iturbide on September 07, 2023, 09:13:47 pm
Is it real? Was it that easy?

Yes, this is exactly the way it's supposed to be: no drama.

Quote
6) It shows a "AN Launcher" where I can select ArcaOS or Windows... (Dual_007.jpg) The only thing is that Windows shows like "old_x86".

I just want to know how to change the names of the options on the "AN Launcher", so I can rename one to "ArcaOS 5.1" and the "Windows 11" the other.

Launcher's Help screen gives a brief how-to; here's a slightly more detailed explanation:
Use MiniLVM to assign a drive letter to your ESP (e.g. 'U:'), then navigate to U:\EFI\BOOT\LAUNCHER.CFG. Open it and edit the "[menu]' section. Each line is in the form "<menu text> = <program>.EFI [options]". Here's my menu:

[menu]
ArcaOS (N:) = \EFI\OS2\OS2LDR.EFI N:
ArcaOS (C:) = \EFI\OS2\OS2LDR.EFI C:
ArcaOS (*) = \EFI\OS2\OS2LDR.EFI
Win11 = \EFI\Microsoft\Boot\bootmgfw.efi
Kubuntu22 = \EFI\ubuntu\shimx64.efi
Shell = \EFI\Boot\shell.efi
Help = ??

Thanks Rich for the detailed explanation, I was not able to get that I needed to assign letter to the EFI partition with the little help on the AN Loader.

Which is the difference in functionality between this two?
- ArcaOS (C:) = \EFI\OS2\OS2LDR.EFI C:
- ArcaOS (*) = \EFI\OS2\OS2LDR.EFI

Can I delete the second one? or does it offer something different without the C: ?

Regards
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Rich Walsh on September 08, 2023, 01:10:28 am
Which is the difference in functionality between this two?
- ArcaOS (C:) = \EFI\OS2\OS2LDR.EFI C:
- ArcaOS (*) = \EFI\OS2\OS2LDR.EFI

Can I delete the second one? or does it offer something different without the C: ?

If you specify a drive letter, OS2LDR will boot that drive. If you don't, OS2LDR will display a list of OS/2 partitions that may be bootable so you can choose one.

Here's something people may find interesting: if the list includes an existing BIOS-based installation, try selecting it. Ignore what you see (or rather, what you don't see) on the screen and give it a few moments. You may be pleasantly surprised. (If things seem to stop, try pressing Enter.)
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Pete on October 26, 2023, 03:35:43 am
Hi All

I have ArcaOS5.1.0 installed on an NVMe drive along with Windows11, both systems boot and run fine.

I also have an SSD with Windows11 (activated) on attached to SATA1 that I am thinking of putting back into the system box and sacking the NVMe Windows11 (not activated) installation.

How do I setup AN Launcher on the NVMe drive to boot the Windows11 install on SATA1?
Do I simply copy the SATA1 \EFI\Boot\bootx64.efi to NVMe \EFI\Boot\winx64.efi or id there some other tweak needed?


Regards

Pete
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Rich Walsh on October 26, 2023, 05:45:38 am
How do I setup AN Launcher on the NVMe drive to boot the Windows11 install on SATA1?
Do I simply copy the SATA1 \EFI\Boot\bootx64.efi to NVMe \EFI\Boot\winx64.efi or id there some other tweak needed?

My best _guess_ (since I haven't tested this) is don't do anything except attach the SATA drive. Most definitely, do not go moving .EFI files around.

Remember that you are not booting Windows per se, you are booting the Windows Boot Manager and _it_ is booting Win. Either it will discover the new copy on its own or you'll have to add it (however that's done). This is little different than booting one or more versions of Linux via 'grub'.
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Pete on October 27, 2023, 05:20:08 pm
Hi Rich

No definitely no moving .efi files around - copy is slightly different to move :-)

Attaching the SATA disk does not get an automatic entry in AN Launcher or either Windows Boot Managers.

The SATA installation of Windows can be booted from the BIOS.

I guess I need to ask AN how to get the SATA Windows installation to boot from AN Launcher if I decide to use the SATA disk. At the moment I am a little undecided as having the SATA disk attached roughly doubles the time it takes to boot ArcaOS - from around 15 secs to about 30 secs, no stopwatch available.


Regards

Pete




Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Rich Walsh on October 28, 2023, 04:25:31 am
Attaching the SATA disk does not get an automatic entry in AN Launcher or either Windows Boot Managers.

AN Launcher is very low-function - by design - so there was never the slightest possibility that it would add an entry on its own. I had hoped for more from Win's Boot Manager but no such luck - it's far worse. You''ll have to used 'bcdedit' when booted to a Windows command line to add an entry.

Quote
I guess I need to ask AN how to get the SATA Windows installation to boot from AN Launcher if I decide to use the SATA disk.

Good luck on that...  In my earlier posting I left out all the ugly details in an attempt to keep it simple. Since that didn't work out, here's an introduction to harsh reality:

AN Launcher is incapable of running an .EFI file located on another disk because it doesn't know how to parse a UEFI disk identifier. If you look at 'launcher.cfg', you'll see that all paths start at the root directory of the _current_ disk. For example:
  Win11 = \EFI\Microsoft\Boot\bootmgfw.efi

If you wanted it to reference another disk, it would have to look something like this:
  Win11 = HD(2,GPT,9f11367c-448a-4272-92b8-af7e9c01973c,800,82000)\EFI\Microsoft\Boot\bootmgfw.efi
Even if AN Launcher could parse this, you'd have a lot of fun trying to construct it.

In any case, industry-standard practice is to have only one EFI System Partition (ESP) and to rely on each bootloader to know how to navigate multiple disks on its own terms - and all of them do. As such, there's no reason to have multiple bootloaders for a single OS. (FYI: while OS/2's boot manager and osloader are separate binaries, grub and WinBM act as both boot manager and osloader.)

Compunding the problem further: UEFI has a builtin boot manager (that's what you're looking at when you go into the firmware). If you believe the specs, you should be able to add entries that point at any disk, and the firmware should boot them in the specified order (i.e. if the first entry fails to boot, it moves on to the next one). Sadly, that isn't the way many manufacturers have implemented it. If you're booting from Disk 1, Lenovo, Dell, and others will try all of the entries that reference Disk 1 before they ever try Disk 2. Consequently, putting an entry for Disk 2 at the top of the list has no effect because the firmware will (likely) find something bootable on Disk 1. This is the underlying reason for that "industry-standard practice" of having a single ESP which is always on the first disk: to workaround non-compliant firmware.

If you decide you still want to use the SATA drive, I'd suggest you use Bing to search for "add OS to Windows Boot Manager" for instructions on how to use 'bcdedit.exe' (there are also some 3rd-party BCD editors available to ease the pain).
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Jochen Schäfer on October 28, 2023, 01:18:07 pm
In my experience, rEFInd works really good with ArcaOS.
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Neil Waldhauer on October 29, 2023, 04:13:45 am
In my experience, rEFInd works really good with ArcaOS.

Is there an install program for rEFInd that works on ArcaOS?
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Rich Walsh on October 29, 2023, 05:25:25 am
In my experience, rEFInd works really good with ArcaOS.

reFind is very nice - I used it before AN Launcher was written. IIRC it has an option to scan all disks for bootable partitions and may workaround the problem.

Here's another workaround that I think is far easier: just switch the boot order in the firmware so that the SATA drive boots first, then add AN Launcher to that disk's ESP.

* open MiniLVM and assign each of your two ESPs a drive letter (say, U: and V:)
* on the menu, select System->Boot Menu->Update/Install
* select the ESP partition on the SATA drive
* save your changes then boot into the firmware/BIOS
* change the boot order for hard drives so the SATA drive is first
* when you exit the firmware, it should boot AN Launcher on the SATA drive

If the Launcher menu doesn't have an entry for Win11, boot into AOS. Open Drive U: or V: (whichever is on the SATA), then open \EFI\BOOT\LAUNCHER.CFG. In the [menu] section, add "Win11 = \EFI\Microsoft\Boot\bootmgfw.efi". Save, then reboot and see if the copy of Win on the SATA boots.
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Jochen Schäfer on October 29, 2023, 10:05:29 am
In my experience, rEFInd works really good with ArcaOS.

Is there an install program for rEFInd that works on ArcaOS?
Not to my knowledge, but alle the install scripts do is mount the ESP volume and copy the necessary files to it.
On the rEFInd site is a page with instructions for manual installation.
Also, Rich has instructions how to do it in ArcaOS, posted above
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Dave Yeo on October 29, 2023, 10:08:57 am
In my experience, rEFInd works really good with ArcaOS.

Is there an install program for rEFInd that works on ArcaOS?

http://www.rodsbooks.com/refind/installing.html (http://www.rodsbooks.com/refind/installing.html)

Linux can install the deb too
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Neil Waldhauer on October 29, 2023, 02:22:36 pm
It sounds like you really need a Debian type of Linux to install rEFInd. Also the Windows or Mac preboot environment may be able to do that. It's not really clear how to reach those preboot environments, though. We would need some kind of utility for NVRAM I think to set the rest up.

The instructions are not very friendly, just use some utility program, but not describing where the utilities came from or what they do.

How about in the trivial case, where ANLauncher is already working. How do you rename all of the rEFInd parts to work with an ArcaOS installation?
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Dave Yeo on October 29, 2023, 05:52:55 pm
It was fairly simple with this BIOS as I can edit the boot files/order in the bios. rEFIind is \EFI\BOOT\BOOTX64.EFI and when it boots it gives the choices of LAUNCHER.EFI and OS2LDR.EFI from \EFI\OS2. It did also gave the choice of Linux kernels too but that seems to have broken while doing multiple AOS 5.1.x installs.
It's been awhile since I did the rEFInd install and now it is OLD_X64.EFI after installing the latest beta, I assume I could rename it. During beta testing I also lost my changes to refind.conf it seems.
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Neil Waldhauer on October 30, 2023, 03:37:47 pm
Using my Lenovo ThinkCentre M900 with the EFI partition assigned drive letter Y:, I copied refind_x64.efi to Y:\EFI\BOOT\BOOTX64.EFI, replacing the AN Launcher.
I copied refind.conf-sample to Y:\EFI\BOOT\refind.conf

At this point, I can reboot the computer and refind can boot OS2LDR.EFI, which presents a number of drive letters to boot.

I added an entry for my ArcaOS 5.1 boot volume F:
Code: [Select]
# This is an entry for ArcaOS 5.1 in UEFI mode
menuentry ArcaOS-F {
    loader \EFI\OS2\OS2LDR.EFI
    options "F:"
}

After this, a menu entry for ArcaOS-F appears that can boot the F: drive

I added an entry for my ArcaOS 5.1 boot volume H:
Code: [Select]
scanfor hdbios,internal,external,optical,manual
This adds a cryptic entry that loads the AirBoot boot manager. From Airboot, I can boot the H: drive
If I use the shutdown menu on ArcaOS 5.0 to select the H: drive, Airboot will automatically boot H:

rEFInd does not come with icons for ArcaOS
The conf-sample file implies that rEFInd will display graphics by default, but I see only text
I tried to replace the title bar with my own graphics file, but nothing happens
Code: [Select]
banner banner.png
rEFInd can load the BIOS setup utility, which is nice



Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Dave Yeo on October 30, 2023, 05:47:55 pm
Yes, we need a 128x128 ArcaOS png. Did you install the icons? Here under \EFI\BOOT I have an icons directory full of png's that are probably needed for the graphics. Also a keys directory full of cer files for secure boot and a var directory where rEFInd keeps a PreviousBoot file.
There's also a \EFI\tools directory for add-ons for rEFInd, currently empty here.
Should be asking the developer for OS/2 support, should be detecting \EFI\OS2 or \EFI\OS2\OS2LDR.EFI and having an icon.
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Pete on October 31, 2023, 02:47:54 am
Hi all

@rich: Yes, installing AN Launcher to the SATA disk then selecting the AN Launcher entry in the updated BIOS boot list allows me to start Windows on the SATA disk and ArcaOS on the NVMe disk.

@All: However, decided to give rEFInd a try.

Having installed rEFInd (performed file copying) I rebooted and checked BIOS boot list: No refind.efi

I did not work out how to add the necessary entry to the BIOS boot list from ArcaOS but figured Windows 11 may have a use after all  :-)

In Windows I used the following commands in a CMD window run as Admin - brief description of command on line below

      mountvol Y: /S
mount ESP volume as Y:

      Y:
Change to ESP volume

      cd EFI\refind
Change to refind directory

      bcdedit /set "{bootmgr}" path \EFI\refind\refind_x64.efi
set rEFInd as the default EFI boot program


I rebooted and rEFInd came up as boot manager with various *.efi files offered for booting. Windows on SATA1 and Windows and ArcaOS on NVMe all boot fine.

Having worked out that  I only need refind_x64.efi and refind.conf in the /EFI/Boot directory has got rid of a few offerings. I also discovered that the only ArcaOS files required are these 2 files /EFI\OS2\OS2LDR.*

I have been trying to tweak refind.conf a little but logging does not seem to work - currently using level 4 with no log file in sight.

Following Neils example I created a menu entry for ArcaOS

# Menu entry for ArcaOS 5.1.0 in UEFI mode
menuentry "ArcaOS 5.1.0" {
    icon /EFI/refind/icons/os2ldr.png
    loader /EFI/OS2/OS2LDR.EFI
    options "H:"
}


However, I cannot work out how to not display the "Boot /EFI/OS2/OS2LDR.EFI" option ie creating the menu entry has doubled the ArcOS options but at least the above menu entry bypasses the "choose the boot drive" screen which is displayed if the "Boot /EFI/OS2/OS2LDR.EFI" option is selected.

I also find that it does not matter what icon is selected as it will not display anyway ie change the above icon for any of the "boot" icons supplied with rEFInd and that icon will not be displayed, the standard (?) found-this-*.efi-file icon gets displayed. Maybe I am misunderstanding something, somewhere...

Overall seems a very competent boot manager - and fairly pretty in graphics mode.
Not sure why graphics are not working on Neils system... An accidental delete of the "#" on the "textonly" line?


Regards

Pete








Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Dave Yeo on October 31, 2023, 04:00:47 am
Hi Pete, I named my icon os_aos.png and it seems to display fine, picture posted on the Davids Doodles thread.
My menu entry, adapted from Neil's
Code: [Select]
# This is an entry for ArcaOS 5.1 in UEFI mode
menuentry ArcaOS-5.1 {
    icon \EFI\boot\icons\os_aos.png
    loader \EFI\OS2\OS2LDR.EFI
    options "M:"
}

Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Neil Waldhauer on October 31, 2023, 04:31:31 am
I got graphics by copying the icons directory to \EFI\BOOT\icons. My banner now shows up.

I also added an ArcaOS icon, which I named os_arcaos.png to be more consistent with the other operating system names.

I copied the os_arcaos.png over the os_unknown.png, and now I get ArcaOS for the AN Launcher and OS2LDR.EFI.

I need an AirBoot icon, so I got one from the sourceforge website. I copied it over os_legacy.png

All the icons that were displayed are now my own. I used some generic drive letter icons for the UEFI boot drives E: and F:, Otherwise, I can choose AirBoot, and boot H: and my older BIOS-based installations.

There is a whole section of the .conf file for hiding user interface items you don't want.

And it would be nice to be boot a particular BIOS partition. How would we get the UUID for each partition?
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Dave Yeo on October 31, 2023, 05:13:56 am
And it would be nice to be boot a particular BIOS partition. How would we get the UUID for each partition?

Seems that if you use DFsee, use F6 to select your partition and then use Mode=JFS-->Display Superblock towards the bottom is the Linux Vol UUID.
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Pete on October 31, 2023, 06:30:05 am
Hi All

Found out why some of my refind.conf settings were not working: I was editing the wrong file, should have been editing /EFI/refind/refind.conf but was editing a copy in /EFI/boot instead... DOH!

All seems to be working now, the "Arca" icon, /EFI/refind/icons/os_aos.png gets loaded and the "Boot /EFI/OS2/OS2LDR.EFI" option does not appear.

Wonderful what happens when you edit the right conf file.


Regards

Pete
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Rich Walsh on October 31, 2023, 06:53:10 am
And it would be nice to be boot a particular BIOS partition. How would we get the UUID for each partition?

Seems that if you use DFsee, use F6 to select your partition and then use Mode=JFS-->Display Superblock towards the bottom is the Linux Vol UUID.

This is almost certainly not what is needed - how would a bootmanager that offers no JFS support be able to find this? Partitions on GUID Partition Table (GPT) disks have externally-identifiable GUIDs, partitions on MBR disks do not.

If this is an MBR (as I suspect it is), then you'll have to use one of the other methods available to identify the partition (see the "Volume" section in 'configfile.html#stanzas'). OTOH, if this is a GPT disk, getting the GUID is easy: open MiniLVM, right-click on the partition, and select 'Copy GUID to clipboard'.
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Dave Yeo on October 31, 2023, 06:55:14 am
@Pete,Interesting, I've been editing the one in \EFI\BOOT which is where the deb installed it along with refind.conf-sample. It is also where the refind BOOTX64.EFI, BOOT.CSV, the icons, keys, and vars directories were installed. BOOT.CSV contains
Code: [Select]
bootx64.efi,rEFInd Boot Manager,,This is the boot entry for rEFInd
There is also \tools for extensions, currently empty
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Dave Yeo on October 31, 2023, 07:03:16 am
@Rich, the UUID, not the GUID. You're correct about the lack of JFS support, I'm not sure if the UUID is also saved somewhere else such as the EBR, seems likely. Have to boot to Linux and compare the UUID's being reported.
I also wonder how Linux figures out UUID's for HPFS, FAT and FAT32 as they don't support them unlike most Linux file systems, even swap.
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Rich Walsh on October 31, 2023, 07:16:00 am
@Rich, the UUID, not the GUID. You're correct about the lack of JFS support, I'm not sure if the UUID is also saved somewhere else such as the EBR, seems likely. Have to boot to Linux and compare the UUID's being reported.

But this is beside the point. reFind isn't asking for a _filesystem_ UUID, it wants the *partition's* GUID - and there is no such thing on an MBR drive. Refer to the docs I cited above.
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Dave Yeo on October 31, 2023, 07:44:39 am
@Rich, the UUID, not the GUID. You're correct about the lack of JFS support, I'm not sure if the UUID is also saved somewhere else such as the EBR, seems likely. Have to boot to Linux and compare the UUID's being reported.

But this is beside the point. reFind isn't asking for a _filesystem_ UUID, it wants the *partition's* GUID - and there is no such thing on an MBR drive. Refer to the docs I cited above.

It appears you are correct. Just so used to wrestling UUID's, which now I understand are file system specific, in Linux.
Anyways, another consideration with directly booting an OS/2 partition from rEFInd is the system wouldn't know what drive letter it has, or is that still a problem with LVM? Used to be that only C: could be directly booted.
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Neil Waldhauer on October 31, 2023, 02:31:20 pm
How would I construct a stanza for an MBR drive, with ArcaOS-H as the volume label?

menuentry ArcaOS-H {
    volume "ArcaOS-H"
    loader os2ldr
    icon /EFI/BOOT/icons/os_arcaos.png
}

This one results in "File not found"
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Dave Yeo on November 01, 2023, 04:54:10 am
How would I construct a stanza for an MBR drive, with ArcaOS-H as the volume label?

menuentry ArcaOS-H {
    volume "ArcaOS-H"
    loader os2ldr
    icon /EFI/BOOT/icons/os_arcaos.png
}

This one results in "File not found"

Well, no file system support. There is a JFS driver here, https://github.com/pbatard/efifs/releases/download/v1.7/jfs_x64.efi (https://github.com/pbatard/efifs/releases/download/v1.7/jfs_x64.efi), I put it in \EFI\BOOT\drivers.
I assume this driver is case sensitive so need OS2LDR instead of os2ldr and I removed the HIDDEN and SYSTEM attributes from OS2LDR for testing.
Unluckily rEFInd scanned all my volumes, took a long time, so for testing, set the time out to zero. You should be able to use the don't_scan_dirs setting in refind.conf I assume.
Eventually it did find OS2LDR, gave it a different icon then expected and selecting it, I see a brief text screen where os2ldr complains about something and I ended up back in rEFInd.
I don't think it will work unless using C: as os2ldr needs to know what drive it is using, so the boot manager such as airboot needs to set the drive letter in a certain memory location IIRC. Could try with the H: parameter as the AOS os2ldr is not the IBM os2ldr and might accept the drive letter.
Personally, I will just keep using airboot by selecting the right drive in rEFInd.
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Pete 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







Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Dave Yeo 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.
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Neil Waldhauer 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.
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Pete 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




Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Dave Yeo 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.
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Rich Walsh 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.
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Pete 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
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Pete 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
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Rich Walsh 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.
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Pete 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


Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Dave Yeo 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.
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Neil Waldhauer 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.




Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Rich Walsh 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.
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: OS4User 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
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Rich Walsh 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.
Title: Re: UEFI: Dual Boot - Windows 11 and ArcaOS 5.1
Post by: Neil Waldhauer on November 03, 2023, 02:21:10 pm
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.

I can see bootup messages (but not the ArcaOS logo). They are a different size, but the messages look like I expect ArcaOS while booting. And I also agree that DOS now functions the same for both 5.0 and 5.1.

I guess it's a trade -- DOS support for boot selection. I'll probably switch back once this thread settles down.