create bootable Image from Rsync System Backup

i’ve copied a Linux System Rootfolder (/) using Rsync to a local Folder. (Excluding 500GB Data)

Is it possible to create a Bootable System Image that boots in Virt-manager?

Rsync Command: Rsync -aAXv

Rsync excluding
/dev/*
/proc/*
/sys/*
/tmp/*
/usr/tmp/*
/run/*
/mnt/*
/media/*
/var/cache/*
/lost+found
/var/www/
/root/

Asked By: user2534903

||

It Works (Debian 9):

  1. first build a qcow2 Image (first attempt Img Raw)

  2. format it in ext4 (parted)

  3. mount as NetBlockDevice to /mnt/example

  4. Rsync -aAXv to /mnt/example

  5. Copy /boot/initrd and /boot/vmlinuz from Image to local File system.

  6. unmount it

  7. create new virt-manager Device (Generic OS), uefi x86_64, Image as SCSI Disk

7.1 copy /boot/initrd and /boot/vmlinuz file to local file system

7.2 Add boot-Options -> direct Kernel-> the initrd and vmlinuz file

7.3 add kernel boot parameters : root=/dev/sda1

8.0 in First booted system:

8.1 mount -o remount,rw /dev/sda1 /

8.2 cat blkid >> /etc/fstab

8.3 comment out old root Mount and build same line with new UUID

It works!

Answered By: user2534903
Categories: Answers Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.