LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 09-27-2008, 04:12 PM   #1
Q..
Member
 
Registered: Jul 2007
Posts: 54

Rep: Reputation: Disabled
Moving hard drive with install intact


I'm trying to move a hard drive from one PC to another so I can retain the install without having to do it over. It's not working on the new machine, it gives an error about not being able to move root.

The two machines are different architecture, but I even compiled a new kernel on the old PC to the spec of the new one but it didn't matter. I don't remember the exact errors but something about not finding resume device, so maybe the partitions are not being detected. Isn't that strange? Same exact hard drive, no other hard drives set up. Why wouldn't it detect it as it is? The root param in grub is set up to the label, so it shouldn't matter. Does mkinitrd use the partition UUID or something like that? Even if it did, is that going to change on a new PC on the same hard drive? I don't know but I'm doubting it. What could be causing this?
 
Old 09-27-2008, 04:37 PM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,578

Rep: Reputation: 186Reputation: 186
Quote:
Originally Posted by Q.. View Post

Does mkinitrd use the partition UUID or something like that? Even if it did, is that going to change on a new PC on the same hard drive?
The initrd is different for different hardware. it is not unusual for an initrd not to work when transferred to different hardware. You may need to use the mkinitrd command to create an initrd which will work on the second computer.

http://www.ibm.com/developerworks/li.../l-initrd.html

-----------------------
Steve Stites
 
Old 09-27-2008, 09:09 PM   #3
Q..
Member
 
Registered: Jul 2007
Posts: 54

Original Poster
Rep: Reputation: Disabled
Thanks, but that link doesn't really explain how to do that. I tried setting ARCH=i686, nothing. Nothing in the man about it either.

Last edited by Q..; 09-27-2008 at 09:13 PM.
 
Old 09-28-2008, 11:40 PM   #4
Q..
Member
 
Registered: Jul 2007
Posts: 54

Original Poster
Rep: Reputation: Disabled
Oh well, I got it. These are the basic steps I found to work with Fedora:

Set up the old drive on the new PC, of course. Boot up another install on it, live media or otherwise. It must be new enough in relation to the install to be recovered, so for example, no 2.4 for recovering Fedora. I had an unused partition so I installed an old version of Fedora on it, same version being recovered.

Once up and running, mount the partition to be recovered to /mnt for example, full read and write

cd /mnt

mount -t proc proc /mnt/proc
mount --bind /dev /mnt/dev
mount --bind /sys /mnt/sys

chroot /mnt /bin/bash

mkinitrd -f /boot/initrd-[kernel-version-applicable].img [kernel-version-applicable]

Last edited by Q..; 09-28-2008 at 11:41 PM.
 
  


Reply

Tags
initrd, recover


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
Moving files from a Linux hard drive to a Windows Vista Premium hard drive WolfMan51 Linux - Hardware 5 07-12-2011 10:19 AM
Moving Hard Drive After Install PiscisBos Linux - Software 2 02-14-2005 01:14 AM
moving webserver to different hard drive mouse46 Linux - Newbie 2 03-20-2004 09:15 AM
moving to a new hard drive n1wil Linux - Software 4 05-21-2003 03:38 PM
moving my hard drive illtbagu Linux - General 2 02-08-2003 05:56 PM


All times are GMT -5. The time now is 03:19 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration