Page 1 of 2

Help! My OS won't boot on physical hardware.

Posted: Sat Jan 21, 2017 6:17 am
by WaterOS
Hey. My OS won't boot on physical hardware (my old PC). It has got Intel so don't say it won't boot because it's not recognising instructions.

It used to work fine. I've got a bootloader and kernel. It just used to work fine.
I've tried almost everything.

It only works on VirtualBox. I need a quick response please. If you view this, please reply! It just skips and boots to the hard disk. I'm booting with F12 boot manager on Acer. I've used a bootable USB tool. I have used DD to make the floppy image.

Please help me out. I really need help.

Re: Help! My OS won't boot on physical hardware.

Posted: Sat Jan 21, 2017 6:26 am
by Octocontrabass
Explain the steps you take to go from "floppy disk image" to whatever you're doing that isn't booting.

Re: Help! My OS won't boot on physical hardware.

Posted: Sat Jan 21, 2017 6:35 am
by WaterOS
I'm using a floppy image. Then, I put it on to my USB (using a tool). It used to work before.

Re: Help! My OS won't boot on physical hardware.

Posted: Sat Jan 21, 2017 6:36 am
by Octocontrabass
WaterOS wrote:Then, I put it on to my USB (using a tool).
This is the step I need you to explain.

Re: Help! My OS won't boot on physical hardware.

Posted: Sat Jan 21, 2017 6:38 am
by WaterOS
I use Etcher... Alternative to Rufus I found. My bootloader and kernel used to work. Could there be some instructions that might interfere with the BIOS? I'm trying to boot from USB on an Acer.

Re: Help! My OS won't boot on physical hardware.

Posted: Sat Jan 21, 2017 6:59 am
by Octocontrabass
Does Etcher allow you to write the image to a partition on the disk? If so, make sure you are writing your image to the entire disk, not a partition.

Some BIOSes attempt to verify the contents of the boot sector before allowing the code to run. If the BIOS is skipping your code without trying to run it, your code probably doesn't look enough like a "real" boot sector. Make sure you have a BPB, and make sure it's correct.

Re: Help! My OS won't boot on physical hardware.

Posted: Sat Jan 21, 2017 7:03 am
by dozniak
WaterOS wrote:I use Etcher... Alternative to Rufus I found. My bootloader and kernel used to work. Could there be some instructions that might interfere with the BIOS? I'm trying to boot from USB on an Acer.
The blind shooting in the dark, interesting sport.

"Used to work" on the same Acer? go back to the version that worked and diff the changes you made, you'll find it.

Re: Help! My OS won't boot on physical hardware.

Posted: Sat Jan 21, 2017 7:08 am
by Octocontrabass
dozniak wrote:"Used to work" on the same Acer? go back to the version that worked and diff the changes you made, you'll find it.
I knew I was forgetting something. #-o

Re: Help! My OS won't boot on physical hardware.

Posted: Sat Jan 21, 2017 7:22 am
by WaterOS
I've got a FAT12 BPB and Etcher worked before! I think the problem here is my kernel. What could be in my kernel that could stop things booting?

Re: Help! My OS won't boot on physical hardware.

Posted: Sat Jan 21, 2017 7:24 am
by hannah
WaterOS wrote:I've got a FAT12 BPB and Etcher worked before! I think the problem here is my kernel. What could be in my kernel that could stop things booting?
Can your bootloader actually boot your kernel?

Re: Help! My OS won't boot on physical hardware.

Posted: Sat Jan 21, 2017 7:28 am
by WaterOS
Yes, only on VirtualBox. Not my Acer. I boot from floppy on VirtualBox and I use USB on Acer.

Re: Help! My OS won't boot on physical hardware.

Posted: Sat Jan 21, 2017 7:28 am
by hannah
WaterOS wrote:Yes, only on VirtualBox. Not my Acer. I boot from floppy on VirtualBox and I use USB on Acer.
Send us your code?

Re: Help! My OS won't boot on physical hardware.

Posted: Sat Jan 21, 2017 7:32 am
by WaterOS
The kernel is from Real mode assembly I :)
http://wiki.osdev.org/Real_mode_assembly_I

Everyone uses it as a tutorial.
By the way, do you think adding dw 0xAA55 to the kernel might work? You don't need times with kernels, only for bootloaders.

What is a good option to do?

Re: Help! My OS won't boot on physical hardware.

Posted: Sat Jan 21, 2017 7:39 am
by hannah
WaterOS wrote:The kernel is from Real mode assembly I :)
http://wiki.osdev.org/Real_mode_assembly_I

Everyone uses it as a tutorial.
By the way, do you think adding dw 0xAA55 to the kernel might work? You don't need times with kernels, only for bootloaders.

What is a good option to do?
Because it's ment to be the bootsector. My guess is you made it over 512 bytes.

Re: Help! My OS won't boot on physical hardware.

Posted: Sat Jan 21, 2017 7:43 am
by WaterOS
I removed the times instruction by the way. How would I use it as a kernel? By the way, it still doesn't work on my Acer! By the way, if I do skip over 512 bytes, should I put AL=2 in my bootloader instead of 1?