Hello. I'm fairly new to OS development, but I managed to create a bootloader and a simple kernel in C (in protected mode). I was originally in real mode, messing around with BIOS interrupts, and then I'd use NASM to compile that script to a .bin file and run it in Qemu. After that, I'd use dd to write those same bytes to a .vfd file so it would run in Virtualbox.
This worked great, until I switched to protected mode. My kernel runs fine in Qemu, but I'd like to be able to run it in Virtualbox as well. The above didn't work, it just tells me that the .vfd file is inaccessable or unreadable. My code contains a simple assembly script that switches over to protected mode using GDT, and then a file that enters the main function in the C kernel, which prints "Hello, world!" on the screen. It's all compiled into a few .bin files and written to one big OS.bin file, that I then run in Qemu using this command: `qemu-system-x86_64 -drive format=raw,file="Binaries/OS.bin",index=0,if=floppy, -m 128M`. Does anybody know how I could possibly run this in a Virtualbox environment? Thanks in advance!
Kernel won't run in Virtualbox after using protected mode?
-
- Member
- Posts: 5562
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Kernel won't run in Virtualbox after using protected mod
How big is the .vfd file?Kaius wrote:The above didn't work, it just tells me that the .vfd file is inaccessable or unreadable.