harddisc clone vs fresh install

Solution 1:

IMHO, fresh install, a copy of the entire HDD (raw copy, dd style), or a copy of the whole file system (tar / rsync style) doesn't make much of a difference, neither in terms of stability nor performance.

When you talk about copies, though, you need to be careful about a few things:

  1. /boot/initrd* files. With each kernel you generally end up creating an initrd, an image containing basic drivers that the kernel itself needs before it is able to boot your system. If the hardware where you copy your system to is different, initrd is different, and may not be able to boot.

  2. xorg.conf configuration and similar. Again, if the hardware is different, it is unlikely that the old configuration will work. Much of X config, however, is automatically detected in recent days.

  3. if you copy the whole HDD raw using dd to a new machine, the new machine needs to have a disk of similar size. Unless you are the kind of person that enjoys playing with parted :) Also, make sure the disk you are copying is not mounted (or mounted read only) and sane (fsck clean) before copying it. You don't want to copy a corrupted disk or a disk in the middle of a write.

  4. if you copy the whole HDD using tar / rsync, make sure not to copy /proc and /sys, prefer using options like -a and --numeric-ids, and make sure again you don't copy files in an inconsistent state. Example: you really don't want mysql to be writing to a database file while you are copying it.

That said, I've done both fresh installs and copies.