Skip to content

Load NoirVisor on UEFI

Zero Tang edited this page Sep 23, 2023 · 3 revisions

Build

To load NoirVisor on UEFI, you should firstly build NoirVisor for UEFI. There are two files: bootx64.efi and NoirVisor.efi
The bootx64.efi is an EFI Application image that can be loaded by firmware. This image works as a loader of NoirVisor. It determines system capability and loads NoirVisor Runtime Driver.
The NoirVisor.efi is an EFI Runtime Driver image that works as hypervisor, and remains existence after OS loads.

Preparation

Get a USB flash stick and partition it using GPT to an FAT32 partition. Multiple Megabytes should be sufficient.
Copy the EFI images to the partition. Place them to \EFI\BOOT\bootx64.efi and \NoirVisor.efi respectively.
Please note that the EFI Runtime Driver, NoirVisor.efi, is in root directory.

Boot

Enter your firmware and change the boot priority so that NoirVisor is loaded prior to OS boot.
Alternatively, you may load the NoirVisor regardless of boot sequence on boot menu. After NoirVisor loaded exit to firmware, you may load OS in default priority.
For virtual machines like VMware, you might have to manually add boot options for NoirVisor to the firmware.

VMware (USB Flash Stick Method)

To load NoirVisor on VMware UEFI, you have to manually add your boot option for NoirVisor. Follow the steps to add boot option:

  1. Enter Enter Setup.
  2. Enter Configure boot options.
  3. Enter Add boot options.
  4. Locate your USB Flash Stick and enter it.
  5. Enter <EFI>
  6. Enter <BOOT>
  7. Enter bootx64.efi
  8. You should see Input the description and Input optional data. In the Input the description box, type whatever you want, but make sure you can distinguish this is the USB Flash Stick that NoirVisor image is located.
  9. Enter Commit changes and exit.
  10. Now return to the Configure boot options.
  11. Enter Change boot order.
  12. Enter Change the order. Use uparrow key to select the USB Flash Stick. Use + key and - key to change the order. Make sure NoirVisor will be loaded prior to OS boot.
  13. Enter Commit changes and exit.
  14. Enter Exit the Boot Maintenance Manager.
  15. Enter Boot normally.

Troubleshooting

The common issue is that you fail to locate your USB flash stick when adding boot options. To resolve this problem, go to your VM settings and configure your USB Controller. If your USB flash stick is based on USB3.0 and you inserted it onto USB3.x slot, while USB Controller is configured to USB2.0, VMware won't load your USB Flash Stick.

Build NoirVisor into Virtual Disk Image

This will require mtools in order to build a disk image in a batch method. Here is a pre-built version of mtools in Windows. Make sure you put the executables into directories listed PATH. mtools-4.0.43-bin.zip Note, if you use Linux (or WSL), you may instead install it directly.

sudo apt install mtools

First, create a 2.88M disk image file:

fsutil file createNew disk.img 2949120

Or if you use Linux (or WSL):

dd if=/dev/zero of=disk.img bs=1k count=2880

Next, format it and create directories:

mformat -i disk.img -f 2880 ::
mmd -i disk.img ::/EFI
mmd -i disk.img ::/EFI/BOOT

Finally, copy the NoirVisor EFI executables:

mcopy -i disk.img bootx64.efi ::/EFI/BOOT
mcopy -i disk.img NoirVisor.efi ::

The disk image for NoirVisor is now created.

Run Virtual Disk Image in VMware

You will need to add this disk image into VMware as a floppy disk. Choose EFI Floppy in order to boot NoirVisor.

Run Virtual Disk Image in QEMU+KVM

Make sure you install OVMF in Linux.

sudo apt install ovmf

Use the following base command to start QEMU:

qemu-system-x86_64 -accel kvm -cpu host,svm=on,hypervisor=off -bios OVMF.fd -drive format=raw,file=disk.img

If your CPU is Intel, replace svm=on with vmx=on.