This is an old revision of the document!
linux boot process tricks
To get the system-files transfered, it's best to get a live USB-stick or CD and boot into it
(all live-distros from ubuntu to systemrescuecd are ok).
In a livesystem, you can mount the partitions and transfer the data anyway you like:
1. rsync:
parameters: " -a -v -z -h --perms -E -o -g --times --compress --update --delete " excludes: " --exclude="/proc/*" --exclude="/sys/*" --exclude="/mnt/*" --exclude="/media/*" "
2. copy with “cp”:
$ sudo cp -afv /to/source/* /to/target/
3. dd - can only be used, if both partitions have exactly the same size!
4. gparted
etc…
Fix fstab by mounting the new disc and editing /etc/fstab in there.
The UUIDs need to be replaced by the UUIDs of the new disc's partitions.
$ ls -l /dev/disk/by-uuid/
.. shows 'em all :)
Install grub2 - make the fresh harddisc bootable
re-generate device.map
$ grub-mkdevicemap -m /icy/boot/grub/device.map
install grub to MBR of new hdd (no partitionnumber, just the device)
$ grub-install --root-directory=/to/target-mountpoint/ /dev/sdX --recheck