JP Vossen on 19 Oct 2007 19:40:36 -0000 |
Date: Fri, 19 Oct 2007 12:36:34 -0400 From: Mike Leone <turgon@mike-leone.com> Subject: [PLUG] How best to replace old drive with new drive
+ MAKE SURE YOU USE THE RIGHT DRIVE! It you have any question, disconnect the good/old drive and install only the new one until you get this right. When I do this, and when I'm using multiple partitions, I'll do something like tis. It's a bit more work but it duplicates the final disk's structure, facilitating a later chroot for grub install. cd /mnt mkdir new mount -t ext3 /dev/sda2 /mnt/new mkdir new/boot mkdir new/home mount -t ext3 /dev/sda1 /mnt/new/boot mount -t ext3 /dev/sda5 /mnt/new/home * SAMPLE rsync command, tweak and test as needed: rsync -v -a --numeric-ids \ --exclude /mnt \ --exclude /var/cache/yum/base/headers/* \ --exclude /proc \ --exclude /dev \ --exclude /tmp \ --exclude other_stuff_as_needed \ /. /mnt/new Since you are duplicating a disk, --numeric-ids isn't really necessary since the passwd files will end up the same. I only use it out of habit. Depending on your distro, you might not want to skip /dev. Anything using udev should re-created whatever is needed in /dev at boot (someone correct me if I'm wrong). Anything older *not* using udev won't; in that case copy /dev too. More complicated, multi-machine answer: --------------------------------------- This is how I've done machine to (virtual) machine disk copies: http://communities.vmware.com/thread/22724#281540 http://communities.vmware.com/thread/22724#281765 You'll see that these instructions are about copying disks into VMware, and that I started out overly complicated (I do that a lot). The process "devzero" outlined in #281540 worked for me, with trivial additions I noted in #281765. While I have enlarged ext3 partitions in the past, that makes me nervous (yeah, I'm paranoid too). While my processes have more steps than some suggested, I consider it less risky (I'm conservative too). In your case, you obviously omit the VMware parts and just do the disk-to-disk parts. Hope this is useful, JP ----------------------------|:::======|------------------------------- JP Vossen, CISSP |:::======| jp{at}jpsdomain{dot}org My Account, My Opinions |=========| http://www.jpsdomain.org/ ----------------------------|=========|------------------------------- Microsoft has single-handedly nullified Moore's Law. Innate design flaws of Windows make a personal firewall, anti-virus and anti-malware software mandatory. The resulting software arms race has effectively flattened Moore's Law on hardware running Windows. ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|