OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Applications => Topic started by: Rich Walsh on September 05, 2023, 02:05:04 am

Title: Csm2Uefi migration tool (updated)
Post by: Rich Walsh on September 05, 2023, 02:05:04 am
Several users have found they can migrate from 5.0.8 CSM to 5.1.0 UEFI simply by booting the installer/upgrader in UEFI mode. While this works, it isn't really supported and fails to copy in several files (e.g. the new boot logo). Similarly, switching an existing 5.1.x CSM install to UEFI isn't supported either. To fix this, I wrote csm2uefi.exe (attached).

To use it, you start with an existing 5.1.x installation (CSM or UEFI), mount the 5.1.x ISO (doubleclick on the file) or your 5.1.x DVD, then run:
  csm2uefi <isoDrive:> <5.1bootDrive:>  [e.g. csm2uefi F: C:]

It will copy in any missing files, then update 2 video-related ines in 'config.sys' to make it ready to boot in UEFI mode (the original is saved as 'config.csm' if you need to revert). If you're doing a 5.0.x to 5.1.0 upgrade, I'd suggest doing it in CSM mode so you can confirm the upgrade went as planned. Once you're confident everything works, then do the CSM->UEFI migration.

Important
* this does not create or setup an EFI System Partition - use the options on MiniLVM's 'System' menu when booted under UEFI to do so.
* the ISO and the installed system must be the exact same version of AOS - this method can't be used to boot other versions of OS/2 under UEFI (there's a different method available but that's another post...)

Update
* v2 - fixed a bug in v1 that caused a failure when calling 'CUBE'; v2 supports both 'cube.cmd' and 'cube.exe'
Title: Re: Csm2Uefi migration tool
Post by: Jochen Schäfer on September 05, 2023, 10:34:10 am
Thanks Rich.

I have put the exe on the installer usb stick, and installed 5.1 as CSM boot.
If I try your tool, I always get "Can't determine the source version", although the referenced iso is exactly the iso from the installer stick.
Title: Re: Csm2Uefi migration tool
Post by: Rich Walsh on September 05, 2023, 11:55:18 am
I have put the exe on the installer usb stick, and installed 5.1 as CSM boot.
If I try your tool, I always get "Can't determine the source version", although the referenced iso is exactly the iso from the installer stick.

The source is not the ISO file, it's the drive created when you mount the ISO. When booted from the installed system, doubleclick on the ISO, select a drive letter, then use that drive letter as the source. If booted from the installer, the ISO is already mounted, usually as drive R:, so that's the letter you'd use. (If I've misunderstood the problem, please correct me so we can get this going for you.)
Title: Re: Csm2Uefi migration tool
Post by: Jochen Schäfer on September 05, 2023, 02:17:40 pm
Yeah, my bad, Should have had a closer look :-(
Now, it copied some files, and then I got an error message (cf. attachment).
Title: Re: Csm2Uefi migration tool
Post by: Rich Walsh on September 05, 2023, 08:50:53 pm
Now, it copied some files, and then I got an error message (cf. attachment).

My apologies. There are 2 versions of 'cube', an EXE and a CMD. 'csm2uefi-v1' only supported the CMD version (which few people have). v2 supports the more common EXE version as well; it also fixes the missing '\' when copying 'config.sys'. Run the new version to finish the job (you can run it any number of times).
Title: Re: Csm2Uefi migration tool (updated)
Post by: Jochen Schäfer on September 06, 2023, 01:20:47 pm
Pardon my ignorance: Is Cube this file https://hobbes.nmsu.edu/?detail=%2Fpub%2Fos2%2Futil%2Fstartup%2FCUBE_3-30.zip (https://hobbes.nmsu.edu/?detail=%2Fpub%2Fos2%2Futil%2Fstartup%2FCUBE_3-30.zip)?
Title: Re: Csm2Uefi migration tool (updated)
Post by: Rich Walsh on September 06, 2023, 10:45:39 pm
Pardon my ignorance: Is Cube this file https://hobbes.nmsu.edu/?detail=%2Fpub%2Fos2%2Futil%2Fstartup%2FCUBE_3-30.zip (https://hobbes.nmsu.edu/?detail=%2Fpub%2Fos2%2Futil%2Fstartup%2FCUBE_3-30.zip)?

Yes and no... CUBE is a REXX script for modifying text files like config.sys. It has been updated many times, most recently by me. It is used extensively by the AOS installer, and apparently by RPM scripts because BWW has converted it to an .exe and put a copy in \usr\bin. I'd consider this exe and the cube.cmd it's based on to be the "official" release. It's version is 3.0.

The package on hobbes appears to be a fork based on an outdated version. The package's author has updated it in various ways and greatly expanded its scope. Until you mentioned it, I wasn't aware it existed so I can't comment on its reliability. Until that's established, I wouldn't put that version on the PATH before the "official" versions.

For your reference, I've attached the "official" version containing 'cube.cmd' and its documentation.
Title: Re: Csm2Uefi migration tool (updated)
Post by: Jochen Schäfer on September 07, 2023, 09:21:15 am
Hi Rich.

I really don't much with Rexx, so I didn't know it comes with ArcaOS.
I tried the new version again, and it finished the job.
Good Job.


Bye Jochen
Title: Re: Csm2Uefi migration tool (updated)
Post by: Martin Iturbide on October 13, 2023, 12:52:01 am
Hi Rich.

Can I upload your tool to Hobbes? I created this little readme for it based in your post.

Regards