Booting the kernel
Posted: Mon Feb 07, 2005 9:06 pm
Ive been playing around with writing an OS and started by making a very simple boot loader (enter PM, write some stuff). Now that I understand its basics I want to move on to the kernel. I wrote a simple assembly wrapper that calls an empty c function and included the multiboot stuff so that GRUB can boot it.
What im a bit confused on is how I should create disk images for testing under bochs, or even for real booting. Some sites demonstrate loading a kernel by writing a boot loader and performing raw disk i/o, other create a dos/ext floppy disk.
Grub can read dos/ext, so should I just be creating a ext/dos disk, copy my kernel.bin onto it and tell grub to load it. What about when I want to implement my own filesystem? If the system is starting off a ext/dos disk, how will I be able to create my own filesystem implementation?
If the best choice is to go with GRUB + ext/dos, how would I create an image that works under bochs? I know how to create a simple HD image and write an MBR to it, but not how to create an image, format with an FS, install GRUB + kernel.
My development environment is FreeBSD.
What im a bit confused on is how I should create disk images for testing under bochs, or even for real booting. Some sites demonstrate loading a kernel by writing a boot loader and performing raw disk i/o, other create a dos/ext floppy disk.
Grub can read dos/ext, so should I just be creating a ext/dos disk, copy my kernel.bin onto it and tell grub to load it. What about when I want to implement my own filesystem? If the system is starting off a ext/dos disk, how will I be able to create my own filesystem implementation?
If the best choice is to go with GRUB + ext/dos, how would I create an image that works under bochs? I know how to create a simple HD image and write an MBR to it, but not how to create an image, format with an FS, install GRUB + kernel.
My development environment is FreeBSD.