chronium wrote:
Hello everyone.
So, after I get myself an ATA driver or something to be able to read and and write to and from the disk, how exactly do I go about writing things like the MBR, a bootloader and my kernel to the disk?
grub-install does grub installation for you, just give it a drive specification (hd0) etc - see GRUB manual for that, it's all detailed there.
chronium wrote:
I do not exactly understand how they all fit together, what needs to get written where, things like that.
If you're using grub, you can write the kernel anywhere on a fileystem that is understood by grub.
chronium wrote:
And another question, is there a way for me to write a GRUB2 module for my own file system?
Yes, it is possible. Get grub sources
https://www.gnu.org/software/grub/grub-download.html and look for implementation of filesystem modules, it's fairly straightforward. E.g. grub-core/fs/fat.c defines a FAT filesystem driver.