Moving an SSD with Fedora 41 to a different computer

Hi, I do a lot of traveling and I have Fedora 41 installed on an HP Elitebook 850 (15.6") G5 laptop. As a backup, I carry an HP Elitebook 840 (14") G5 laptop.

I am wondering if anyone could tell me if my 850 laptop died, whether I could simply take the SSD out of it and put it in the 840 and Fedora will run fine?

I am not an IT person, but part of me thinks that when one installs any OS on a given laptop, the OS configures itself to suit all that hardware on that laptop, and if one moves the SSD to a different lapttop, the OS will see different hardware and not operate properly.

Another concern I have is that the OS WILL run ok on the backup laptop, but there will be errors eg writing data to disk, since there is different hardware - causing data corruption but without me being aware of it.

Any help and feedback on this is appreciated.

Well that will not happen. Well, not more likely than usual :wink: It will either work or it won’t.

I am pretty sure that you can take your SSD out of one computer and put it in another and it will work - assuming of course that it is the same architecture. (eg, X86_64 cannot be put into an Arm computer).

2 Likes

@theprogram - Thanks for your reply - I appreciate it.

Fedora installs a large number of drivers, many of which may not apply to the current system as presently installed. However, the drivers are installed and when moving the drive to a different machine it usually is seamless because during boot the kernel loads the needed drivers for the hardware seen, even if it is different than in the previous system.

2 Likes

Try swapping the SSD when at home and can afford some downtime if there is an issue. When swapping components you should take ESD precautions which may be easier at home than travelling in areas with dry climates or dry indoor environments from winter heating.

You can compare the output from inxi -Fzxx to see which components are different and whether the two systems use different drivers for mission-critical components such as network and sound.

Be sure you have a working USB Live Installer key when travelling.

I have a 128 Gb NvME SSD (pulled from another system that needed more space) in a small USB-3 case. The performance is quite acceptable for web browsing, email, etc., but every system here has a different way to boot from external USB drives.

1 Like

For the most part everything is auto-detected each time the system boots. There is a small exception for the initramfs (a small archive of drivers that are needed to boot the system). The initramfs excludes some drivers that are unnecessary for your PC as a way of optimizing the boot time.

Excerpted from man dracut:

If you want to create lighter, smaller initramfs images, you may want to specify the --hostonly or -H option. Using this option, the resulting image will contain only those dracut modules, kernel modules and filesystems, which are needed to boot this specific machine. This has the drawback, that you can’t put the disk on another controller or machine, and that you can’t switch to another root filesystem, without recreating the initramfs image. It is recommended to keep a copy of a general purpose image (and corresponding kernel) as a fallback to rescue your system.

You might want to run sudo dracut -f --no-hostonly just before swapping your disk to another PC to be sure the current initramfs has a full set of drivers.

2 Likes

With a default installation it will just work :slight_smile: It’s not Windows.

2 Likes

@computersavvy - Thanks for your reply - great to know that Fedora / kernel can just load drivers as needed on boot even if it sees different hardware.

@gnwiii - Thanks for your suggestions including doing a trial swapping, having a live USB, etc. I will definitely try that soon.

@glb - Thanks for your reply and explaining how things work on boot - I find that really interesting and gives me confidence to do this if ever needed.

1 Like

@dwlegg - Thanks for confirming this will just work. And glad Linux is not like Windows in this and many other respects. I sometimes show people running a live Linux USB on their windows computer and many are amazed that eg the sound volume, the wifi, the brightness, etc all work without having to possibly install drivers…

1 Like

Just curious, when was the last time you used Windows? That was true with Windows 7 and maybe 10. Windows 11 can be moved to other hardware and will work in most cases, even with quite different hardware. I’ve done it several times without any major issues.

Unlike Linux, Windows 11 doesn’t have GPU anxiety and won’t go into a seizure when it doesn’t recognize the GPU and in the worst case will boot with generic VGA driver and you’ll just have to install drivers manually.

So, not true.

Just be sure to reactivate it:

Activation helps verify that your copy of Windows is genuine and hasn’t been used on more devices than the Microsoft Software License Terms allow.

When installing Windows 11, the digital license associates itself with your device’s hardware. If you make significant hardware changes on your device, such as replacing your motherboard, Windows will no longer find a license that matches your device, and you’ll need to reactivate Windows to get it up and running.
…
If you don’t have a product key or digital license, you can purchase a Windows 11 digital license after installation finishes. Follow these steps to make a purchase:
…

That’s easy, it takes few seconds and retail keys can be moved to other hardware.

1 Like