Use QEMU to create a hardware dual-boot without rebooting
sudo qemu-system-x86_64 -bios /usr/share/ovmf/x64/OVMF.fd -accel kvm -boot d -cdrom ubuntu-21.10-desktop-amd64.iso -drive format=raw,file=/dev/sdb -m 4096
After downloading an ISO image, assuming you have QEMU installed, it’s possible to boot an ISO image in a virtual machine and then install that ISO from within the virtual machine directly to a physical drive, bypassing the need to reboot. Simply pass the ISO image as the -cdrom parameter, followed by “format=raw,file=/dev/sdb” (replace /dev/sdb with the drive you want to install to) as the hard drive parameter (making absolutely certain to specify the raw format, of course).
Once you boot into the ISO image with QEMU, just run the installer as if it were a virtual machine — it’ll just use the physical device as an install target. After that, you’ll be able to seamlessly boot multiple distros (or even other operating systems) at once.
http://jamsimkart.com
http://jamsimkart.com