mersenneforum.org  

Go Back   mersenneforum.org > Great Internet Mersenne Prime Search > Hardware

Reply
 
Thread Tools
Old 2018-04-06, 21:49   #1
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

381710 Posts
Default 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?
EdH is offline   Reply With Quote
Old 2018-04-06, 22:28   #2
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

37·263 Posts
Default

Quote:
Originally Posted by EdH View Post
Is there something I should be doing OS-wise?
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..
chalsall is offline   Reply With Quote
Old 2018-04-07, 00:51   #3
VBCurtis
 
VBCurtis's Avatar
 
"Curtis"
Feb 2005
Riverside, CA

486110 Posts
Default

Quote:
Originally Posted by chalsall View Post
Nope. You should be fine.
.
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.
VBCurtis is offline   Reply With Quote
Old 2018-04-07, 00:57   #4
chalsall
If I May
 
chalsall's Avatar
 
"Chris Halsall"
Sep 2002
Barbados

37×263 Posts
Default

Quote:
Originally Posted by VBCurtis View Post
Are you sure?
Yes. Based on my previous experience.

Quote:
Originally Posted by VBCurtis View Post
...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.
The latter.
chalsall is offline   Reply With Quote
Old 2018-04-07, 04:09   #5
Mark Rose
 
Mark Rose's Avatar
 
"/X\(‘-‘)/X\"
Jan 2013

22·733 Posts
Default

I've done this more times than I can remember. Moving a Linux installation from hardware to hardware is something I take for granted.
Mark Rose is offline   Reply With Quote
Old 2018-04-07, 14:00   #6
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

11×347 Posts
Default

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!
EdH is offline   Reply With Quote
Old 2018-04-07, 14:22   #7
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

3,739 Posts
Default

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.

Last fiddled with by paulunderwood on 2018-04-07 at 14:45
paulunderwood is offline   Reply With Quote
Old 2018-04-07, 16:43   #8
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

23×3×5×72 Posts
Default

Quote:
Originally Posted by EdH View Post
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!
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.
henryzz is online now   Reply With Quote
Old 2018-04-07, 19:38   #9
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

11·347 Posts
Default

Quote:
Originally Posted by paulunderwood View Post
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.
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:
Originally Posted by henryzz View Post
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.
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.
EdH is offline   Reply With Quote
Old 2018-04-07, 21:28   #10
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT/BST)

23·3·5·72 Posts
Default

Quote:
Originally Posted by EdH View Post
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.
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.
henryzz is online now   Reply With Quote
Old 2018-04-07, 22:53   #11
EdH
 
EdH's Avatar
 
"Ed Hall"
Dec 2009
Adirondack Mtns

11·347 Posts
Default

Quote:
Originally Posted by henryzz View Post
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.
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.
EdH is offline   Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Anyone experience problems with USB hard drives? Jeff Gilchrist Hardware 10 2011-05-18 13:16
Any thoughts on large hard drives... petrw1 Hardware 21 2010-04-27 21:33
k's/n-ranges not searched for team drives gd_barnes No Prime Left Behind 20 2008-12-26 08:13
prime95 blend torture test and memory swapping to disk Tresark Software 8 2004-06-17 19:03
Memory settings and swapping problem MaxP Hardware 3 2003-12-20 05:08

All times are UTC. The time now is 10:54.


Sat Jul 17 10:54:08 UTC 2021 up 50 days, 8:41, 1 user, load averages: 0.99, 1.25, 1.31

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.