You are not logged in.

#1 2007-04-15 19:58:18

ylikone
Member
From: Southern Ontario
Registered: 2004-12-17
Posts: 45
Website

Best method to transfer arch installation to a new hard drive?

I currently have archlinux running from an IDE drive and recently purchased a larger SATA drive.  I have partitioned the SATA drive the way I want and was wondering what the best method would be to transfer the data from IDE to SATA drive?  A simply "cp -Rp" for each partition mount point would suffice?  Then run grub to setup the boot block on SATA drive?  Will this work?  Anything I should be aware of before I proceed?

Offline

#2 2007-04-15 21:16:59

Driadan
Member
From: Madrid (Spain)
Registered: 2006-03-24
Posts: 36
Website

Re: Best method to transfer arch installation to a new hard drive?

I did a small howto some years ago, since i had the same problem. If you can read spanish you can get it from:
http://debianitas.net/doc/minicomos/Pas … o-iso.html

If not, i'll try to translate it as accurate and short as i can wink . It was thought for a change of /home mountpoint, but should work as well for any other, The target partition is sdb3 (change it to your needs).

1.-  Check filesystems:

!#fsck.ext3 -f /deb/sdb3

2.- Create dirs and mount the filesystems:

!
!#mkdir /mnt/disc
!#mnt -t ext3 /dev/sdb3 /mnt/disc

3.- Change the running mode so no other processes affect the system:

!#telinit 1

4.- Copy files:

!#cp -ax /home /mnt/disc

5.- Verify again the filesystem (just to play safe):

!#umount  /mnt/disc
!#fsck.ext3 -f /dev/hdb3

After that you have to handle the bootloader. In case you get into trouble booting the system you can use SuperGrubDisk. I haven't tried myself, but i always hear good critics about it, so you might give it a try if all goes wrong.

Another important thing: do not copy /proc, but you have to create the /proc directory if you are moving the whole system.


I see connected people - The seventh sense

Offline

#3 2007-04-15 22:32:56

insane
Member
Registered: 2006-06-04
Posts: 106

Re: Best method to transfer arch installation to a new hard drive?

I was in the same situtaion. How I did it:

1. Arranged disks the way I wanted them
2. Booted knoppix live cd and did the cp -Rpv thing. The Arch 0.7 install CD didn't do the copy (I think it is using busybox instead of the normal linux cp command). Doing it from my installation resulted in an endless loop.
3. Fixed my entries in the destination /etc/fstab
4. Fixed grub as needed
5. Rebooted
6. Enjoyed smile

Offline

#4 2007-04-16 01:02:32

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: Best method to transfer arch installation to a new hard drive?

ylikone wrote:

A simply "cp -Rp" for each partition mount point would suffice?

The man page discourages -R to -r. The best way to copy partitions is to use -a to archive the file structure. This will preserve links, copy resursively, preserve permissions, etc. Alternatively you could use rsync -a --delete which will do the same thing except delete files and directories on the target not existing on the source.

Offline

Board footer

Powered by FluxBB