Migrate CentOS 7.9 to Rocky Linux 9

May 2024

I’ve been running a (Samba) file server for many years and this has been hosted on CentOS, curently 7.9. I’ve known for a while that CentOS was coming to the End of Life and has been replaced by Rocky Linux. In principle Rocky is the new name for CentOS, it has the same code and is written by the same developers. Several “scripts” have been available that, in theory, remove anything identified as CentOS and replaces it with Rocky. Unfortunately, none I used have worked. The latest was using “Elevate” along with “Leapp“.

Having worked for many years in IT Tech Support before retiring, all the sensible bones in my body kept screaming “do a clean install of Rocky” but I kept putting off because I didn’t want to spend weeks reconfiguring things and I didn’t want to break my 2TB raid 5 array. I also didn’t want to sit in my “server room” in the garage because its full of cobwebs and spiders 🙂

When it was clean and tidy

I decided to bite the bullet and do a clean install of Rocky – now 9.4 and downloaded the “minimal.iso“. I then used Rufus to create a bootable USB Stick. I purchased a new HDD so that if things went wrong, I could pop the old system HDD back in and be no worse off.

The 7Ps, I made copies of fstab, and samba sysconfig along with the list of Cron Jobs and other config files.

I then brought the server into the house to make it a more pleasant environment to work in. I removed the power connecton for the RAID array, removed the USB (backup HDD) and installed the new (system) HDD.

I was now ready to Migrate to Rocky 9 – clean install

After tickling the server under the chin 🙂  it booted from the USB Stick and seemed to progress nicely but got to a point where it needed to download stuff from a repository. Unfortunately it wouldn’t connect to a repository, regardless of what I entered into the source.

I then downloaded the “BOOT.ISO” * and again used Rufus to create a bootable USB Stick. The install then progessed and connected to a repository to download whatever it wanted. Soon after, I was at the log in screen for Rocky Linux 9.4. That was easy! It did install a GUI but I always had a “headless” installation for CentOS, I’ll sort that later.

* Note using the ISO downloads. The DVD.ISO apparently has all the info needed to do an “offline” install so you don’t need an Internet connection but will need a 16GB USB Stick. The BOOT.ISO needs a decent Internet connection and will download the latest files etc needed for the install. This is probably the best option and only needs a 2GB USB Stick.

I usually connect to the server remotely from a Windows 10 box using Webmin, WinSCP and Putty.

Webmin needs Perl, heres how to install it. Installing Webmin is quite easy just follow the instrucions.

WinSCP didn’t need anything doing, I just connected and accepted the warning.

Connecting using Putty was a bit of a challenge but installing the latest version sorted it. I got a security warning and OK’d it.

Having confirmed that I could now connect remotely to Rocky using Webmin, WinSCP and Putty and I was a happy bunny 🙂

I then Installed Samba, here’s how.

Using the terminal, I did a dnf install –refresh to make sure  everything was up-to-date.

So I now had a working Rocky Linux 9.4 (stand alone) server up n running without much effort, happy bunny 🙂

Now for the bit I was really dreading – Connecting the RAID array.

Powered off the server and connected the RAID array. On powering up, the RAID array was presented but I couldn’t access any network shares. Checked fstab and that looked OK but I had mounted the array as Data instead of data. Removing the Data share and creating a new share called data cured the problem.

I had a problem with the Samba (network) shares and had to play about with the Samba sysconfig file to enable creating and deleting new files but overall the clean install was a good choice.

Connecting and mounting the USB Drive needed a reboot, no problem.

I’m now back to normal but have Rocky Linux 9.4 instead of CentOS 7.9 and I’m as happy as a sand boy 🙂

It seems my sensible bones were right all along! Considering that I retired a few years ago and have passed my 70th birthday, I’m well chuffed with myself. I’m not as sharp as I used to be but I think Rocky will be as robust and reliable as CentOS.

About my server (bought used on Ebay)