OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Apr 19, 2024 3:54 pm

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Virtualbox not working with EFI vdi
PostPosted: Thu Jul 30, 2020 5:01 am 
Offline

Joined: Sat Jun 27, 2020 8:00 am
Posts: 13
Good day,

I am trying to start up my OS in virtualbox. In this step I just want to make sure that the EFI bootloader can start up. The code I use is from the UEFI bare bones tutorial, but is compiled under MSVC using this repo: https://github.com/pbatard/uefi-simple as a starting point. It gives me a normal boot.efi file. In order to get the vdi, I followed the instructions on the UEFI page using WSL, then converted the .img to a .vdi using VBoxManage. My .img and .vdi has one partition, the EFI System partition and then about 8.5 gb ntfs Microsoft basic data. In the EFI system partition I have the 64-bit bootloader in boot/bootx64.efi (renamed from boot.efi) and it also the same file renamed as main.efi in the root directory so that I could try starting it if the boot fails. However, whenever I start the VM, it goes to the virtualbox startup screen, then straight to the black screen and blinking cursor. I have tried going to the boot options(F12), but that still takes me to the black screen and flashing cursor. An image is attached, unfortunately the cursor has gone but it is in the top left corner.
Here is what I see:
Attachment:
File comment: The black screen
vm.png
vm.png [ 8.78 KiB | Viewed 980 times ]

This is not the first problem I have encountered, previously I would be taken to the EFI shell and none of my filesystems recognised. I fixed this problem by adding my vdi to a SATA controller, and also using the Linux-based instructions for making a bootable disk (via WSL) instead of windows diskpart(side note - it appears that diskpart creates some wack GUIDs for me. It might be worth investigating into this).

In terms of what I have done for this, I have disabled the Windows Virtual machine feature and Hyper-V and remade the VM. VT-X is enabled on my system. In all fairness, I have found near-to-nothing in terms of what to do on this issue, and when it happens with a unknown OS there is simply nothing on the matter.

Here are the logs:
https://pastebin.com/awd8TwZv

I would please like to know what the problem here is, and what I could do to solve it and get my OS printing "Hello world". Apologies for the inconvenience, but thanks in advance.

Thank you for your time,

Heemogoblin


Top
 Profile  
 
 Post subject: Re: Virtualbox not working with EFI vdi
PostPosted: Thu Jul 30, 2020 10:51 am 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5137
That sounds an awful lot like VirtualBox isn't configured for UEFI.

Does it work if you use a different VM, such as QEMU or Bochs? Setting up QEMU for UEFI is pretty easy.


Top
 Profile  
 
 Post subject: Re: Virtualbox not working with EFI vdi
PostPosted: Fri Jul 31, 2020 2:52 am 
Offline

Joined: Sat Jun 27, 2020 8:00 am
Posts: 13
Thank you so much! Turns out I forgot to enable EFI, since I had to keep making and deleting my VM.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], FrankRay78, suspectedowl and 192 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group