Page 1 of 1

Boot disc isn't recognized as bootable

Posted: Sun Apr 20, 2003 11:00 pm
by VE3MTM
I've started working on a small OS, and I'm just getting the groundwork laid. However, the boot image won't boot. I'm using VMWare to test the kernel, and it says "Operating System not found" when it tries to boot. The image is blessed with 0x55aa at the end of the first sector, so it should at least get to the bootstrap. I have included the hexdump of the image. It worked a few days ago. I've changed quite a bit since then, but not the bootstrap.
Thanks for any help,
Michael VE3MTM

-- Hexdump follows --
00000000  00 05 b2 00 b6 00 b5 00  b1 02 b8 00 00 8e c0 bb  |................|
00000010  00 00 b0 02 b4 02 cd 13  eb e6 fa f4 eb fd 00 00  |................|
00000020  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|
00000200  55 89 e5 83 ec 28 8d 45  e8 89 04 24 e8 29 00 00  |U....(.E...$.)..|
00000210  00 c7 44 24 04 78 01 10  00 8d 45 e8 89 04 24 e8  |..D$.x....E...$.|
00000220  28 00 00 00 8d 45 e8 89  04 24 e8 17 00 00 00 c9  |(....E...$......|
00000230  c3 90 90 90 55 89 e5 5d  c3 90 55 89 e5 5d c3 90  |....U..]..U..]..|
00000240  55 89 e5 5d c3 90 55 89  e5 5d c3 90 55 89 e5 83  |U..]..U..]..U...|
00000250  ec 18 8b 45 0c 89 45 fc  8b 45 fc 80 38 00 75 02  |...E..E..E..8.u.|
00000260  eb 19 8b 45 fc 89 44 24  04 8b 45 08 89 04 24 e8  |...E..D$..E...$.|
00000270  12 00 00 00 8d 45 fc ff  00 eb dd 8b 55 0c 8b 45  |.....E......U..E|
00000280  fc 29 d0 c9 c3 90 55 89  e5 53 83 ec 04 8b 45 08  |.)....U..S....E.|
00000290  83 78 08 4f 76 19 8b 45  08 c7 40 08 00 00 00 00  |.x.Ov..E..@.....|
000002a0  8b 55 08 8b 45 08 8b 40  04 83 c0 50 89 42 04 8b  |[email protected]..|
000002b0  45 08 81 78 04 cf 07 00  00 76 0b 8b 45 08 89 04  |E..x.....v..E...|
000002c0  24 e8 6c 00 00 00 8b 5d  08 8b 55 08 8b 45 08 8b  |$.l....]..U..E..|
000002d0  40 08 03 42 04 8d 0c 00  8b 13 8b 45 0c 66 0f b6  |@..B.......E.f..|
000002e0  00 0d 00 07 00 00 66 89  04 0a 8b 45 08 ff 40 08  |......f....E..@.|
000002f0  83 c4 04 5b 5d c3 55 89  e5 83 ec 08 8b 45 08 83  |...[].U......E..|
00000300  78 08 00 74 19 8b 55 08  8b 45 08 8b 40 04 83 c0  |x..t..U..E..@...|
00000310  50 89 42 04 8b 45 08 c7  40 08 00 00 00 00 8b 45  |[email protected]|
00000320  0c 89 44 24 04 8b 45 08  89 04 24 e8 1c ff ff ff  |..D$..E...$.....|
00000330  c9 c3 55 89 e5 83 ec 04  c7 45 fc 00 00 00 00 81  |..U......E......|
00000340  7d fc cf 07 00 00 76 02  eb 18 8b 4d 08 8b 45 fc  |}.....v....M..E.|
00000350  8d 14 00 8b 01 66 c7 04  10 20 07 8d 45 fc ff 00  |.....f... ..E...|
00000360  eb dd 8b 55 08 8b 45 08  c7 40 04 00 00 00 00 c7  |...U..E..@......|
00000370  42 08 00 00 00 00 c9 c3  54 68 69 73 20 69 73 20  |B.......This is |
00000380  61 20 74 65 73 74 00                              |a test.|
00000387

RE:Boot disc isn't recognized as bootable

Posted: Thu May 01, 2003 11:00 pm
by gal
Hrm.. strange.. shouldnt the bootloader reside at the first sector? ;)) isnt it too big?
http://www.nondot.org/sabre/os/articles/TheBootProcess/

RE:Boot disc isn't recognized as bootable

Posted: Sun May 04, 2003 11:00 pm
by Adek336
i think BIOS tests if first byte is greater than something; try putting NOP as the first operation.

Adrian.

RE:Boot disc isn't recognized as bootable

Posted: Sun May 04, 2003 11:00 pm
by jamethiel
I concur here, some BIOSes test the first byte to see if it's on a short list of valid instructions. I'd recommend a near JMP over a NOP, however, since it's likely to work on more systems (since it's the first instruction in the DOS bootloader).

--Jamethiel