I'm about to upgrade my computer but might keep some parts. Just wandering what I would have to keep to prevent me having to reinstall my OSs, at the moment I have a dual boot setup with ubuntu and windows 7. I'm pretty sure you can't just take your hard drive with the OS on it and put it into a different box and keep going (can you?) but I know you can change the graphics cards, secondary hard drives and ram with out a problem. So what is it that you can't change? The CPU? Motherboard? Thanks for any replies
It all depends on how big of changes you're making. If you are moving from a 32-bit OS to a 64-bit OS, you definitely will need to reinstall. If you are moving from an AMD processor to an Intel processor, or vice-versa, you may need to reinstall. Beyond that, you should be able to move over the hard drive and boot up fine, you'll just need to make sure to install the proper chipset, audio, video and other drivers. Windows 7, in my experience, is pretty good about being shuffled around (though you'll certainly have to reactivate), I don't know about Ubuntu so much, but many of Ubuntu's drivers are quite generic, so it may be worth a shot. Definitely make a backup before starting though.
There is no hard limit to the amount of hardware you can change - it all depends on OS and drivers and the hardware versions.
OEM Windows might throw a tantrum and refuse Windows activation if it sees too many hardware changes, but there is no technical reason for this, it's just a licencing watchdog.
In general you could swap even the hard drive; just use Linux Live CD and program called "dd" to take 1:1 copy of the disk to new one.
I regularly swap hard drives, motherboards, memory, graphics cards, processors etc by just shutting down the system, swapping, and booting again.
As long as the architecture of the new processor matches the one used by OS, you're good to go. Ie. swapping in 32-bit CPU when OS is 64-bit would cause problems, but that's it.
In practice, the OS needs to have necessary drivers for the hardware for them to work; the most essential are the drives and the network interface card (NIC). If those are met, then the OS just boots, and tries to find drivers for the rest. On Linux the drivers often are already there, they are just loaded on boot, on Windows it depends; if the NIC works, Windows goes looking for the drivers first on the disk and then from the Windows Update site.
After that's done, and a reboot, you can then load the remaining drivers yourself from the websites of the manufacturers of each piece of hardware.
In rare cases some old driver/utility program causes problems because it insists on running while the associated hardware is not present. Keep eye on Event Log for those, and if you see such issues, remove/reinstall the said utility.
You should be able to take your HDD and drop it into another machine (where the only common part is the HDD itself.
I have done this a few times when our Windows image wouldn't deploy to a certain machine - just deployed it to a spare HDD and swapped them over.
At worst you would have to ring Microsoft (though I haven't seen anyone have to do this in years), and deal with poor graphics for a little while (if you have an obscure video card that Win7 doesn't auto detect).
Other than that it's just a matter of sorting out drivers.