![]() |
Swapping Linux Drives Between Computers
I have enjoyed greater freedom in moving a linux drive between machines than I ever did with Windows. (At least, older versions - I don't know about newer ones.)
That said, whenever I move a drive from one machine to another, the system comes up right away with no (apparent) issues other than defaulting to DHCP for the "new" interface hardware. I always recompile GMP, ECM-GMP, Msieve, ggnfs, YAFU, etc., so the programs will match the new hardware. What I'm wondering, is whether there is anything other than updates I should do for the OS. Will the normal OS suffer any degradation from the h/w swap that I would not detect, but would make a difference in the running or the compilation of the above packages? Is there something I should be doing OS-wise? |
[QUOTE=EdH;484614]Is there something I should be doing OS-wise?[/QUOTE]
Nope. You should be fine. Winblows ties your OS licence to the hardware signature (read: every single bit of kit you paid for), so every time you change anything M$ will revalidate your licence, and perhaps tell you that you need to pay them several hundred dollars for the right to run their crap OS. Since Linux is Free, you can swap your hard drives as often as you like. Mirror them. Deploy new computers. Whatever you want to do.. |
[QUOTE=chalsall;484619]Nope. You should be fine.
.[/QUOTE] Are you sure? Your examples and comparisons seem to miss entirely OP's question. If I have Ubuntu installed on a Core2 system, and I move the hard drive from that core2 to my haswell and boot the old ubuntu image, the system will be fine? What if I move to a Ryzen? Like Ed, I've been pleasantly surprised to find ubuntu usually boots on the new hardware; I am curious if this is by luck/similarity of hardware (say, i7-920 laptop to sandy bridge desktop), or if linux installs are designed to handle such changes. |
[QUOTE=VBCurtis;484628]Are you sure?[/QUOTE]
Yes. Based on my previous experience. [QUOTE=VBCurtis;484628]...I am curious if this is by luck/similarity of hardware (say, i7-920 laptop to sandy bridge desktop), or if linux installs are designed to handle such changes.[/QUOTE] The latter. |
I've done this more times than I can remember. Moving a Linux installation from hardware to hardware is something I take for granted.
|
Thanks for all the replies. The only issue, as mentioned earlier, that I have found is that all my math machines use static IPs, and when I swap to new hardware, the new network interface is defaulted to DHCP. This is a small inconvenience, since I run the machines headless normally and have to connect a monitor and keyboard to reset the static IP. But, then again, I'm already swapping drives.
My OP was meant more along the lines of questioning whether I was missing something OS-wise that I should add, as I do for my recompilation of the math specific packages. Thanks all! |
On some distros you might need to reconfigure what udev thinks the NIC is.
I suspect there are commands for changing ssh keys when copying drives. By and large the monolithic Linux kernel does a good job when moving drives, but in some cases it might need a recompilation of the kernel to cope with finickity RAID stuff etc. |
[QUOTE=EdH;484688]Thanks for all the replies. The only issue, as mentioned earlier, that I have found is that all my math machines use static IPs, and when I swap to new hardware, the new network interface is defaulted to DHCP. This is a small inconvenience, since I run the machines headless normally and have to connect a monitor and keyboard to reset the static IP. But, then again, I'm already swapping drives.
My OP was meant more along the lines of questioning whether I was missing something OS-wise that I should add, as I do for my recompilation of the math specific packages. Thanks all![/QUOTE] It might be possible to run a script at startup that will detect a change in pc and set a static ip. This would probably work best with linking a static ip to a disk rather than pc. |
[QUOTE=paulunderwood;484690]On some distros you might need to reconfigure what udev thinks the NIC is.
I suspect there are commands for changing ssh keys when copying drives. By and large the monolithic Linux kernel does a good job when moving drives, but in some cases it might need a recompilation of the kernel to cope with finickity RAID stuff etc.[/QUOTE]The thing I've noticed about the NICs is that the one for new system is added while the older one is left alone. i.e. the new card is Wired connection 2, and Wired connection 1 still exists. But all works fine with the current (2) NIC. I have had no troubles keeping the ssh setup intact when I move the drive. Essentially, to my system, the drive is the machine and once I "correct" the IP, all is well for communication. Of course, that's when I recompile all the GMP, etc. packages for the new CPU. I try to use AHCI for all these systems, since there's no real long term backup needed. I thought that was really only affected at the BIOS level. I had one machine that wouldn't run AHCI, only RAID, even though it had only one drive. I finally discovered it was a bad SATA port on the MB. [QUOTE=henryzz;484701]It might be possible to run a script at startup that will detect a change in pc and set a static ip. This would probably work best with linking a static ip to a disk rather than pc.[/QUOTE]Not sure I follow exactly. In older distributions, I used to edit the network/interfaces file, but the later ones appear to rewrite that file based on other files during boot. I haven't studied all the new workings enough yet to comfortably rewrite anything. Perhaps I will take another look. Fortunately, I haven't had to transfer too many, but I might have to do several soon. I might soon have some newer, but still old machines that may actually take the place of some of the even older ones you suggested I stop using.:smile: |
[QUOTE=EdH;484712]
Not sure I follow exactly. In older distributions, I used to edit the network/interfaces file, but the later ones appear to rewrite that file based on other files during boot. I haven't studied all the new workings enough yet to comfortably rewrite anything. Perhaps I will take another look. Fortunately, I haven't had to transfer too many, but I might have to do several soon. I might soon have some newer, but still old machines that may actually take the place of some of the even older ones you suggested I stop using.:smile:[/QUOTE] I was assuming that you reset the static IP based upon either a config file or a command in the terminal. Both of these could be done automatically. It sounds like you need to rework out how to do it. A script run at login could detect a new pc and then run a script that sets the static IP. |
[QUOTE=henryzz;484720]I was assuming that you reset the static IP based upon either a config file or a command in the terminal. Both of these could be done automatically. It sounds like you need to rework out how to do it.
A script run at login could detect a new pc and then run a script that sets the static IP.[/QUOTE]My ignorance is in what I now need to change to get the new IP into the configuration. I used to just edit the interfaces file, but now it gets rewritten by something from somewhere else. Currently, I have to connect a monitor, keyboard and mouse, and use the gnome window for editing the network configuration. That's actually with Ubuntu. Debian remains a bit more complicated. In either event, I need to figure out what I can change where, to set the staic IP back persistently to the chosen address for the new NIC. Someday, maybe I'll study it further, but for now it's infrequent enough to just accept. |
| All times are UTC. The time now is 06:14. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.