This is an old revision of the document!
linux boot process tricks
To transfer all system files, 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 (as root user):
1. rsync needs params and data must be excluded, (but works f&f in a running system), eg., :
rsync -a -v -z -h --perms -E -o -g --times --compress --update --delete \ --exclude="/proc/*" --exclude="/sys/*" --exclude="/mnt/*" --exclude="/media/*"
2. simple copy with “cp” (untested):
cp -afv /from/sourcesystem/* /mnt/newsys/ [ or ] cp -ax /from/sourcesystem/* /mnt/newsys/
3. dd - clones each sector - can only be used, if both partitions have exactly the same size!
4. gparted - no ext4, only from livesystems
etc…
Fix partition-identifier UUIDs in fstab of the new system.
The UUIDs need to be replaced by the new UUIDs in /mnt/newsys/etc/fstab
This shows 'em all: :)
ls -l /dev/disk/by-uuid/
Install grub2 bootloader to the new disc -
unfortunately a complete change-root environment is required to fool grub-install:
mount dev, proc, sys via “bind”-option into the new root / chroot:
mount -o bind /dev /mnt/newsys/dev mount -t proc none /mnt/newsys/proc mount -t sysfs none /mnt/newsys/sys
enter the new (virtual) root system:
chroot /mnt/newsys/
now inside this future system, grub2 installer scripts will work. generate a new (/mnt/newsys) /boot/grub/grub.cfg
update-grub
install to the MBR (no partition number) of the new disc, finally:
grub-install /dev/sdX
reboot & good luck!