I started out installing Gentoo in a VM so that I can watch a movie or something while the packages are getting compiled. But my goal is to use it as my primary distro instead of my current Arch.

The idea is to write whatever content present in the single rootfs present in the VM onto a partition in the physical disk.

My VM had a VDI disk. I had to convert that to a raw img disk.

vboxmanage clonehd --format RAW geny.vdi geny.img

But geny.img is the image of the entire disk including the UEFI boot partition, swap and not just the rootfs which we need to write to the physical disk.

sudo losetup -P /dev/loop0 ./geny.img
sudo dd if=/dev/loop0p1 of=/dev/sdb9 bs=16M status=progress
sync
sudo losetup -d /dev/loop0

This will write the contents of the VM’s VDI to a physical disk. We have to regenerate the grub config and the distro should be good to go.

sudo grub-mkconfig -o /boot/grub/grub.cfg

The interesting part is that I did not modify the /etc/fstab but, for some reason it booted up successfully.