same SSD with new hardware

Issues related to applications and software problems and general support
Post Reply
lightman47
Posts: 1521
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

same SSD with new hardware

Post by lightman47 » 2021/09/20 16:28:16

I have RHEL 8 installed on an SSD but on otherwise ancient hardware. It will be no surprise to me if, one day fairly soon, that server quits running. I will be ordering a new motherboard, CPU, and memory in the very near future hoping to rebuild it prior to failure.

Will I be able just plug this SSD into the new hardare, run a couple commands and have it boot/run properly? I really don't want to repeat the entire installation again. It took quite some doing to get it all the shares, selinux, & httpd stuff working and I really don't want to repeat it; I didn't have time to make notes because I needed it running fast.

Thank you

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: same SSD with new hardware

Post by TrevorH » 2021/09/20 18:24:02

Boot the rescue kernel and rebuild the initramfs using dracut -f --kver $(uname -r) (use the actual version number of the latest running kernel, not the output from uname -r). Or if you don't have the latest kernel installed then yum update will do it too.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

lightman47
Posts: 1521
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: same SSD with new hardware

Post by lightman47 » 2021/09/20 19:12:10

THANK YOU!

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: same SSD with new hardware

Post by TrevorH » 2021/09/20 19:54:53

That does assume that the rescue kernel you have installed is new enough to know about all the hardware. You'll also need to amend things like MAC addresses in network config etc.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

lightman47
Posts: 1521
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: same SSD with new hardware

Post by lightman47 » 2021/09/20 19:59:08

Ah! Forgot about that! Thank you again.

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: same SSD with new hardware

Post by TrevorH » 2021/09/20 20:05:32

If you run file -s /boot/vmlinuz-0-<tab> you can see what version it is. Then you can work out if it's new enough to support your new hardware. If it is not then you can cheat, change dracut.conf to amend hostonly=yes to =no then reinstall the current kernel or rebuild its initramfs so that has support for all known hardware. Then boot that on the new machine and change dracut.conf back so all subsequent kernel's initramfs files are not super huge.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply