LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux > 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

Tags used in this thread
Popular LQ Tags ,

Reply
 
Thread Tools
Old 09-27-2008, 04:12 PM   #1
Q..
Member
 
Registered: Jul 2007
Posts: 48
Thanked: 0
Moving hard drive with install intact


[Log in to get rid of this advertisement]
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?
Q.. is offline     Reply With Quote
Old 09-27-2008, 04:37 PM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: atop the Blue Ridge
Distribution: Debian Lenny, CentOS 5.2
Posts: 7,250
Thanked: 31
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
jailbait is offline     Reply With Quote
Old 09-27-2008, 09:09 PM   #3
Q..
Member
 
Registered: Jul 2007
Posts: 48
Thanked: 0

Original Poster
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..
Q.. is offline     Reply With Quote
Old 09-28-2008, 11:40 PM   #4
Q..
Member
 
Registered: Jul 2007
Posts: 48
Thanked: 0

Original Poster
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..
Q.. is offline  
Tag This Post ,
Reply With Quote

Reply

Bookmarks


Thread Tools

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 1 09-23-2007 09:45 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 04:10 AM.

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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration