Back story: I was messing around with ubuntu and an HP laptop, and then remembered about an 2009 macbook with a broken screen I had in my garage. I plugged in the same hardrive as in the HP laptop and, to my surprise, it worked! It booted in the OS and everything worked OK.
That got me thinking, does ubuntu not care which hardware it is booted on (except when the hardware is incompatible)? Does ubuntu have some specific components it uses on a desktop computer than on a laptop? Is it possible to take a hardrive from one ubuntu machine and use it on totally different PC?
I have heard that windows has a "safety" feature that doesn't allow the OS to boot if different comp is used than last boot. Does ubuntu provide such a feature? Does ubuntu take track of the current hardware and store in a file somewhere?