# Rocky Linux 9 conversion with migrate2rocky9.sh fails while updating GRUB on UEFI

**URL:** <https://forums.rockylinux.org/t/rocky-linux-9-conversion-with-migrate2rocky9-sh-fails-while-updating-grub-on-uefi/20837>\
**Category:** Rocky Linux Help & Support\
**Tags:** rocky-linux-8, rocky-linux-9\
**Created:** [October 8, 2026, 9:12pm UTC](https://forums.rockylinux.org/t/rocky-linux-9-conversion-with-migrate2rocky9-sh-fails-while-updating-grub-on-uefi/20837 "2026-10-08T21:12:25Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vittory003](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/vittory003/32/4694_2.png) [@Vittory003](https://forums.rockylinux.org/u/Vittory003)\
**Post date:** [October 8, 2026, 9:12pm UTC](https://forums.rockylinux.org/t/rocky-linux-9-conversion-with-migrate2rocky9-sh-fails-while-updating-grub-on-uefi/20837/1 "2026-10-08T21:12:25Z")

</div>

Hi everyone,

I’m experiencing an issue during the conversion of RHEL systems to Rocky Linux.

The issue seems to affect **conversions to Rocky Linux 9** , while the same conversion procedure on **RHEL 8 systems to Rocky Linux 8 completes successfully without this GRUB issue**.

During the Rocky Linux 9 conversion, the process fails while updating the GRUB configuration with the following error:

```bash
Running `grub2-mkconfig -o /boot/efi/EFI/rocky/grub.cfg' will overwrite the GRUB wrapper.
Please run `grub2-mkconfig -o /boot/grub2/grub.cfg' instead to update grub.cfg.
GRUB configuration file was not updated.

Error updating the grub config.

An error occurred while we were attempting to convert your system to Rocky Linux. Your system may be unstable. Script will now exit to prevent possible damage.

```

It appears that the conversion process is trying to execute:

```bash
grub2-mkconfig -o /boot/efi/EFI/rocky/grub.cfg

```

but on Rocky Linux 9 this file is an EFI GRUB wrapper, and the actual GRUB configuration should instead be generated with:

```bash
grub2-mkconfig -o /boot/grub2/grub.cfg

```

The systems are booting in UEFI mode.

An important detail is that I have tested the same conversion procedure on multiple systems:

- **RHEL 8 → Rocky Linux 8:** conversion completes successfully and I don’t encounter this GRUB error.
- **RHEL 9 → Rocky Linux 9:** conversion fails during the GRUB configuration update with the error shown above.

Has anyone else encountered this issue specifically when converting RHEL 9 systems to Rocky Linux 9?

Is this a known issue or incompatibility in the conversion script related to the GRUB/UEFI configuration used by Rocky Linux 9?

Also, what is the recommended recovery procedure after the conversion stops at this point?

Would manually running:

```bash
grub2-mkconfig -o /boot/grub2/grub.cfg

```

I have not rebooted the affected system after the failed conversion.

Thank you in advance to anyone who can share their experience or provide guidance on the correct procedure to follow.

---

<div class="post-metadata">

**Author:** ![jdieter](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/jdieter/32/5063_2.png) [@jdieter](https://forums.rockylinux.org/u/jdieter)\
**Post date:** [October 9, 2026, 1:37pm UTC](https://forums.rockylinux.org/t/rocky-linux-9-conversion-with-migrate2rocky9-sh-fails-while-updating-grub-on-uefi/20837/3 "2026-10-09T13:37:11Z")

</div>

Manually running `grub2-mkconfig -o /boot/grub2/grub.cfg` _should_ fix the problem.

After running that, could you please run:

```auto
efibootmgr -v
ls -l /boot/efi/EFI/rocky/
grubby --default-kernel

```

We want to make sure the Rocky kernel is in place for you

---

<div class="post-metadata">

**Author:** ![Vittory003](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/vittory003/32/4694_2.png) [@Vittory003](https://forums.rockylinux.org/u/Vittory003)\
**Post date:** [October 13, 2026, 6:47am UTC](https://forums.rockylinux.org/t/rocky-linux-9-conversion-with-migrate2rocky9-sh-fails-while-updating-grub-on-uefi/20837/4 "2026-10-13T06:47:22Z")

</div>

Hi @jdieter,

I wanted to provide a final update on this issue.

After comparing the previous version of `migrate2rocky9.sh` with the latest upstream version, I confirmed that the problem was caused by the incorrect GRUB configuration path:

```bash
grub2-mkconfig -o /boot/efi/EFI/rocky/grub.cfg

```

I noticed that this has now been corrected in the recent commit **“Fix EL9 migration recovery and EFI setup”** , which uses:

```bash
grub2-mkconfig -o /boot/grub2/grub.cfg

```

I performed another RHEL 9 to Rocky Linux 9 migration using the updated script, and everything completed successfully without any EFI/GRUB errors.

**The issue is now resolved.**

A special thanks to **@jdieter** , both for your assistance in this thread and for fixing the migration script.

I also want to thank the entire Rocky Linux community for the continuous support and the great work behind this project.

It’s great to see how quickly issues are addressed and improvements are made.

Thanks again!

---

<div class="post-metadata">

**Author:** ![jdieter](https://sea2.discourse-cdn.com/flex020/user_avatar/forums.rockylinux.org/jdieter/32/5063_2.png) [@jdieter](https://forums.rockylinux.org/u/jdieter)\
**Post date:** [October 13, 2026, 9:21am UTC](https://forums.rockylinux.org/t/rocky-linux-9-conversion-with-migrate2rocky9-sh-fails-while-updating-grub-on-uefi/20837/5 "2026-10-13T09:21:17Z")

</div>

So glad to hear that fixed the problem! Thank you for getting back to us!

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [October 13, 2026, 2:37pm UTC](https://forums.rockylinux.org/t/rocky-linux-9-conversion-with-migrate2rocky9-sh-fails-while-updating-grub-on-uefi/20837/6 "2026-10-13T14:37:28Z")

</div>

> [@Vittory003](#):
>
> During the Rocky Linux 9 conversion, the process fails while updating the GRUB configuration with the following error:
> 
> ```bash
> Running `grub2-mkconfig -o /boot/efi/EFI/rocky/grub.cfg' will overwrite the GRUB wrapper.
> Please run `grub2-mkconfig -o /boot/grub2/grub.cfg' instead to update grub.cfg.
> GRUB configuration file was not updated.
> 
> Error updating the grub config.
> 
> An error occurred while we were attempting to convert your system to Rocky Linux. Your system may be unstable. Script will now exit to prevent possible damage.
> 
> ```
> 
> It appears that the conversion process is trying to execute:
> 
> ```bash
> grub2-mkconfig -o /boot/efi/EFI/rocky/grub.cfg
> 
> ```
> 
> but on Rocky Linux 9 this file is an EFI GRUB wrapper,

On the positive side, it did not overwrite that wrapper.

* * *

The background:

- Legacy BIOS loads GRUB, which loads `/boot/grub2/grub.cfg`
- UEFI loads GRUB (from ESP, EFI System Partition), which loads `/boot/efi/EFI/rocky/grub.cfg`

Up to RHEL 8 that was it. The downside was that location of `grub.cfg` did depend on whether you did boot with legacy or UEFI. That complicated maintenance of `grub.cfg`.

In RHEL 9 the `/boot/efi/EFI/<vendorname>/grub.cfg` is a tiny wrapper that does two things:

- Makes GRUB mount the filesystem that contains the `/boot/grub2/grub.cfg` file
- Makes GRUB include the contents of `/boot/grub2/grub.cfg` into its configuration

As result all[**1**] RHEL/Rocky 9 and 10 systems have the actual GRUB config in `/boot/grub2/grub.cfg`

The wrapper is created during installation as it refers to the UUID of the filesystem (that contains the `/boot/grub2/grub.cfg` file) – unique on every system.

* * *

Technically, the `grub2-mkconfig -o /boot/efi/EFI/rocky/grub.cfg` is not total doom as GRUB will use the resulting `grub.cfg` in boot, but if user/something does later update the `/boot/grub2/grub.cfg`, then they will wonder why their changes are ignored.

* * *

[**1**] Caveat: As arch x86\_64 user, my “all” does not necessarily cover all architectures.

---

<div class="post-metadata">

**Author:** ![jbkt23](https://avatars.discourse-cdn.com/v4/letter/j/9fc29f/32.png) [@jbkt23](https://forums.rockylinux.org/u/jbkt23)\
**Post date:** [October 13, 2026, 4:44pm UTC](https://forums.rockylinux.org/t/rocky-linux-9-conversion-with-migrate2rocky9-sh-fails-while-updating-grub-on-uefi/20837/7 "2026-10-13T16:44:33Z")

</div>

> [@jlehtone](#):
>
> - Makes GRUB mount the filesystem that contains the `/boot/grub2/grub.cfg`

and also reads the kernel definitions in /boot/loader/entries/ that are then populated in the grub boot menu. This is unique to RH and is called the “Boot Loader System”, “bls” for shortname.  
If you edit /etc/default/grub.cfg for kernel parameters then you have to use this format of the mkconfig command:

```auto
grub2-mkconfig -o /boot/grub2/grub.cfg --update-bls-cmdline

```

to also populate the parameters in the /boot/loader/entries/ file(s).

---

<div class="post-metadata">

**Author:** ![jlehtone](https://avatars.discourse-cdn.com/v4/letter/j/e9a140/32.png) [@jlehtone](https://forums.rockylinux.org/u/jlehtone)\
**Post date:** [October 14, 2026, 2:09pm UTC](https://forums.rockylinux.org/t/rocky-linux-9-conversion-with-migrate2rocky9-sh-fails-while-updating-grub-on-uefi/20837/8 "2026-10-14T14:09:47Z")

</div>

> [@jbkt23](#):
>
> and also reads …

The wrapper, `/boot/efi/EFI/rocky/grub.cfg`, contains:

```auto
configfile $prefix/grub.cfg

```

while the `/boot/grub2/grub.cfg` contains lines, like:

```auto
  load_env -f ${config_directory}/grubenv

insmod blscfg
blscfg

  source ${prefix}/user.cfg

  source ${config_directory}/custom.cfg

  source $prefix/custom.cfg

```

Hence I would say that the `/boot/grub2/grub.cfg` does read `grubenv`, `user.cfg`, `custom.cfg`, and the BLS entries (if any exists), but that the wrapper does not (directly).
