[CentOS] Old hd, new machine

Les Mikesell lesmikesell at gmail.com
Wed Dec 16 15:55:49 UTC 2009

Robert Heller wrote:
> At Wed, 16 Dec 2009 07:33:38 -0600 CentOS mailing list <centos at centos.org> wrote:
>> Jussi Hirvi wrote:
>>>>> What should I do to make an existing CentOS (5.4) disc boot up on a new
>>>>> computer?
>>>>> [...]
>>>>> Would it be enough to boot with a DVD in rescue mode, or boot with
>>>>> another hd, and install grub?
>>> On 16.12.2009 12:16, Sorin Srbu wrote:
>>>> For me it has worked to just install the old hd in the new machine and boot
>>>> it up. Kudzo takes care of the rest.
>>> Then you have been lucky. :-) For me, the startup stopped already before 
>>> the CentOS splash screen. I guess something was wrong with the initrd.
>> If the disk holding the / partition needs a different driver than what you had 
>> during the install, you have to rebuild the initrd.  Anaconda knows how to do 
>> that, kudzo can't.  You can do it from a rescue-mode boot, but you may have to 
>> know the right module names.
> *Before* swapping out the old disk, add an appropriate scsi_hostadapterN
> (N >= 1) alias to /etc/modprobe.conf and then do:
> mkinitrd -f /boot/initrd-`uname -r`.img `uname -r`
> All should be good then.
> IF both the old machine and the new machine have your basic, vanila IDE
> disks, then there is no problem.

I've always wished the install/rescue disk had a mode to do this for you 
after you've moved the disks or restored a backup.  The reason you are 
trying to bring up the new machine may be that the old one is dead - and 
anaconda knows a lot more about picking the right driver modules than I 
ever will.  I've done it a time or two by installing a system on the new 
(or matching) hardware with a separate /boot partition, then making sure 
the old/new systems are updated to the same versions and keeping the new 
/boot but copying the rest of the old system over.

   Les Mikesell
    lesmikesell at gmail.com

More information about the CentOS mailing list