From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1PXRjT-0004bV-9Q for garchives@archives.gentoo.org; Tue, 28 Dec 2010 05:04:23 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CC882E06BA; Tue, 28 Dec 2010 05:02:56 +0000 (UTC) Received: from basement.kutulu.org (unknown [97.102.250.187]) by pigeon.gentoo.org (Postfix) with ESMTP id 87B10E06BA for ; Tue, 28 Dec 2010 05:02:56 +0000 (UTC) Received: from localhost (basement.kutulu.org [127.0.0.1]) by basement.kutulu.org (Postfix) with ESMTP id 3EE6E7D801C; Mon, 27 Dec 2010 20:01:11 -0500 (EST) X-Virus-Scanned: amavisd-new at kutulu.org Received: from basement.kutulu.org ([127.0.0.1]) by localhost (basement.kutulu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id R+J5TxTxlgpd; Mon, 27 Dec 2010 20:01:10 -0500 (EST) Received: from [192.168.69.4] (wombat.kutulu.org [192.168.69.4]) by basement.kutulu.org (Postfix) with ESMTP id DD27F7D801B; Mon, 27 Dec 2010 20:01:10 -0500 (EST) Message-ID: <4D196F67.1010400@kutulu.org> Date: Tue, 28 Dec 2010 00:02:31 -0500 From: Mike Edenfield User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 To: gentoo-user@lists.gentoo.org CC: Marc Blumentritt Subject: Re: [gentoo-user] Best way to copy /* ? References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Archives-Salt: 9203fd5b-e0a0-47cc-8b3c-e8acfc913de6 X-Archives-Hash: 2c326ba6f0b5ca38180efb60a1c63900 On 12/27/2010 10:20 AM, Marc Blumentritt wrote: > Hi, > > I have bought myself a Christmas present, a new shiny hard disk. Now I > want to copy my old Gentoo system to my new disk like this: > > 1.) boot with gentoo boot cd > 2.) mount my old system ind /old ( / in one partition, /home, /usr, > /var, /tmp and /opt in lvm2 volumes and /boot on it's own partition) > 3.) mount my new disk ind /new (just 2 partitions, 1 for / and 1 for /boot) > 4.) copy from /old to /new > 5.) modify fstab and prepare grub > 6.) reboot > > Concerning step 4: what is the best copy command? > I tried with > > cp -a /old/* /new This should have gotten the permissions right; -a implies --preserve=all. Not sure what happened there. The tar method you're looking for is: tar -C /old cpf - | tar -C /new xvpf - You'll probably not want to do the entire / in a single go, since /proc, /sys, and /dev (at least) should be skipped. Copy /old/sbin -> /new/sbin, etc. for all of the root folders that aren't their own partitions. The rest you can do the entire mount point at once, though I'm not sure you really need to copy /tmp either. You can also use rsync, dump/restore, and probably a dozen other tools to make this work. Google for "backup entire hard disk" and start reading :) --Mike