Found a couple of interesting links. The Win95 boot sector assembly code (reverse engineered, comments are great!):
http://www.singlix.com/trdos/win95_boot_sector.asmLinux 2.0 boot sector code:
http://www.singlix.com/trdos/Linux%202_0%20Boot%20Sector.htmlBut this one might be the mother link which tells you how to use GCC (C) to make plain binary executable code that can be booted directly from a boot sector:
http://www.nondot.org/~sabre/os/articles/TheBootProcess/In effect allowing you to boot your code without the help of any other code from any other vendor (not counting the code within your hardware). I think this is what you were asking to do in the first place.
And if you want to look at the boot sector source on your currect kernel, if you have the kernel source installed you will find it here:
/usr/src/linux*/arch/i386/boot/bootsect.S
*.S files contain assembly code that must be preprocessed. I just looked at the Makefile and here are the commands that you would use to turn that source into a binary executable boot sector that can be written to the first sector of a floppy or hard disk partition:
You should now find a file called "bootsect" which is exactly 512 bytes long and can be written to floppy with "dd if=bootsect of=/dev/fd0". Of course by itself it won't do much, probably just hang your system.
You might want to look at the comments within the other *.S files that are located in the same directory. There are only a few small files that are responsible for loading/running the kernel. You will need to know a little assembly in any case. Fortunately it doesn't take much.
[ November 16, 2002: Message edited by: void main ]