Re: Transplanting old System to New Drive
On Sun, Aug 14, 2011 at 09:32:12PM -0500, Martin McCormick wrote:
> I have a 10-gigabyte hard drive that sounds like a 747
> just before takeoff so the time has come to replace it. I
> replaced it with a 16-gigabyte SATA flash drive and IDE adaptor
> as the system it runs on is a little too old to handle a large
> If I use dd to copy the 10-gig drive over to the new
> drive as in:
> dd if=/dev/hda of=/dev/hdb bs=20M
> it works when I remove the old screamer drive, change the jumper
> on the new drive to Master and boot but this is not very
> efficient as it wastes almost 6 gigs of drive.
> What I tried to do was to format /dev/hdb with hdb1
> being around 15GB and then /dev/hdb2 being extended and holding
> hdb5 marked as swap just like /dev/hda. /dev/hdb1 is also set to
> bootable and shows up as such when using fdisk /dev/hdb and
> then the p command.
> The rsync command tries to copy everything on the old
> disk except /proc and it also fails to copy those files which
> probably never stay around such as timer values and other
> volital information so /dev and everything else get copied.
Boot from a live CD, mount your new and old drive, and then rsync them.
This will avoid all the files that a running Linux system creates when
it boots, and it will simplify (or eliminate) your rsync --exclude list.