Skip to content

Commit e808d42

Browse files
authored
Merge pull request #8335 from MicrosoftDocs/main
Auto push to live 2025-02-27 02:00:02
2 parents 6ec56bb + ee6b94b commit e808d42

1 file changed

Lines changed: 74 additions & 2 deletions

File tree

support/azure/virtual-machines/linux/troubleshoot-red-hat-os-upgrade-issues.md

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ms.collection: linux
99
ms.topic: troubleshooting-general
1010
ms.workload: infrastructure-services
1111
ms.tgt_pltfrm: vm-linux
12-
ms.date: 06/26/2024
12+
ms.date: 02/26/2025
1313
---
1414
# Troubleshooting Red Hat OS upgrade issues
1515

@@ -607,8 +607,80 @@ The mounting failure occurs because version 2 of the control group (cgroup v2) i
607607

608608
1. If that parameter is in one of those files, remove the parameter from the file, and then run the Leapp upgrade process again.
609609

610+
### Upgrade symptom 7: Leapp upgrade doesn't continue after reboot, and VM boots into RHEL 8.10 instead
611+
612+
If you run the Leapp upgrade from RHEL 8.10 to 9.4 or 9.5, the upgrade process might not continue after the required reboot. Instead, the VM boots back into RHEL 8.10 without loading the special upgrade initramfs.
613+
614+
The following setting in `/etc/default/grub` might cause this issue:
615+
616+
```config
617+
GRUB_DEFAULT=0
618+
```
619+
620+
Since `GRUB_DEFAULT=0` forces the system to always boot the first menu entry in GRUB, it skips the Leapp upgrade entry and continues booting into the existing RHEL 8.10 environment.
621+
622+
623+
#### Upgrade solution 7: Modify GRUB to use the saved entry
624+
625+
1. Change `GRUB_DEFAULT=0` to `GRUB_DEFAULT=saved`:
626+
627+
> [!NOTE]
628+
> In this example, `GRUB_DEFAULT` is set to `0`, but in your environment, it might be `1` or another number. Ensure that you replace it accordingly in the `sed` command.
629+
630+
631+
```bash
632+
sudo sed -i 's/^GRUB_DEFAULT=0/GRUB_DEFAULT=saved/' /etc/default/grub
633+
```
634+
635+
2. Regenerate the GRUB configuration:
636+
637+
- **GEN 1:**
638+
639+
```bash
640+
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
641+
```
642+
643+
- **GEN 2:**
644+
645+
```bash
646+
grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
647+
```
648+
649+
3. Reboot the VM using the serial console:
650+
651+
```bash
652+
sudo reboot
653+
```
654+
655+
After the reboot, if the fix is applied correctly, the VM will boot into the Leapp upgrade initramfs, and you should see an output similar to the following lines in the serial console:
656+
657+
```output
658+
[ OK ] Reached target Remote File Systems.
659+
Starting dracut pre-mount hook...
660+
[ OK ] Finished dracut pre-mount hook.
661+
Starting File System Check on /dev/mapper/rootvg-rootlv...
662+
[ OK ] Finished File System Check on /dev/mapper/rootvg-rootlv.
663+
Mounting /sysroot...
664+
[ OK ] Mounted /sysroot.
665+
[ OK ] Reached target Initrd Root File System.
666+
[ OK ] Reached target System Upgrade.
667+
Starting dracut pre-pivot and cleanup hook...
668+
Starting System Upgrade...
669+
[ 6.507621] upgrade[677]: starting upgrade hook
670+
[ 6.531079] upgrade[677]: /bin/upgrade: line 20: /sysroot/var/tmp/system-upgrade.state: No such file or directory
671+
[ 6.543603] upgrade[677]: Storage initialisation: Attempt 0 of 11. Wait 15 seconds.
672+
[ 6.608365] dracut-pre-pivot[703]: 6.605850 | /etc/multipath.conf does not exist, blocklisting all devices.
673+
[ 6.620246] dracut-pre-pivot[703]: 6.608599 | You can run "/sbin/mpathconf --enable" to create
674+
[ 6.630208] dracut-pre-pivot[703]: 6.608921 | /etc/multipath.conf. See man mpathconf(8) for more details
675+
[ OK ] Finished dracut pre-pivot and cleanup hook.
676+
[ 21.555427] upgrade[714]: 5 logical volume(s) in volume group "rootvg" now active
677+
[ 21.581296] upgrade[677]: Mounting /usr with -o defaults,ro
678+
```
679+
680+
This output indicates that the Leapp upgrade process has continued successfully. After completion, the VM should boot into RHEL 9.*x*.
681+
610682
> [!IMPORTANT]
611-
> If the Leapp upgrade is still failing for no apparent reason (such as when upgrading from version 7.9 to version 8.10 or from version 8.10 to version 9.4), don't upgrade to the latest version. Instead, try to upgrade to an intermediate version (such as from version 7.9 to version 8.8 or version 8.10 to version 9.2) by specifying the `--target x.y` flag. After the intermediate upgrade is successful, you can try to upgrade to the latest release.
683+
> If the Leapp upgrade still fails without an obvious reason (such as when upgrading from version 7.9 to version 8.10 or from version 8.10 to version 9.5), don't upgrade to the latest version. Instead, try to upgrade to an intermediate version (such as from version 7.9 to version 8.8 or version 8.10 to version 9.4) by specifying the `--target x.y` flag. After the intermediate upgrade is successful, you can try to upgrade to the latest release.
612684
613685
## Related content
614686

0 commit comments

Comments
 (0)