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

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
WaterOS
Member
Member
Posts: 25
Joined: Mon Jan 16, 2017 3:39 pm

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

Post 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.
Octocontrabass
Member
Member
Posts: 5587
Joined: Mon Mar 25, 2013 7:01 pm

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

Post by Octocontrabass »

Explain the steps you take to go from "floppy disk image" to whatever you're doing that isn't booting.
WaterOS
Member
Member
Posts: 25
Joined: Mon Jan 16, 2017 3:39 pm

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

Post by WaterOS »

I'm using a floppy image. Then, I put it on to my USB (using a tool). It used to work before.
Octocontrabass
Member
Member
Posts: 5587
Joined: Mon Mar 25, 2013 7:01 pm

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

Post by Octocontrabass »

WaterOS wrote:Then, I put it on to my USB (using a tool).
This is the step I need you to explain.
WaterOS
Member
Member
Posts: 25
Joined: Mon Jan 16, 2017 3:39 pm

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

Post 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.
Octocontrabass
Member
Member
Posts: 5587
Joined: Mon Mar 25, 2013 7:01 pm

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

Post 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.
User avatar
dozniak
Member
Member
Posts: 723
Joined: Thu Jul 12, 2012 7:29 am
Location: Tallinn, Estonia

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

Post 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.
Learn to read.
Octocontrabass
Member
Member
Posts: 5587
Joined: Mon Mar 25, 2013 7:01 pm

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

Post 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
WaterOS
Member
Member
Posts: 25
Joined: Mon Jan 16, 2017 3:39 pm

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

Post 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?
hannah
Member
Member
Posts: 34
Joined: Wed Oct 12, 2016 11:32 am
Location: At my PC

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

Post 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?
WaterOS
Member
Member
Posts: 25
Joined: Mon Jan 16, 2017 3:39 pm

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

Post by WaterOS »

Yes, only on VirtualBox. Not my Acer. I boot from floppy on VirtualBox and I use USB on Acer.
hannah
Member
Member
Posts: 34
Joined: Wed Oct 12, 2016 11:32 am
Location: At my PC

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

Post 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?
WaterOS
Member
Member
Posts: 25
Joined: Mon Jan 16, 2017 3:39 pm

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

Post 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?
hannah
Member
Member
Posts: 34
Joined: Wed Oct 12, 2016 11:32 am
Location: At my PC

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

Post 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.
WaterOS
Member
Member
Posts: 25
Joined: Mon Jan 16, 2017 3:39 pm

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

Post 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?
Last edited by WaterOS on Sat Jan 21, 2017 7:47 am, edited 2 times in total.
Locked