LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 09-14-2012, 05:20 PM   #1
Sylvester Ink
Member
 
Registered: Jun 2010
Distribution: Slackware
Posts: 99

Rep: Reputation: 35
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.
 
Old 09-14-2012, 06:22 PM   #2
Dman58
Member
 
Registered: Nov 2010
Location: The Danger Zone
Distribution: Slackware & everything else in a VM
Posts: 287

Rep: Reputation: 29
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

Last edited by Dman58; 09-14-2012 at 06:23 PM.
 
Old 09-14-2012, 08:04 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 18,080

Rep: Reputation: 2900Reputation: 2900Reputation: 2900Reputation: 2900Reputation: 2900Reputation: 2900Reputation: 2900Reputation: 2900Reputation: 2900Reputation: 2900Reputation: 2900
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.
 
1 members found this post helpful.
Old 09-14-2012, 08:10 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 19,152

Rep: Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921Reputation: 2921
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.

Last edited by jefro; 09-14-2012 at 08:15 PM.
 
2 members found this post helpful.
Old 09-14-2012, 09:48 PM   #5
Sylvester Ink
Member
 
Registered: Jun 2010
Distribution: Slackware
Posts: 99

Original Poster
Rep: Reputation: 35
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!
 
Old 09-14-2012, 11:00 PM   #6
Dman58
Member
 
Registered: Nov 2010
Location: The Danger Zone
Distribution: Slackware & everything else in a VM
Posts: 287

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

Please post your results.
 
Old 09-21-2012, 03:13 PM   #7
Sylvester Ink
Member
 
Registered: Jun 2010
Distribution: Slackware
Posts: 99

Original Poster
Rep: Reputation: 35
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.
 
Old 09-28-2012, 06:17 AM   #8
cgtueno
Member
 
Registered: Jul 2003
Posts: 363

Rep: Reputation: 50
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.
 
Old 09-28-2012, 07:26 PM   #9
notsure
Member
 
Registered: Jun 2012
Location: Detroit
Distribution: Arch x86_64
Posts: 112

Rep: Reputation: 10
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.
 
Old 09-28-2012, 08:26 PM   #10
Dman58
Member
 
Registered: Nov 2010
Location: The Danger Zone
Distribution: Slackware & everything else in a VM
Posts: 287

Rep: Reputation: 29
Talking

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

Thanks for posting your results
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help! 'Kernel Panic' when trying to reformat computer! madhouse Linux - Newbie 6 10-07-2009 11:36 PM
redirect printer output on computer 1(Win2000) to Computer 2(Ubuntu)via parallel port dmarkd Linux - Hardware 2 12-01-2008 03:51 AM
How to move open office doc from Linux computer to Windows computer Phoenixink Linux - Software 6 02-15-2007 07:09 AM
Why Scourge (2nd computer) isn't getting ip address from Misery (1st computer) dhcp? pslave Linux - Networking 2 04-09-2006 05:58 AM
How can i portage Linux from computer with Celeron proc to computer with Pentium 166? gdi Linux - General 4 05-31-2003 01:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration