Move a Linux install on a hard drive to a new computer.
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Move a Linux install on a hard drive to a new computer.
I just recently decided to move a hard drive from one computer to another. It happened to have an install of Linux Mint on it. To my surprise it booted up and ran fine on the new computer (both intel i3-i7 but otherwise entirely different hardware. I have a few questions around this. Are there many hardware specific driver/software installations that happens during a fresh install? I would think that would be yes, and things like web-cams/maybe ports/etc. B) if there are installation specific items can they be mitigated in any bulk way, IE system-wide recheck hardware. Or would the process be more of a see what works and what doesn't and look for drivers for whatever fails after the move? Lastly, it is it just a bad idea, and a clean install is the way to go?
Distribution: Mainly Devuan, antiX, & Void, with Tiny Core, Fatdog, & BSD thrown in.
Posts: 5,501
Rep:
When the kernel boots it looks at what hardware is on the computer & loads drivers for it, as long as the drivers are on the system, that's why you could just move your disk to another computer.
Nope. All the drivers have to be available.
Usually the initrd does that for you in a built system. During install that is all sorted - do a clean install to be sure.
At one time linux wouldn't easily move.
Then they got it to move on almost every common hardware type.
Then they messed it up again so your mileage will vary.
Things that don't move easily or correctly are network cards, video cards.
initrd refers to "initial RAM-disk." This is a ridiculous wedge very-sophisticated technology that is intended to allow "any Linux distro" to successfully boot on any hitherto-unanticipated piece of hardware upon which it might someday find itself."
What happens (and, yes, you can entirely omit this step if you are building your kernel from scratch ...) is that, after completing bare-minimum kernel initialization, the kernel mounts a RAM-disk containing a stripped-down shell and a set of scripts. The purpose of these scripts is to perform hardware detection and to insmod the loadable kernel modules that are necessary to keep going. When these shell-scripts exit, system initialization proceeds, fully expecting that the necessary hardware-support layers now magically exist.
(You say that your machine has a DECSystem token-ring network card? Cool. At least as of a half-dozen years ago, "Red Hat has you covered ...")
(Bonus points if you're old enough to have heard of "token ring." Double points if you've actually seen an office network made from coax. *koff, koff ...*)
Because of this technology, it is entirely feasible that your "old" Linux system will find that it is able to successfully boot on an entirely new box.
Last edited by sundialsvcs; 12-20-2016 at 05:12 PM.
my first testing with moving a linux install to new hardware was about 2 years ago when testing a friends broken ssd
installed linux on the ssd on my hardware then put it in about 6 other pcs/laptops just to test and it would work fine it was antix 13 i think
another time i installed antix15 on a core2duo system then moved the hdd to an athlon xp box, it would freeze, and not boot
i installed normally on the athlon box and now it works fine
in conclusion, although superior to other oses, if you need a quick boot to another hardware it would probably work
but if you want stability and dont know what you are doing, what to rebuild, like i did, i would reccommend reinstalling clean
My first computer contained a hard drive on which a friend had installed Red Hat 6 (original Red Hat, not RHEL) on his own computer. I couldn't get it to boot initially, partly because my friend had subsequently rearranged the partitions to include Windows 98 as well (Windows booted normally). Then, for good measure, he forgot the root password he had set for me. I had a rescue floppy that was supposed to boot Linux, but it didn't work because of the repartitioning. I had to use a Knoppix disc to change the root password, then change the root device. When I finally got it to boot, I noticed that the Red Hat hardware wizard (I think it was called Kudzu) was complaining about all kinds of changes. In the end, though, everything worked.
I was very impressed that I was able to fix Linux even though I knew so little about it. I thought that constituted real user-friendliness. If Windows won't boot, then it won't boot and that's the end of it. You have to reinstall it.
More recently I used a cloned AntiX to bring another old computer to life. Everything worked except the network card. It turned out that this had been named eth1 instead of eth0, so of course the scripts didn't work initially. This was in the early days of persistent network names; they still had the traditional form (eth, wlan) but the numbers were assigned by bus geometry. Again, it was easily fixed.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.