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

Re: Coping/Moving a Debian Instalation to Another Drive



On Thu, 9 Sep 1999, Tiago A Macambira wrote:

> 	The problem is that I have to give him an answer AND the 2G
> disk today, with no further delays. Since I don't want to re-start
> downloading - yes, downloaded the whole thing with a 52k modem - and
> setting a Debian system up again, I was wondering if would be possible
> to copy/move this debian installation to the new drive and how would
> that be done.

 Short answer, yes. I assume this is IDE. If it's SCSI, hopefully you can
fill in the necessary changes.

 Make a boot floppy. (If you can't recompile a kernel with "make zdisk",
just execute the command "dd if=/vmlinuz of=/dev/fd0", this will probably
work.) Do *NOT* proceed until you have a floppy that will boot into your
Debian system.

 Set the new drive to be a slave to the old drive. (You'll probably need
to set jumpers.) Install it. Boot.

 At this point the old drive will be /dev/hda and the new one will be
/dev/hdb. Partition the new drive to taste. If your Debian partition is
/dev/hda1, make sure there's a /dev/hdb1. Then, make a filesystem on the
new partition (Assuming it's hdb1, execute the command "mke2fs
/dev/hdb1".)

 Use the Debian rescue floppy (the one that you used to install the
system, not the "boot floppy" you just made), and boot the system. Spawn
out to a shell. Go to the /mnt directory, and create two directories,
"old" and "new".

 Mount the old partition to /mnt/old (mount /dev/hda1 /mnt/old"). Mount
the new partition to /mnt/new ("mount /dev/hdb1 /mnt/new"). Use the
command "cp -a" to copy everything from the old partition to the new one.
For example, "cd /mnt/old;cp -a . /mnt/new"). Unmount the partitions
("umount /mnt/old;umount /mnt/new"), shut down the system.

 Remove the old drive, and jumper the new one to be master. Boot with the
boot floppy. Hopefully, the system will actually boot. At this point, run
"lilo" to reinstall the Master Boot Record and you'll be happy. If it
doesn't work, give Dad back his drive and put the old one back in.

 This is quick, dirty, and off the top of my head. No warranty express or
implied. If you destroy your system, you have my sympathies but it's *not
my fault*. :->

 Sincerely,

 Ray Ingles         (248) 377-7735           ray.ingles@fanucrobotics.com

          Microsoft Windows - Don't get frustrated without it.


Reply to: