If you have an identical disk, with the same size, geometry information and partition table, then you can do this to take an image of the physical hda disk:
Code:
bzip2 < /dev/hda > hda.img.bz2
You will need to have all hda partitions unmounted (or mounted readonly) for this to give you a usable image.
You can then copy this onto another (unmounted and
identical) disk, say hdc, using the command
Code:
bunzip2 < hda.img.bz2 > /dev/hdc
Provided that the new disk is inserted while configured as a master device, and your bootloader is actually on the disk (or at least unchanged), you can then boot off the new disk as if it were the old one.
With only Linux partitions, you can also do the same by copying the files (using cp -rp) and then installing the bootloader onto the new disk. This has the advantage that hda* can be mounted read/write during the process. However, this is more fiddly because you have to make sure that the boot-loader is installed to hdc but will try to boot from hda (because it will be hda when run).
A third option is to copy the files recursivly, and boot off a system rescue disk. Then just install the bootloader onto the new disk (see the grub or lilo documentation) and reboot.
Hope that helps,
—Robert J. Lee