[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Creating a copy of debian set-up



On Mon, Feb 28, 2005 at 10:35:13PM +0000, jb701@uku.co.uk wrote:
> I have Debian sarge loaded and running fine on a Thinkpad (laptop).  I now 
> want to copy my setup onto another hard drive, so I can try some things out 
> without ruining this setup (which took a lot of effort to get running).  
> How do I go about doing that?  The laptop can only run one hard drive at a 
> time. I can connect to another Debian machine (running woody).  The laptop 
> started with woody (same CDs used as the other machine) and I think I kept 
> all the downloaded deb files used to upgrade.  Is there any way to copy the 
> setup rather than setting up a new hard drive from scratch? 

I think the most comfortable way would be to create an image of the harddisk,
either using dd or some higher-level software of your choice (if you're
using dd, be careful to get the parameters right - you can shoot yourself
into the foot with it in no time, and there are no "are you sure?"-questions...).
However, this requires that the source and destination partitions are of the
same size.

My second suggestion, if you don't want to create an image, would be to boot
the laptop with a live CD (so your harddisk filesystems are all mounted
readonly) and create a tarball of your entire directory tree... this removes
the partitions-have-equal-size-limitation, but you have to manually create&format
the partition(s) on the new disk, and after unpacking the filesystem's contents,
you'll have to write the boot sector of the new disk by manually invoking
LILO/GRUB to make the disk actually bootable. Besides that, this would also
give you an exact copy of your present installation.

If all this is infeasible, you can only try to copy your /etc tree and the
current status of installed packages, /var/lib/dpkg/status, and reconstruct
your debian system with those files.


Regards,

Jan
-- 
Jan C. Nordholz
<jckn At gmx net>

Attachment: signature.asc
Description: Digital signature


Reply to: