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 1Pjz6d-0001Ct-Q8 for garchives@archives.gentoo.org; Mon, 31 Jan 2011 19:08:07 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 67B0DE09D9 for ; Mon, 31 Jan 2011 19:08:07 +0000 (UTC) Received: from mx.virtyou.com (mx.virtyou.com [94.23.166.77]) by pigeon.gentoo.org (Postfix) with ESMTP id 81061E0654 for ; Mon, 31 Jan 2011 18:36:35 +0000 (UTC) Received: from weird.localnet (p5794E5E5.dip.t-dialin.net [87.148.229.229]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx.virtyou.com (Postfix) with ESMTPSA id DF2BB39A09D for ; Mon, 31 Jan 2011 19:36:34 +0100 (CET) From: Alex Schuster To: gentoo-user@lists.gentoo.org Subject: Re: [gentoo-user] dd'ing small drive to large one Date: Mon, 31 Jan 2011 19:36:33 +0100 User-Agent: KMail/1.13.6 (Linux/2.6.37-ck; KDE/4.5.5; x86_64; ; ) References: <201101311834.24854.wonko@wonkology.org> In-Reply-To: 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 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201101311936.33827.wonko@wonkology.org> X-Archives-Salt: X-Archives-Hash: c860d1f755c0d71c6e45e6783d35c522 Allan Gottlieb writes: > On Mon, Jan 31 2011, Alex Schuster wrote: > > There is a PC with a 160 GB SATA drive, and I want to replace it with > > one of about 1 TB in size. Would this work? > > > > - attach 2nd drive via SATA port or USB->SATA convertor > > - boot from rescue CD > > - dd if=/dev/sda of=/dev/sdb > > - remove sda, attach sdb to where sda was > > - reboot > > - add other partitions or enlarge the last one > > > > I do not expect problems, but I'm not entirely sure. Maybe the > > different drive geometry would have an effect on file system or at > > least to the Grub boot loader? > > Won't dd'ing the whole disk will make the 1TB disk a 160GB disk. Not really. Yes, the current partitioning scheme will not make more than the 160G available. But this can be changed easily later, all I need to do is call fdisk and add partitions. Or resize the last one. > I would partition the TB disk as you like and > do a tar or rsync on each partition of the original. > > Some care would be needed for /dev and I don't think things like /proc > should be copied. But that's much more complicated than just using dd or Ghost. It involves using a Linux rescue CD, mounting several file systems, using the right cp/tar/rsync syntax, and installing a new boot loader. With me telling the guy via phone what he has to type. If it's really necessary, oh well, than it has to be done. But if dd'ing the drive would work, I would vermy much prefer this. Wonko