1. Write down the partitioning info (which directories are mounted under which partition)

2. mount each partition that holds data (i.e. - not sysfs and proc) separately, and tar it. Make sure to grab partitions that have other partitions cover them (/dev)

3. Partition new drive in similar separation (not necessary)

4. Extract your tars there.

5. Adjust /etc/fstab as necessary (it may contain UUIDs, that have now changed)

6. Use bootable media to boot, mount this somewhere, chroot in, make sure you have sys, proc and sufficient of /dev (you can bind mount the host's dev)

7. Reinstall GRUB

8. Regenerate the initramfs (should be a script to do that)


That's it. It should boot just fine.


Shachar


On 04/11/2023 9:34, Michael Shiloh wrote:
Hello all,

Situation: We have a linux computer with various software installed on old hardware that may malfunction and be unsupported. To mitigate this risk, we would like to make an image of this machine so that we can run it in a virtual machine.

How do we do this?

Thanks,
Michael

_______________________________________________
Linux-il mailing list -- linux-il@cs.huji.ac.il
To unsubscribe send an email to linux-il-le...@cs.huji.ac.il

_______________________________________________
Linux-il mailing list -- linux-il@cs.huji.ac.il
To unsubscribe send an email to linux-il-le...@cs.huji.ac.il

Reply via email to