Bootable floppies
Posted: Sun Mar 18, 2007 11:41 am
So I'm writing a Makefile early to automate bootable floppy creation. I have the loader.s+kernel.c-linked "kernel" ELF binary, loader.o, and kernel.o. Plus, a FAT12 blank floppy image.
And then it's just zeroed out beyond that. Presumably, from the "non-system disk" part, around there is the boot code. But where do I inject my kernel (byte starting position) to overwrite that, but leave it a valid floppy?
Any help appreciated
Code: Select all
00000000 EB 3C 90 42 53 44 20 20 34 2E 34 00 02 01 01 00 .<.BSD 4.4.....
00000010 02 00 02 40 0B F0 09 00 20 00 10 00 00 00 00 00 ...@.... .......
00000020 00 00 00 00 00 00 29 D8 18 79 A2 4E 4F 20 4E 41 ......)..y.NO NA
00000030 4D 45 20 20 20 20 46 41 54 31 32 20 20 20 FA 31 ME FAT12 .1
00000040 C0 8E D0 BC 00 7C FB 8E D8 E8 00 00 5E 83 C6 19 .....|......^...
00000050 BB 07 00 FC AC 84 C0 74 06 B4 0E CD 10 EB F5 30 .......t.......0
00000060 E4 CD 16 CD 19 0D 0A 4E 6F 6E 2D 73 79 73 74 65 .......Non-syste
00000070 6D 20 64 69 73 6B 0D 0A 50 72 65 73 73 20 61 6E m disk..Press an
00000080 79 20 6B 65 79 20 74 6F 20 72 65 62 6F 6F 74 0D y key to reboot.
00000090 0A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000000F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
00000190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
000001E0 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 F0 FF FF 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Any help appreciated