Two Elitebook HP laptops (different models) use the same type SATA drive. Ubuntu 16.04 was installed on laptop A. If it is transplanted to laptop B, can I expect it to work correctly if I haven't done any important modification to the default settings?
I realize that I can simply perform the transplant, however, it makes sense to pose the question to avoid any landmines and avoid wasting time.
Yes, you can take out the hard disk from one and insert it into the 2nd notebook.
1 thing you need to do before though: remove 3rd party drivers. There are probably 2 you need to check: drivers for your video card and your NIC. Re-install those drivers on the new notebook.
Both being HP -might- have them have the same hardware (or nearly the same) so it could work without removing 3rd party drivers.
Assuming you're using the stock kernel (with no dependency on particular hardware), and the CPU architecture is the same (x86, amd-64, etc), there's no reason why swapping the HDD would prevent Ubuntu from booting. Check
/etc/modules
and/etc/modules.d
for any hardware-specific tweaks you may have done on laptop A which may cause issues when applied to laptop B.I wouldn't bother removing any 3rd party drivers you had to install for laptop A hardware. Such drivers (e.g. AMD Catalyst) often don't cope well with package managers, so during the uninstall they can alter or remove files used by something else in your system. I have a first-hand experience when removing Catalyst from a Lenovo laptop resulted in a broken system.
Another kettle of fish you may want to check is Xorg configuration: if you had to tweak
/etc/X11/xorg.conf
to get hardware acceleration or multi-screen desktop on laptop A, those setting may prevent the X server to start properly on laptop B, and though your system will still boot you won't get the desktop environment you're familiar with. If your plan is to permanently transfer the HDD to laptop B, I'd recommend to simply delete/etc/X11/xorg.conf
(making a backup beforehand) to let the X server do the autodetection.I cannot foresee any issues that could arise from transferring the HDD from laptop A to laptop B.
When Rinzwind mentioned the NIC it reminded me of a potential gotcha. There is likely a file
/etc/udev/rules.d/70-persistent-net.rules
. It "hardcodes" the first laptop's MAC address. So, in the second laptop a number of possibilities can happen. Either:The easy fix is to
sudo rm 70-persistent-net.rules
and reboot.Caveat: I'm basing this on Debian. Ubuntu may be different.
Yes you can clone one HDD to another. I used to do it all the time with clonezilla for work. You can download clonzilla for free at the link below.
http://clonezilla.org/downloads.php