Skip to content

Commit 0fc39a0

Browse files
committed
docs: Add in-place upgrade to RL9 migration
1 parent ead45f8 commit 0fc39a0

File tree

1 file changed

+80
-3
lines changed

1 file changed

+80
-3
lines changed

doc/source/operations/rocky-linux-9.rst

Lines changed: 80 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,84 @@ Wazuh manager
599599

600600
TODO
601601

602-
In-place migrations
603-
===================
602+
In-place upgrades
603+
=================
604604

605-
TODO
605+
Sometimes it is necessary to upgrade a system in-place.
606+
This may be the case for the seed hypervisor or Ansible control host which are often installed manually onto bare metal.
607+
This procedure is not officially recommended, and can be risky, so be sure to back up all critical data and ensure serial console access is available (including password login) in case of getting locked out.
608+
609+
The procedure is performed in two stages:
610+
611+
1. Migrate from CentOS Stream 8 to Rocky Linux 8
612+
2. Upgrade from Rocky Linux 8 to Rocky Linux 9
613+
614+
Potential issues
615+
----------------
616+
617+
Full procedure
618+
--------------
619+
620+
- It's good to inspect existing DNF packages and determine whether they are
621+
really required.
622+
623+
- Use the `migrate2rocky.sh
624+
<https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.sh>`__
625+
script to migrate to Rocky Linux 8.
626+
627+
- Disable all DNF modules - they're no longer used.
628+
629+
.. code-block:: console
630+
631+
sudo dnf module disable "*"
632+
633+
- Migrate to NetworkManager:
634+
635+
- Ensure that all network interfaces are managed by Network Manager:
636+
637+
.. code:: console
638+
639+
sudo sed -i -e 's/NM_CONTROLLED=no/NM_CONTROLLED=yes/g' /etc/sysconfig/network-scripts/*
640+
641+
- Enable and start NetworkManager:
642+
643+
.. code:: console
644+
645+
sudo systemctl enable NetworkManager
646+
sudo systemctl start NetworkManager
647+
648+
- Migrate Ethernet connections to native NetworkManager configuration:
649+
650+
.. code:: console
651+
652+
sudo nmcli connection migrate
653+
654+
- Manually migrate non-Ethernet (bonds, bridges & VLAN subinterfaces) network interfaces to native NetworkManager.
655+
656+
- Look out for lost DNS configuration after migration to NetworkManager. This may be manually restored using something like this:
657+
658+
.. code:: console
659+
660+
nmcli con mod System\ brextmgmt.3003 ipv4.dns "10.41.4.4 10.41.4.5 10.41.4.6"
661+
662+
- Make sure there are no funky udev rules left in
663+
``/etc/udev/rules.d/70-persistent-net.rules`` (e.g. from cloud-init run on
664+
Rocky 9.1).
665+
666+
- Inspect networking configuration at this point, ideally reboot to validate correctness.
667+
668+
- Upgrade to Rocky Linux 9
669+
670+
.. https://forums.rockylinux.org/t/dnf-warning-message-after-upgrade-from-rocky-8-to-rocky-9/8319/2
671+
672+
.. code:: console
673+
674+
sudo dnf install -y https://download.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/Packages/r/rocky-gpg-keys-9.2-1.6.el9.noarch.rpm \
675+
https://download.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/Packages/r/rocky-release-9.2-1.6.el9.noarch.rpm \
676+
https://download.rockylinux.org/pub/rocky/9/BaseOS/x86_64/os/Packages/r/rocky-repos-9.2-1.6.el9.noarch.rpm
677+
sudo rm -rf /usr/share/redhat-logos
678+
sudo dnf --releasever=9 --allowerasing --setopt=deltarpm=false distro-sync -y
679+
sudo rpm --rebuilddb
680+
sudo rpm -qa | grep el8 | xargs dnf remove
681+
682+
- You will need to re-create *all* virtualenvs afterwards due to system Python version upgrade.

0 commit comments

Comments
 (0)