oracle / centos2ol

Script and documentation to switch CentOS/Rocky Linux to Oracle Linux
https://linux.oracle.com/switch/centos/
Universal Permissive License v1.0
344 stars 82 forks source link

Migration from CentOS 8, after reboots it fails to start #76

Open darkmaxx1 opened 3 years ago

darkmaxx1 commented 3 years ago

I've been trying to migrate CentOS 8 to Oracle Linux, everything went fine when disabling the non-repo, but when rebooting, the server couldn't start on the EFI boot. It says failed without showing the grub menu.

Did a recover with ReaR after each failed time to find out why. I figured the EFI Boot wasn't on sda, but sdb.

It fixed my issue efibootmgr -c -d /dev/sdb -p 1 -L "Oracle Linux" -l "\EFI\redhat\shimx64.efi"

I'm wondering if the script can be changed to detect the location of the EFI partition ?

aburmash commented 3 years ago

The problem with EFI partition detection is that in some cases device is not in the form of sdXY I can suggest following solution:

If i will prepare a test fix, do you volunteer to test it ? ;)

darkmaxx1 commented 3 years ago

OL8 is up and running, but yeah, I can do a Rear recover to return back to CentOS8 and test your fix :P

darkmaxx1 commented 3 years ago

Oops, the rear recover isn't working anymore. Duh :(

GreatEmerald commented 3 years ago

I noticed this issue as well. After the switch, efibootmgr still showed an entry for CentOS, which was pointing at the now-nonexistent EFI/centos/shimx64.efi instead of EFI/redhat/shimx64.efi. Removing it with -B and then using the command as per @darkmaxx1 (altering the boot device and the partition number in -p) works.

This issue should be solved, otherwise it may be quite annoying to those who are doing the switch remotely, as it may require physical access to the machine...

bbbjames commented 5 months ago

similar issues for me on migration

also see here: https://github.com/oracle/centos2ol/issues/70