I honestly am not in the state where I can write a neat introduction for this specific action so I will just proceed to the steps I took for having this successfully done.
The step-by-step instructions are as follows:-
ovmfby following the instructions specified on the
qemu-system-x86_64 -enable-kvm -m 1024 -device intel-hda -device hda-duplex \ -drive if=pflash,format=raw,readonly,file=/usr/share/ovmf/x64/OVMF_CODE.fd \ -drive if=pflash,format=raw,file=$HOME/qemu/linux/my_uefi_vars.bin \ -drive file=$HOME/qemu/linux/linux.img,if=virtio \ -fsdev local,security_model=passthrough,id=fsdev0,path=$HOME/qemu/share -device virtio-9p-pci,id=fs0,fsdev=fsdev0,mount_tag=hostshare \ -cdrom $HOME/qemu/linux/archlinux-2017.08.01-x86_64.iso -boot d
UEFIsupport as instructed in the archwiki; &
Virtioloaded to enable
networkas well as
folder/filesharing from Host OS to Guest OS.
ESPpartition as well as a
Linux LVMpartition with
gdisk. Both were formatted as
LVMpartition on /mnt, created a mount point for a shared folder and mounted it through the '
mount_tag(I did this to copy all the base packages installed on Host OS to the Guest OS so that I no longer needed to wait for the packages to be downloaded) and continued with the general installation. Part of these steps may be seen in the images below:
lvm2' needs to be added to '
HOOKS' line in /etc/mkinitcpio.conf file before running
grub(grub2) as well as
efibootmgrand add '
lvm' to a line where it says '
/etc/default/grubfile. Next, I mounted the
/mnt/bootand run the following commands:-
grub-install --target=x86_64-efi --efi-directory=/mnt/boot --boot-directory=/mnt/boot --bootloader-id=grub grub-mkconfig -o /mnt/boot/grub/grub.cfg
grub config file(via command line 'grub-mkconfig') on the
ESPpartition because should anything bad happen to the
LVMpartition containing the Arch Linux system, I can still boot another system such as
archisosince the grub config file will not be affected by the corruption occurred to the main system.
Basically, these are all the actions done to have a bootable Arch Linux installed on QEMU/KVM with UEFI enabled. Therefore, I stop at this point and will continue with ‘resizing the partition without losing data’ in my next post.