Open Nabir14 opened 3 months ago
make sure that the kernel offset is 0x1000
in bootsect.asm and that you are loading 2 into the dh
register before calling disk_load
.
also running qemu-system-x86_64 -fda os-image.bin
works pretty well for me.
The warning that you are getting that it's defaulting to 00001000 is just the kernel offset specified in bootsect.asm. Which is where the kernel will be found in memory. So this warning is nothing to worry about and will not cause any trouble when linking all your files together.
hopefully this helps
make sure that the kernel offset is
0x1000
in bootsect.asm and that you are loading 2 into thedh
register before callingdisk_load
.also running
qemu-system-x86_64 -fda os-image.bin
works pretty well for me.The warning that you are getting that it's defaulting to 00001000 is just the kernel offset specified in bootsect.asm. Which is where the kernel will be found in memory. So this warning is nothing to worry about and will not cause any trouble when linking all your files together.
hopefully this helps
It didn't work. I mean everything you said is correct and in my code they are too. The problem is it can't load the disk so if I use -fda it loads from floppy disk (since it can't load from hard disk) but I want it to load from hard disk so I use -hda and it returns error code 0x0c80. My disk.asm is alright.
Why don't you check my source code and see if I am doing anything wrong. https://github.com/Nabir14/AmpereOS
I followed everything step by step to 13 Kernel Bare Bones where I encountered a problem.
While running
os-image.bin
in Qemu it says: Booting From Hard Disk... Boot Failed: Cannot boot from hard diskRunning it with
-hda
instead of-fda
my bootloader throws the error Disk Error with Hex0x0c80
.Also it gives this warning while linking kernel.o and kernel_entrypoint.o:
Same code. How to fix?