Is there a way to successfully transplant a Linux system to new hardware?
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
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.
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336
Rep:
Is there a way to successfully transplant a Linux system to new hardware?
I want to build a new machine for Linux so I can use my current one for Windows/gaming. Currently this machine has two SSDs, one for each OS, so I want to just take the SSD and put it in the new system. The systems are somewhat similar, they both have a Gigabyte motherboard, the new one is a core i3 and the current one is a core i7. I will take the video card too and put it in the new system, as Linux video is flaky and did not want to chance trying another video card now that I found one that works.
What steps should I take to ensure it boots and I don't get a crash, and also ensure that the network gets picked up? All the times that I've tried to transplant a Linux system or tried to add/change a network card were a failure as it would not detect the network card. That seems to be the biggest issue.
The only thing might cause the fault on boot is sata controller, but since they both Gygabyte mobos, it is very likely you will be successfull with moving your drive.
If you will be faced with sata problems, you can just rebuild kernel without having to reinstall all the system.
Other stuffs like sound and ethernet will not interfer to boot. Though they might be solved the same way if new mobo differs in terms of audio and ethernet chips.
What are the mobos do you have?
Added:
All the above (sata, audio, ethernet) may be critical if you have custom kernel at custom system like mine Gentoo, but since you are using Kubuntu, your kernel should be equipped with a lot of modules for different hardware. As well as your software should be built with generic CPU command set, without special CPU-related twiks. So I do not see any problem to move your drive to other box.
Delete the file /etc/udev/rules.d/70-persistent-net.rule (or such) before (or after) transplant to regen eth0 with the new NIC (otherwise it will be assigned eth1 etc.)
If you have Intel HD Video which comes with processor then video would not be problem given cpu gen2+. For networks drivers you should definitely build kernel and run mkinitrd and use it.
The only 100% sure way is to make a new clean install.
It should be quite possible to simply move hard drive and boot. No crash would hurt the install. I'd have live media just in case you need to re-configure some files by hand.
Your main question seems to be network card. Find new nic info. Be sure you have a driver on hand just in case it doesn't have support. Can load new driver into current hardware too now.
Can also consider cloning this or backing this install into a usb or networked drive.
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336
Original Poster
Rep:
Video card is a Radeon HD 7870. Network card is Intel Corporation 82579V Gigabit Network Connection (rev 05). Going from a Gigabyte X79-UD3 to a Z97MX.
I will be making a backup image first. I want to avoid having to clean install, that's just too much work having to reconfigure everything, re-troubleshoot all the issues that I've applied fixes for over time or other changes I've made at some point in time etc and trying to even remember what I did. I want to try to avoid it, but worse comes to worse I'll have to. At that point may as well give another distro a try too.
Network card is Intel Corporation 82579V Gigabit Network Connection (rev 05). Going from a Gigabyte X79-UD3 to a Z97MX.
It should be bootable on first attempt, both X79-UD3 and Z97MX built upon Intel chipset and should use the same ahci module.
Network chipset differs, though most likely Atheros driver already built, you might need to modprobe it for first time. And
as it mentioned above, remove /etc/udev/rules.d/70-persistent-net.rule file, it will be recreated on next boot regarding to your new interface MAC address.
Well, the few times I've upgraded my hardware (mobo, cpu) since switching to Linux, everything's just worked (try that on a Windows system). Never any problem with networking either. To my (limited) experience, as long as you stick to standard hardware (i.e. no factory built system), you should be fine. And if things fuck up anyway, a fresh install isn't that a big deal.
Delete the file /etc/udev/rules.d/70-persistent-net.rule (or such) before (or after) transplant to regen eth0 with the new NIC (otherwise it will be assigned eth1 etc.)
you allready got the answer , go4it and be happy , eth naming is the single issue when migrating frm 1 pc to another,
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336
Original Poster
Rep:
Sounds like this should not be too problematic. Been running memtests and stuff on new machine, once it passes I'll add the drive and video card and report back.
Even rebuilding isn't necessary - rebuilding the initrd maybe, just to include any newer drivers as that is where they come from in the first place. After root is mounted, additional drivers can come from the root filesystem.
Distribution: Mint 20.1 on workstation, Debian 11 on servers
Posts: 1,336
Original Poster
Rep:
Well that was a no go. Just get a black screen when I try to boot on the new system. I get as far as the grub menu then it just goes dark. Not black, like if it was off, but dark, like the graphics is initialized but it's not displaying anything. At this point it's just locked up. If I hit num lock key or something the light does not change.
Going to have to reinstall. I just put the drive back in the original system, don't feel like dealing with a reinstall right now. Think I'll order another SSD and video card so I can do it while my main system is still functioning. I hate working on stuff like this while being dead in the water. At least this way I'll have both systems running in parallel till I get all my stuff organized on new one. By keeping the video card and Linux hard drive (which has grub) in that system it also wont mess up my Windows install. I was ready to deal with reinstalling Windows but really did not want to reinstall Linux but looks like I'll have to.
I'm running a distro that's near end of life anyway (Kubuntu 13.10) so guess I would have had to reinstall at some point. Going to install Mint.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.