We're writing a toy educational kernel with a friend of mine, and currently we're creating a diskette.img file doing something like:
Code: Select all
cat stage1 stage2 padding kernel.bin > diskette.img
So far, everything works OK. We're using bochs, booting from the "1.44M floppy" that diskette.img represents. However, we have to type:
Code: Select all
kernel <sector where kernel.bin starts>,<kernel.bin's length in sectors>
boot
So, I have some questions:
1. If we want our kernel to start automatically, is there some way to do it without creating a filesystem in the disk?
2. If the answer to that question is "no", then, do you recommend switching to grub2 instead of grub legacy for some reason? I'm asking this because I've been told grub2 needs a filesystem in order to work.
3. If we switch to grub2, do we need to change our kernel in some way? I've been told grub2 doesn't respect grub legacy's multiboot specification.
4. In case we add a filesystem, which one do you recommend, considering we might want to read files from it, for example for executing user's process, and we'd like not to spend our whole life writing a handler for it?
Thanks,