LinuxQuestions.org

LinuxQuestions.org (http://www.linuxquestions.org/questions/index.php)
-   Linux - Hardware (http://www.linuxquestions.org/questions/forumdisplay.php?f=18)
-   -   Moving hard drive to another box? Do I have to reinstall OS? (http://www.linuxquestions.org/questions/showthread.php?t=4175450359)

Birdman48 02-15-2013 05:39 PM

Moving hard drive to another box? Do I have to reinstall OS?
 
I am planning on moving the hard drive from one machine to another. The HD currently has OpenSUSE 11.4 on it. I wonder if there will be issues and if there are no apparent issues how can I test it to prevent any problems down the road? Are there functionality or speed tests I can perform? I will have a backup of my data in case I need to format and reinstall.

kostya 02-15-2013 06:46 PM

I think it's not so much about speed. The question will be, whether the kernel will be able to see all the new hardware. This includes, first of all, the HDD (usually SATA) controller chip of your motherboard. OpenSUSE 11.4 seems to be not the latest release at all, so make sure you're using the most recent kernel.

...So, essentially, your kernel will have to see the HDD controller, USB, Network adaptor, sound & video devices properly. All this must give you no problems with recent kernels, because all the chips used by manufacturers are known and included into mainstream default kernel.
I've moved HDDs with installed OSs from one machine to another quite a few times. It just works :).

etech3 02-16-2013 12:44 AM

I kow on Debian, you have a choice on the expert install to use all drivers or just ones for the machine you are installing on.

A couple of things:

1. MAKE BACKUPS you have been warned.

2. do an upgrade on the existing machine. As stated above. do kernel first and then upgrade versions if you can.

3. Pop the hard drive out and plug it into the new machine (if you can take the original machine off-line). See what happens.

4. Use a disk cloning software. I use mondoarchive. with mondo, if the machines are close to the specs, you run it and go. You may have to resize the drive. But it will work you through it.

5. After the install to the new machine, do a full upgrade and the......

DO FULL BACKUP AGAIN

Just my :twocents:

jefro 02-16-2013 03:10 PM

At one time you had to re-install. Then it was should re-install. I still think one should. This is one advantage to partitions for /home and such.

However, there are millions of newer distro's that have been moved like you wish to do and not one issue.

There may be some odd installers that use some patch for some hardware still. You'd have to get into the nuts and bolts to find it.

Birdman48 02-17-2013 08:04 AM

Now I know. Thanks for the help.

jlinkels 02-17-2013 11:45 AM

Come ON.. this is not Windows with zillions of hidden gawdknowswhat. Provided the new box doesn't have any very special hardware needing very special drivers you only have two issues:

1. Network is not recognized because udev insist on naming the network adapter in the old machne eth0. Solution: remove the line in /etc/udev/rules.d/70-persistent-net.rules mentioning eth0 and reboot.

2. If you ever installed an Xorg driver which was not recognized automatically by xorg, or have something like that in your new machine, X won't start. This is corrected in the normal way is should be corrected, and exactly the same holds for re-install.

Since the machine boots normally at least into console it is easy to solve both problems.

Summarizing: a new installation is spending needless effort for more than 95%.

jlinkels

jefro 02-17-2013 05:02 PM

Best practice is to always do a clean install.

While it is not windows, installers do sometimes still select choices that are hidden to common users. Unless you can predict the result then do the simple swap. The only OS I know of that was built to be moved was BeOS.

the dsc 02-18-2013 11:40 PM

I'm not sure the actual OS would work with no trouble at all, but the user's configurations most likely will. That is, after you've "re"-installed everything you had before, of course.

I believe that there is some apt-related tool that makes you a custom meta-package of everything you have installed, that may be quite handy if you have lots of stuff installed that you use somewhat regularly but won't readily remember to add manually to synaptic or whatever.

Here it is, I guess:

http://voices.yahoo.com/meta-backup-...d-7176574.html

Perhaps it's still safer to start with brand new users and gradually copy stuff from the old user folders, but maybe it's not needed at all. It may depend though on things like being KDE, Gnome or something else. I was using openbox when I did that and I didn't notice anything going wrong or ceasing to work, not that I recall at least.

For global configurations you can always backup the relevant files and then just copy them over their correct places in a new install.

compassnet 02-22-2013 07:19 PM

I just built a new machine while keeping the same OS version (Slackware 14.0) in it.

I suggest you compile a new kernel and test it on the old machine. If it works without issues, keep it listed in lilo/grub and then move the HDD to the other machine. Oh, I'm assuming your bootloader is installed in the same HDD you're moving, of course.

If the old/original kernel doesn't work, boot the new one you just compiled.

Kernel 3.2.29 didn't like my new hardware, but 3.7.5 and 3.8.0 without a sweat (so far so good).

compassnet.

selfprogrammed 02-22-2013 09:14 PM

If original install was customized in any way, then obvious that a similar customization would be required on the new machine.

The OS will probably work.

The danger is finding months later that some programs or tools do not work because they have cache, history, and configs from the previous environment. I do not think that any of the programs were designed with such a environment change in mind.
The problem is that most of them will get through it. Which ones won't and how to fix them is unknown.

kostya 02-24-2013 06:49 PM

Quote:

Originally Posted by selfprogrammed (Post 4897906)
The danger is finding months later that some programs or tools do not work because they have cache, history, and configs from the previous environment.

Can you think of any particular example, please?

k3lt01 02-24-2013 08:11 PM

I swapped HDDs a few times from one machine to another and have never had any problem except if you need non-free firmware which I keep on a flash drive anyway. Not saying there can't be a problem but I would give it a go first before even considering a clean re-install.

kostya 02-25-2013 11:59 PM

Quote:

Originally Posted by k3lt01 (Post 4898955)
I swapped HDDs a few times from one machine to another and have never had any problem except if you need non-free firmware which I keep on a flash drive anyway. Not saying there can't be a problem but I would give it a go first before even considering a clean re-install.

Right, me too. In fact, I've just did this same trick with a MS Vista HDD: moved it over to a brand new Z77 i5 Ivy Bridge based setup, and everything (everything!) worked right away! I only had to install new graphics, audio & networking drivers, but this isn't something we're discussing here.

k3lt01 02-26-2013 12:37 AM

Quote:

Originally Posted by kostya (Post 4899828)
but this isn't something we're discussing here.

What isn't something we are discussing here? Swapping HDDs with Windows on them?

With Linux I have never had to do anything but swap over. No speed tests etc at all, if the cabling fits and the MoBo is capable of supporting the drive I just fit it and then install non-free firmware if need be.

Shadow_7 02-26-2013 12:56 AM

If the bootloader and /etc/fstab uses /dev/ names for it's locating information you could have issues. If they use the UUIDs across the board, it should just be plug and play. If your install isn't too bulky you could clone it to a usb stick make it bootable with it's own bootloader and try to boot that on the other machine first. Most of the gotchas are the /etc/fstab, the network hardware, and having to reconfigure X because there's a different video card driver and different PCI bus location.


All times are GMT -5. The time now is 11:42 AM.