Re: Clone HDD
From: Yvan (nevazeca-invalid_at_address-a.com)
Date: 02/02/04
- Next message: John Thompson: "Re: Holy, snapping duck ***!"
- Previous message: xEM: "mc - colors"
- In reply to: Andreas Janssen: "Re: Clone HDD"
- Next in thread: Dances With Crows: "Re: Clone HDD"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 2 Feb 2004 20:01:37 +0100
Nedavno Andreas Janssen pise:
| > I've finally got my RH9 system to where I want it, now I'd like to
| > move it to another HDD. Is there a clone tool?
| > On my Win-computers I use Norton Ghost, I've tried to use it but I
| > do't get to GRUB Stage 2 with the cloned disc.
I do not see OP post (some problems with my ISP news server), so I am
replying here.
If you are using ext3, after Norton Ghost clones hdd partitions go back
to ext2, so you need to convert them to ext3 with
# tune2fs -j /dev/hdax
(at least that helped me once).
Better way IMHO is:
1. Partition the new hard disk in the SAME ORDER, such that, the device
names were the same. This way you do not have to edit or modify any
configuration files.
While running from the old hard disk, most of the setup and copying can
be performed. Only the last step, rewriting of the boot sector on the
new hard disk, needs to be done from the Linux Rescue mode.
2. Once partitioned, each partition must be "formatted" before mounting.
Don't forget disk label !!!
# mke2fs -c -j -L /boot /dev/hdc1
BE CAREFUL not to screw with any device from hdaX, since that's the old
hard disk we are copying from.
3. Now that each partition is formatted, each of these "file systems"
may be mounted under a mount point, and the content copied on to them.
Down server during this process, to minimize various daemons changing
the content of the old disk, during the copy.
$ shutdown now
$ mkdir /mnt/new
$ mount /dev/hdc2 /mnt/new
(if /dev/hda2 is mounted as / and new hard disk is partitioned in the
SAME ORDER)
Copying the old root from hda2 to hdc2 creates the other mount points
for: boot, usr, home and var.
$ cd /
$ find . -xdev | cpio -admpv /mnt/new
4. Repeat the process for the remaining file systems
$ mount /dev/hdc1 /mnt/new/boot
$ cd /boot
$ find . -xdev | cpio -admpv /mnt/new/boot
...
5. Shut down. Disconnect old hdd. Move new hdd from the secondary master
to the primary master (or whatever your case may be). Stuck in Red Hat
Linux Boot CD, and boot into "Linux rescue" mode.
$ mkdir /mnt/new
$ mount /dev/hda2 /mnt/new
$ mount /dev/hda1 /mnt/new/boot
$ cd /mnt/new
$ sbin/lilo -v -v -r /mnt/new
$ exit
Entering exit causes a reboot. Remove the Red Hat Linux Boot CD, and
allow it to boot from the new hdd.
--
___ ____
/__/ / \ ** Registrovani korisnik Linuksa #291606 **
/ / \/ /\ \ ** http://counter.li.org/ **
/__/\____/--\__\ ** Reply at: ivica - at - ptt - dot - yu **
- Next message: John Thompson: "Re: Holy, snapping duck ***!"
- Previous message: xEM: "mc - colors"
- In reply to: Andreas Janssen: "Re: Clone HDD"
- Next in thread: Dances With Crows: "Re: Clone HDD"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]