Sonntag, 24. Mai 2015

moving the whole linux-system from one disk to another

There are a lot of way's doing this, I prefer this one:

1. creating the partitions needed on the destination disk
2. mounting the partitions, I prefer to mount the partitions pairwise (src + dest) under /mnt (/mnt/src + /mnt/dest)
3. syncing the filesystems with:

  • sudo rsync --stats --progress --numeric-ids -aAhHSP  /mnt/src /mnt/dest/

4. installing the new disc, booting with rescue-media and chrooting into the 'new' system:

  • sudo mount -o bind /dev /mnt/dev
  • sudo mount -o bind /sys /mnt/sys
  • sudo mount -t proc /proc /mnt/proc
  • sudo cp /proc/mounts /mnt/etc/mtab
  • sudo chroot /mnt /bin/bash

5. if needed, edit /etc/fstab and fill in correct uuid's or device-names
6. repairing grub-installation:

  • grub-install /dev/sdx
  • update-grub 

7. finally, leaving the chroot-env, unmounting all and booting into the new system

Freitag, 1. Mai 2015

…trying a blog again

after closing my old page, I’m now trying a blog again.

it will be more something like a diary or notebook to write down thoughts, code-snippets or some other stuff I won’t forget