If I replace my GPU or move my Linux drive to a computer with a different motherboard, will it detect the new hardware and load the right drivers at boot?
Will Linux adjust automatically if I move my drive to different hardware?
Answers
Usually, yes. The kernel detects hardware as it starts, and the system can load suitable drivers when they are available. That happens during normal boot, not just after a hardware swap.
It is not a guarantee that every device will work, though. The new hardware still needs a compatible driver, and the system has to get far enough through boot to use it.
Reply to this answer
The tricky bit can be the initramfs, the early boot environment that supplies drivers needed to reach the installed system. If it was built with only the old machine's storage drivers, the new machine might not be able to find the drive.
Some distributions offer a recovery boot option with a more complete initramfs. If yours does, that may be worth trying, then you can rebuild the normal initramfs with the drivers needed for the new hardware.
Reply to this answer
For a GPU swap, automatic detection is only part of the story. A driver also needs to support the new card. Third party drivers such as Nvidia's may need attention if the installed driver is not suitable.
DKMS can rebuild supported external kernel modules when a kernel is installed or upgraded, but that is separate from detecting a hardware change. It does not guarantee that a suitable driver is installed or that a rebuild will succeed.
Reply to this answer
Add your answer
Answers are reviewed before publication.
Related Discussions