Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Installing Gentoo
  • Search

Cloning a Gentoo system

Having problems with the Gentoo Handbook? If you're still working your way through it, or just need some info before you start your install, this is the place. All other questions go elsewhere.
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
znmeb
n00b
n00b
Posts: 25
Joined: Mon Dec 29, 2003 2:36 am
Location: Beaverton, Oregon, USA
Contact:
Contact znmeb
Website

Cloning a Gentoo system

  • Quote

Post by znmeb » Fri Feb 27, 2004 5:28 am

I have a Gentoo system that's built with all the default i686 packages. I'd like to "clone" this system to other i686 systems. What's the easiest way to do this? I don't want to recompile anything; I simply want to repartition the target disks and load compiled code. Then I'll be able to update the two systems individually.

Ed Borasky
http://algocompsynth.com
--
M. Edward (Ed) Borasky
znmeb@borasky-research.net
http://www.borasky-research.net/
Top
Catach
Apprentice
Apprentice
User avatar
Posts: 268
Joined: Thu Nov 06, 2003 1:54 pm
Location: Australia

  • Quote

Post by Catach » Fri Feb 27, 2004 6:04 am

well, you could partition your new disk and then do a straight binary copy:

Code: Select all

cp -a /usr /root /bin /sbin ... /mnt/newdisk
Or you could make binary packages of all the things you've installed on the first machine using the 'quickpkg' tool (I think it's part of the gentoolkit package), copy these packages across to the new computer and recompile everything using these packages. It's probably a good idea to copy all the source from the first computer as well just in case a package or two is corrupted or wont work.

Code: Select all

emerge -Duk <everything>
Zak: Luke's making a 3D interface for Linux"
Jon G: "Yeah, Luke's making a 3D user interface with Logowriter"
Jon H: "He's only got 99 shapes to work with"
Jon G: "And they're all turtles."
Top
swingarm
l33t
l33t
User avatar
Posts: 627
Joined: Sat Jun 08, 2002 5:53 pm
Location: Northern Colorado

  • Quote

Post by swingarm » Fri Feb 27, 2004 6:13 am

Partimage. If you want to resize the partitions I suggest a program called qtparted on the SystemrescueCD(Gentoo based).
Last edited by swingarm on Fri Feb 27, 2004 6:20 am, edited 3 times in total.
Top
ectospasm
l33t
l33t
User avatar
Posts: 711
Joined: Wed Feb 19, 2003 6:53 am
Location: Mobile, AL, USA
Contact:
Contact ectospasm
Website

  • Quote

Post by ectospasm » Fri Feb 27, 2004 6:15 am

This is how I would do it, but unfortunately I don't have a second disk to test this out on:
  1. Install the (preferrably identical) harddrive for the clone in the machine that already has Linux installed and configured how you want it.
  2. Partition this drive using fdisk or cfdisk, the same way that the HD you want to clone is partitioned.
  3. Mount /boot if it is not already mounted.
  4. Mount / and /boot partitions of the clone drive (on say, /mnt/clone/ and /mnt/clone/boot
  5. Copy everything from / to /mnt/clone/ using the following commands:

    Code: Select all

    # cd / 
    # cp -avx /  /mnt/clone
    
  6. Copy eveything from /boot to /mnt/clone/boot using the following commands:

    Code: Select all

    # cd /boot
    # cp -avx /boot /mnt/clone/boot/
    
  7. You should chroot into this new drive, so we can make sure that your bootloader is installed. Do it just like in the Install Docs:

    Code: Select all

    # chroot /bin/bash /mnt/clone/
    # env-update
    # . /etc/profile
    
  8. Install your bootloader of choice, making sure that it installs itself on /dev/hdx (whatever the clone drive happens to be). Look in the install docs for this.
  9. Exit the chroot, and shutdown your machine to disconnect the clone HD.
  10. Install the clone HD into the clone machine, and boot and see if it works!
The cp options above tell cp to archive (-a), to be verbose (-v), and to only recurse in the current filesystem (-x). The archive command preserves symbolic links (so they refer to files in the clone filesystem, not the original filesystem), copies the source directory recursively, and preserves file permissions, owner, groups, setuid, setgid, and timestamps

Again, I want to stress that this is completely off the top of my head, and is something you only want to do once, or at most infrequently. You could probably use the dump command, but I'm not really familiar with it.
Join the adopt an unanswered post initiative today
Join the EFF!
Join the Drug Policy Alliance!
Top
Post Reply

4 posts • Page 1 of 1

Return to “Installing Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic