Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Copying old Gentoo install over network using livecd
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
MatchASM
n00b
n00b


Joined: 29 Jun 2004
Posts: 36

PostPosted: Wed Jul 12, 2006 3:08 pm    Post subject: Copying old Gentoo install over network using livecd Reply with quote

The following is a basic description of the situation:

An old disk drive containing my previous install is inside a spare PC, because the new PC's PSU does not have the (over-)capacity to power it. I thought I would make a network connection between the two using a crossed UTP cable and copy the entire old partition (/etc, /home, /tmp, /usr, /var) onto the new drive, so I would not have to reinstall or reconfigure everything again.

The initial plan was to use scp for the task, but it keeps getting into infinite loops due to symlinks, besides copying them as though the symlinks were real. An internet connection on either PC is currently not an option.

So, any solutions using only standard livecd tools?
Back to top
View user's profile Send private message
GoofballJM1
Guru
Guru


Joined: 22 Mar 2004
Posts: 392
Location: Denver, CO USA

PostPosted: Wed Jul 12, 2006 3:26 pm    Post subject: Reply with quote

I would hook up the old drive directly, mount it, create all the directories found in / , and copy using cp -a for each directory. Once the copy is complete, chroot into the system you just copied and reinstall grub on the MBR. It might require more steps than what you are looking for, but it has worked for me on a number of occasions. I copied my server install from a single ide drive to a RAID 1 SATA array a few months ago without any hiccups.

Copying over the network would be slower, and you would have to set up NFS in order for you to get access to the drive. Hooking the drive directly removes all of that.
_________________
"Great spirits have often encountered violent opposition from weak minds." - Albert Einstein
Back to top
View user's profile Send private message
MatchASM
n00b
n00b


Joined: 29 Jun 2004
Posts: 36

PostPosted: Sat Jul 15, 2006 6:07 pm    Post subject: Reply with quote

Hooking up the drive directly was out of the question because it would cause the PSU to stop functioning...

I ended up using scp for all the movies and music (the main space consumers), deleting them on the old disk and then use tar to copy symlink and ownership information for the remaining data.

I heard that tar over ssh is possible without using temporary disk space, but I still don't know how to do something like that.
Back to top
View user's profile Send private message
nitbix
n00b
n00b


Joined: 10 Jul 2006
Posts: 55
Location: Suffolk (UK)

PostPosted: Sat Jul 15, 2006 6:19 pm    Post subject: Reply with quote

Maybe rsync could have been a good idea.
_________________
.:nitbix:.
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Sun Jul 16, 2006 2:24 am    Post subject: Reply with quote

MatchASM wrote:
I heard that tar over ssh is possible without using temporary disk space, but I still don't know how to do something like that.

I use this method on a regular basis for cloning machines.

Start sshd on your spare machine, then mount all the partitions from your old Gentoo installation on /mnt/oldgentoo

Boot your new machine with a LiveCD (KNOPPIX is my favorite), setup the harddrive(s) the way you want, and mount the partitions on /mnt/gentoo, then do this to copy everything over.
Code:
# cd /mnt/gentoo
# ssh sparemachine "cd /mnt/oldgentoo ; tar -cp --numeric-owner *" | tar -xvp

After that, setup your bootloader, and you are ready to boot your new machine. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum