You need to upgrade a server from RHEL 8 to RHEL 9 (or Ubuntu 22.04 to 24.04). In-place or rebuild? Plan it.
AdvancedScenarioPackages, kernel and boot
Answer
Situation read → Major upgrades are risky; rebuilding is often cleaner.
What I'd do →
- Preferred: build a new RHEL 9 server from code (Terraform + Ansible), migrate data, swap traffic.
- If in-place is required:
- RHEL:
leapp preupgrade, fix inhibitors in/var/log/leapp/leapp-report.txt, thenleapp upgradeand reboot. - Ubuntu:
sudo do-release-upgradeafter full update.
- RHEL:
- Snapshot the disk before starting; test on a clone first.
- Verify services, SELinux contexts and custom repos after.
Why → Rebuilds give a clean, reproducible host; in-place carries old cruft but keeps the IP and identity.
Interview tip → Saying "snapshot first, test on a clone" is what interviewers want.
More on Packages, kernel and boot
You must upgrade the kernel on 50 production servers and be able to roll back if the new kernel misbehaves. Plan it.AdvancedYou need to pin a package version so routine updates don't upgrade it (e.g. Docker or PostgreSQL). How?BeginnerA package update broke an application. How do you roll it back?IntermediateYour servers can't reach the internet but need packages. How do you provide repositories?IntermediateYou need to compile and install software from source on a server that also uses packages. How do you avoid making a mess?IntermediateYou need to change kernel boot parameters (e.g. add `transparent_hugepage=never`) persistently. How?Intermediate