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

Re: linux copying



On Wed, 14 May 2003 06:54:34 +0530
JK Malakar <cave_man@hotpop.com> wrote:

> i have bought a 40GB HDD. is it possible to copy the existing Debian linux
> from my old HDD to the new one as well as make it boot-able ?

Sure. I did something like this when I bought a second hard drive; I was
able to duplicate a dual-boot WinME/Debian system.

I fumbled around a little, but these are the steps as I remember them:

1. Partition the new hard drive and format the linux partition. For this
message assume you use one / partition for everything.
2. Boot with a CD/floppy Linux such as Knoppix or LNX-BBC.
3. Mount your old and new partitions.
4. Copy the files over:
     cp -a /mnt/old/* /mnt/new
5. Copy your MBR, but not the partition table:
     dd if=/dev/hda bs=448 count=1 of=/dev/hdb
   assuming /dev/hda is the old drive and /dev/hdb is the new one
6. Copy the parition boot record of the old linux / partition to the new:
     dd if=/dev/hda? bs=448 count=1 of=/dev/hdb?

Kevin



Reply to: