LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Using an Old Computer's HD in New Computer Without Reformat (https://www.linuxquestions.org/questions/linux-hardware-18/using-an-old-computers-hd-in-new-computer-without-reformat-4175427317/)

Sylvester Ink 09-14-2012 05:20 PM

Using an Old Computer's HD in New Computer Without Reformat
 
My work computer died due to a PSU/Motherboard/hardware issue, and it will probably be replaced with a new PC. The hard drive from the old one works just fine, and it has all of my work and development environment on it, so I'd like to just transfer the hd to the new computer and continue working. I was wondering if I would need to reformat and reinstall Linux on it, or whether I can keep using the setup that I currently have on different hardware. The hardware will probably be similar enough (x86 cpu, etc) but with some differences (ram, processor speed, motherboard, etc).
I don't have any custom drivers or anything hardware specific that I set up personally, so I suspect I should be fine, but I just wanted to make sure there wasn't anything Linux does during install that might restrict me from doing this sort of swap.
The distro I'm running is Slackware 13.1.

Dman58 09-14-2012 06:22 PM

Your best bet would be to backup the information, reformat, & partition the drive accordingly; then install the OS fresh so it can detect & reconfigure itself for the new hardware.

@ least that's what I would do. It's seems to me that just transferring to a new machine might affect your data. Unless you were gonna use another drive to install the OS & just pull the info off of the old drive as needed.

Hope this helps

syg00 09-14-2012 08:04 PM

Depends a little on what you're planning:
i) use the old drive as the boot disk on the new machine ?.
- should work but might need some "fiddling". Care would be needed as you mention installing Linux (again, why ?). Make sure your data is backed up and on separate mount points usually works o.k.
ii) use the old drive as a secondary disk on the new machine ?.
- shouldn't be an issue at all. Personally, if you plan on installing Linux on the new machine, I'd do that first and get it all bedded down, then add the old drive.

Either way I can't imagine "Linux" doing anything adverse to your data.

jefro 09-14-2012 08:10 PM

At one time you could not move a hard drive. Linux installers didn't install it correctly to move it. The old rule was always "reload". Some of the old installers did some really odd stuff when it searched for devices and made on the fly adjustments. I think most installers have stopped that.


In most cases you can easily move a linux hard drive to different systems. I do it almost every day. You may only have to switch a few things. I can't say that every install will work 100% but it is easy to try. Might have to edit some of the boot data.

Now if you mean a single core to a multiple core or wanting to go from 32 bit to 64 bit, you may wish to consider using the drive as a backup and load the OS for maximum performance to match system.

Sylvester Ink 09-14-2012 09:48 PM

Just to clarify, I would be booting from this disk and using it as my main. Think of it as a transplant. My reason for this is that setting up the environment took so long in the first place, and I have urgent projects to work on. (So using it as a backup drive sort of defeats the purpose.)
I'm pretty sure I should be fine hardware-wise, since the new machine will likely have similar specs. I'm using Slackware's huge kernel, so it should be able to handle everything under the sun. And if the CPU does happen to be multicore, it shouldn't take more than a quick swap of the kernels to get that working again.
My main concern was if there was anything else I should be aware of, but it seems like for the most part I should be fine. All the important data is backed up, and if worst comes to worst, I'll just do a clean install. But this will save me a lot of time if it works.

Thanks for the advice!

Dman58 09-14-2012 11:00 PM

That's true when he machine boots the kernel should set itself up properly.

Please post your results.

Sylvester Ink 09-21-2012 03:13 PM

I finally got my replacement computer and did the hard drive swap, so I thought I'd post my results for those who follow.

The replacement computer is much newer than the old machine. More RAM, different ports, and most significantly, it's a quad core whereas the previous one was single core (both 32 bit). However, none of this had any effect on the old Linux install, and everything ran quite smoothly. (I'm sure I can get more optimized performance once I swap to Slackware's smp kernel.)

There's only one issue I've found so far, and that's the networking interfaces. I have two interfaces set up, eth0 and eth1, used for the company network and a private network I use for testing. In the new computer, these both exhibited different MAC addresses, so I had to adjust the settings to compensate.

First, I had to remove /etc/udev/rules.d/70-persistent-net.rules. This file allows udev to reserve interface names for specific devices, no matter what order the kernel detects them. For example, if eth1 was detected first, this would ensure that it would retain the name eth1, instead of stealing eth0 from the other interface. By removing the file I allowed the system to redetect the interfaces and create a new file, instead of naming the new interfaces eth3, eth4, etc. (The names in this file can be manually edited if you prefer a certain order for the names).

Secondly, I had to edit my /etc/rc.d/rc.inet1.conf file so that it had the correct network settings, as eth0 used a local, static IP and eth1 used DHCP. I just had to make sure the specified interfaces matched their settings.

After this, my network worked as it should, for the most part. However, there is one remaining issue. eth0 is a usb network adapter (since I have only one network card built in), and it tends to drop packets for no reason I can determine. It's not a huge amount, but it's enough to be inconvenient. It's possible this is a bug for Slackware 13.1 that may be fixed in more recent versions, but I can't be certain. I am continuing to look into this, and if I figure it out, I'll post what I find.

Also, for those who follow, do note that I'm using Slackware, with a very minimalist environment, so I don't have any automatic networking tools installed. More likely than not, if you're using a distro like Ubuntu or Fedora, your network manager may resolve this issue for you.

cgtueno 09-28-2012 06:17 AM

Hi

Could I suggest that you consider creating/buying a NAS, then you could use is as a backup/migration server on your network.

Suggestions: Use an old PC with a large hard disk drive, ans FreeNAS or something similar

Just a thought.

C.

notsure 09-28-2012 07:26 PM

I thought the OP was very clear.
I have moved around HDDs in different systems, I don't recall ever having difficulties. I use Arch.

Glad to hear that you're using linux at work. It keeps me calm at work. Windows is depressing and it makes me angry. Not good.

Dman58 09-28-2012 08:26 PM

Thats great, I'm happy to read that it all worked out. Thats why Linux is :cool: "DA BOMB"!!!

Thanks for posting your results


All times are GMT -5. The time now is 12:17 AM.