[CentOS] Moving a Centos 5 install to another disk

Tue May 8 17:16:21 UTC 2007
Robert Moskowitz <rgm at htt-consult.com>

Barry Brimer wrote:
>> I want to get Centos 5 on my notebook, at minimal risk.
>>
>> I want to install it on a clean drive, make sure it 'works', the 
>> delete everything but /home (which is on a separate partition) from 
>> the Centos 4 drive and copy the Centos 5 over.
>>
>> Any 'caviats'? I would first tar up the Centos 4 stuff before putting 
>> my foot into it.
>>
>> To what extent do I need to have the same drive layouts? Is it enough 
>> that /boot and / are consistant (ie each is in its own partition). I 
>> am working with /home in a separate partition.
>
> I would make 2 tar backups, 1 of /home and one of everything else. If 
> something doesn't work out in your install, you can repartition the 
> drive, put all of your files back in place, and reinstall your boot 
> loader and be back in business with your previous setup.
>
> I might even prefer to let it reformat the whole drive, and restore 
> /home from archive just in case there were any different filesystem 
> options used between the two different CentOS versions. 
My goal is to not be out of commision until I know the install works, 
and then to port over the install. I hope.

So what would be reformatting be?

I see this a potentially a semi-crazy swapping of boot drives so that I 
'know' where a partition is:

Install Centos 5 on new drive.
Mount old and backup drives, tar from old to backup drive.
Switch to old drive.
Mount new and backup drives, tar from new to backup drive.
Switch to new drive.
Mound old and backup drives, untar 'new tar' from backup to old drive.
Switch to old drive, and.....

Oh, all the 'drive mounting' is putting drives in USB drive enclosures.