# HD dying - best way to copy over gentoo installation?

## syscrash

Hi,

My old hd is dying, and I'm getting a new one to replace it. I'm wondering what the best way is to copy over my whole gentoo installation (not partition) to the new hd. I have searched the forums, and I see examples using tar. I'm wondering if I can use cp -pR instead.  :Confused: 

----------

## fp2099

dd is probably the best option:

dd if=/dev/"device-name" of=/dev/"device-name" bs="blocksize"

I have some doubts on the blocksize since small ones will take a long time...

try 399k

[PS] found this: http://www.sunmanagers.org/pipermail/summaries/2003-March/004739.html

[EDIT] cp will not work and you better use a livecd for doing this procedure, that way you can do the copy and test it.

----------

## syscrash

I would use dd, but the new one is bigger than the old one, so I need to find alternate methods  :Razz: . The partitions will be bigger on the new one.

----------

## fp2099

if that's the case use parted

[EDIT] Knoppix cames with qtparted

----------

## ctford0

i use cp to do this alot

there are a few things you need to know however....

/dev will not copy over correctly if you do it while the os is running, however a quick untar of a stage3 of just the /dev dir is the easiest fix, so you do tar -xvjpf stage3xxx ./dev

next /proc is empty so you can just create the /proc directory on the new disk as you probably will get in to some trouble with symlinks and such if you try to copy it.

next you will probably want to us cp -a which includes the options that you listed plus another, check cp --help for more info.  when your ready to issue the cp command just do 

cp -a /boot /bin /etc .... /backup where /backup is your new disk.  make sure you include all of the directories in / besides /dev and /proc.  you do not want to create /backup in /mnt because you need to copy it as well.  you will want to setup your partitions before you start the copy just like you do during the install, creating the boot/ dir and mounting it.

after this you should be good to go as long as this disk will be the same drive letter as the one  you are copying from, ie hda or some such.

hope this helps

chris

----------

## AresTheImpaler

The best thing to do IMHO is to boot a live cd and then 'cp -a' That will take care of everything including links, directories, etc, etc.... I did that twice about a month ago

to recap:

```
cp -a /dev/hda1 /dev/hdb1'
```

----------

## syscrash

Just making sure,

If I had mounted the new drive on /newroot, I would do this:

```
cp -a /bin /home /lost+found /opt /root /service /usr /boot /etc /lib /sbin /mnt /tmp /var /newroot
```

```
mkdir /proc
```

```
mkdir /dev
```

I only have one root partition and one swap partition, so I think this should work perfectly, right  :Smile:  .

Makes sense to me  :Razz:  . Wouldn't all of my device files in /dev be automatically recreated when I boot from the new drive? Thanks.

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## bruor

i have had to do this many times between ide and scsi,  raid array to raid array etc...

heres what worked for me with no problems at all... 

mount up your old drives where tehy need to be to reserve the file system

i.e.  old drive /mnt/old/gentoo and /mnt/old/gentoo/boot

     new drive /mnt/new/gentoo and /mnt/new/gentoo/boot

then  run cp -pidRv /mnt/old/gentoo/* /mnt/new/gentoo/

from the livecd of course...

i have had no problems with this at all,  mythtv still works apache is still up  nothing has changed at all,   just another alternative for you, becasue it doesnt care about file system partition size etc...

oh yeah  you need to run grub or lilo also

----------

## ctford0

 *syscrash2k wrote:*   

> Just making sure,
> 
> If I had mounted the new drive on /newroot, I would do this:
> 
> ```
> ...

 

no, the standard device files that are present in /dev will not be created such as ttyxx and the like, thats why they are included on the stage 3 tar ball.  like some of the others said, booting from the livecd will take care of the need to untar /dev from the stage3.  

you do have to run grub as bruor stated just to get it to write to the mbr.

chris

----------

## bruor

sorry about the 100 posts i was trying to post from work and it kept telling me i was disconnected...   so i thought it didnt go through... my bad 

really sorry about that

----------

## syscrash

 *ctford0 wrote:*   

>  *syscrash2k wrote:*   Just making sure,
> 
> If I had mounted the new drive on /newroot, I would do this:
> 
> ```
> ...

 

cool, so you mean I can just copy over /dev from the stage3 tarball and I should be good  :Wink: 

btw bruor, you pwned the forums   :Laughing: 

----------

## ctford0

 *syscrash2k wrote:*   

> 
> 
> cool, so you mean I can just copy over /dev from the stage3 tarball and I should be good 
> 
> btw bruor, you pwned the forums  

 

yea, just make sure you use the command that i posted previously so that you dont untar everything else from the stage3, that would be bad.....

tar -xvjpf stage3 ./dev

this tells tar to just look for things that start with ./dev...

chris

----------

## Osnap

Hi,

I just moved my gentoo installation from a 10 gig partition to new 30 gig partition on another drive, so I know the steps i'm going to reference work.

I used what the ben_h said to do, the last post in this thread:

https://forums.gentoo.org/viewtopic.php?t=95889&highlight=rsync+oldroot

All the file permissions and simlinks were kept.  Just remeber to edit your grub and fstab configurations on the new drive.

I didn't have to worry about any of the /proc, /dev paths.  it just worked.  Understanding why will be for another day.  :-P

----------

## dan2003

when i have done this in the past the command to use was cpio but i cannot remmeber the exact syntax to make it work.

----------

## syscrash

Thanks for all the help guys, I got it working perfectly  :Very Happy: 

----------

