
I've been reading a lot about the first steps for an OS to be designed. I've tried making my own bootloader with success, but I thought of using GRUB to take away some ASM pain (hurhur) and making the kernel dual-bootable.
So, I took GRUB...the binaries (unable to compile it in GCC on WinXP), loaded in stage1 (first 512 bytes) and stage2 (following space) to the floppy, adding some garbage of length 750, then my kernel, which would exactly be on offset 102400. I tried to run it through GRUB, but kept getting Error 13...it cannot recognize the executable format. Weird, since I do use the elf format as the tutorial(s) suggest. And I don't see why the multiboot part would not be in the binary...
So, according to many tutorials, I should "simply" copy the files to boot/grub/ and it'll be alright. Obviously, I'm missing a step. What filesystem to choose? And how to format the drive...through Windows? Then if we load the virtual floppy into Bochs...we never set the first 512 bytes, so how does it know how to boot? Are the first 512 bytes set when formatting the drive? Or should I write something that makes the drive use a certain filesystem.
Besides, there isn't any difference between a floppy and a harddrive, right? So if we want to test the kernel out at some point, I should just manage to copy it all to the HDD? So...I should make a kernel on a floppy, that copies all files of my actual kernel to the HDD, to install the OS, right?
Thanks!
Daevius