This is an old revision of the document!
Copy Linux to a new Harddisk
- stop any running services like apache, mysql etc. on the source system.
- partition and format the new harddisk
rsync -aHvx --numeric-ids /source /target
for each partition
- edit fstab and /boot/grub/menu.lst and update UUID according to harddisks_by_uuid_in_debian_lenny
- install grub
mount the root and boot partitions:
mount /dev/hdcX /mnt/new mount --bind /dev/ /mnt/new/dev mount /dev/hdc0 /mnt/new/boot chroot /mnt/new grub-install /dev/hdc
sudo grub find /boot/grub/menulst
(if you have an own partiton for boot, you can leave boot away in the above command)
root (hd0,0) setup (hd0)
- reboot your system