Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
duplicating an installation?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
thecooptoo
Veteran
Veteran


Joined: 27 Apr 2003
Posts: 1353
Location: UK

PostPosted: Tue Mar 04, 2008 4:55 pm    Post subject: duplicating an installation? Reply with quote

ive just installed onto a 80GB HD and df says 5% is used .( basic isntallation with genkernel)
I now want to do another installation for a machine with a 60 GB HD

dd wont do it. I dont think partimage will .
is there a way of copying the filesystem across that will give me a 2nd bootable machine without spending a couple of days installing kde and the apps i want ?[/gwn]
_________________
join the optout - http://nhsconfidentiality.org
Back to top
View user's profile Send private message
BradN
Advocate
Advocate


Joined: 19 Apr 2002
Posts: 2379
Location: Wisconsin (USA)

PostPosted: Tue Mar 04, 2008 5:37 pm    Post subject: Reply with quote

Boot a livecd on the target system and get networking and sshd up, fdisk, format, and mount partitions to /mnt/gentoo.

On the source system, mount your /boot partition, do "mount -o bind / /mnt/gentoo", "mount -o bind /boot /mnt/gentoo/boot", then run:

Code:
cd /mnt/gentoo; tar -cvz . | ssh target-system "cd /mnt/gentoo; tar -xzp"


The bind mounting is the important step lots of people miss, since otherwise you end up copying the contents of udev's /dev, /proc, and /sys to the target, which you won't want. Bind mounting will only pick up the filesystem at its root and not things mounted under it.

Optionally you can remove the -z's from the tar commands if you'd prefer faster copying over effecient network use. Using one command line to clone a machine over a network? Yeah, just try that in Windows...

As a cautionary note, I've had a bizarre issue with KDE when doing this - it won't want to show the desktop contents after logging in. I'm not sure if it's a permissions problem or what, but after I emerge some things (probably baselayout), the problem goes away. It's strange because permissions and everything should be preserved properly...

After things are copied, you just have to install grub, change relevant config files (/etc/fstab, /etc/conf.d/net, etc) and you should be good to go.
Back to top
View user's profile Send private message
nixnut
Administrator
Administrator


Joined: 09 Apr 2004
Posts: 10973
Location: the dutch mountains

PostPosted: Wed Mar 05, 2008 6:31 pm    Post subject: Reply with quote

Moved from Installing Gentoo to Duplicate Threads.
Moved in favour of https://forums.gentoo.org/viewtopic.php?t=122281
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads 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