So during the installation of a Linux OS on to a machine im assuming it picks the most appropriate drivers for the system. (i could be wrong, im just assuming this is how it works)…now if this is true is there a way to force it to re-scan for different hardware? for example, i install an OS on machine A then clone that over to machine B which is a completely different hardware and brand. is there a way for me to tell machine B to scan for necessary drivers or something of that nature or is this not a function of linux or even how it works?
The majority of drivers are included as part of the kernel (or as modules built against the kernel), so for the most part hardware detected during the boot process and if recognised a driver loaded. Some devices do need proprietary drivers, or in the case of graphics cards may be supported by open-source and proprietary driver alternatives.
In general, the following commands can assist with determining if a device is detected and associated with a particular driver
In my limited experience, I understand it will depend on what has changed. I’d guess that:
If it is the processor, it just works.
If it’s the MB but of the same chipset family, it will probably work, perhaps after a reboot.
If it’s a video card, you’ll need to either uninstall any proprietary driver first (not your case, as it’s an image) or boot in safe mode to do it. Perhaps it would be better to make the image with the default opensource drivers (or even specifying a basic driver like VESA or something).
If it’s an expansion card, it should work as long as it’s supported in linux.
When you do a clone you need to understand that disk drives are uniquely identified and you have to change them in /etc/fstab file and also in initd. One way to avoid the proble is to use partition labels ie put a unique label on each partition and tell the system to mount by label.