aAPT
dDebian
fFFmpeg
jJava
mMercurial: Usage
oOCaml
pPostgreSQL

Home OS

Cloning Linux Installation

1. Mount SRC and DST drives

2. Copy files

 cp -af /MNT/SRC/. /MNT/DST

or (mind the ending slash)

rsync -axHAWXS --numeric-ids --info=progress2 /MNT/SRC/ /MNT/DST

3. Fix new /etc/fstab UUIDS (blkid)

4. Mount the virtual filesystems

mount --bind /dev /MNT/DST/dev
mount --bind /dev/pts /MNT/DST/dev/pts
mount -t proc proc /MNT/DST/proc
mount -t sysfs sys /MNT/DST/sys

For UEFI systems also (may also need to modprobe efivarfs before that)

mount --bind /sys/firmware/efi/efivars /MNT/DST/sys/firmware/efi/efivars

5. Chroot

6. Install grub

grub-install /dev/DST

7. Update grub boot menu

update-grub

8. Update the initramfs image

update-initramfs -u