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.
If you are booting using USB on real hardware you may be seeing this if your BIOS is booting using floppy disk emulation (FDD) and because you don't have a BIOS Parameter Block (BPB) in your bootloader. Likely your BIOS has blindly overwritten some of your bootloader with drive geometry info which has altered it so it doesn't work correctly. If this is a USB booting issue you may wish to read my Stackoverflow answer on the subject: https://stackoverflow.com/a/47320115/3857942