Bootloading: What method and Why?
Re: Bootloading: What method and Why?
Hi,
This impies that the OS can be booted from anything, as long as there's code to setup the "pre-boot" state (and as long as this code can gather enough information from the environment it starts running in). In theory this includes booting from disk with PC BIOS, or with PXE/netboot with PC BIOS, or from a custom ROM/flash, or from coreboot/LinuxBIOS, or from EFI, or from OpenFirwmare, or from GRUB, or from raw DOS/FreeDOS, etc. It also means that during shutdown my OS could put the computer into the "pre-boot" state and boot another instance of itself (ie. it could be used as a "fast reboot" option, which would be ideal for testing/debugging experimental kernels, kernel panic recovery, etc).
Cheers,
Brendan
For me, the idea is to create a formal specification that defines what state the computer should be in before control is passed to the OS itself (which includes gathered information, like MPS/ACPI tables, motherboard vendor, physical address space usage, boot device information, video information, etc), and then implement boot code that puts the computer into this "pre-boot" state.jinksys wrote:Which bootloading method do you use and why?
This impies that the OS can be booted from anything, as long as there's code to setup the "pre-boot" state (and as long as this code can gather enough information from the environment it starts running in). In theory this includes booting from disk with PC BIOS, or with PXE/netboot with PC BIOS, or from a custom ROM/flash, or from coreboot/LinuxBIOS, or from EFI, or from OpenFirwmare, or from GRUB, or from raw DOS/FreeDOS, etc. It also means that during shutdown my OS could put the computer into the "pre-boot" state and boot another instance of itself (ie. it could be used as a "fast reboot" option, which would be ideal for testing/debugging experimental kernels, kernel panic recovery, etc).
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
- einsteinjunior
- Member
- Posts: 90
- Joined: Tue Sep 11, 2007 6:42 am
I am currently using a standard grub to load up my own second bootloader (an ELF-32 program) which in turn uses a module provided by grub as the kernel to use. This lets my kernel be a pure 64-bit file, and I have the choice of where to load it, how to set up the page tables, which sections to load etc. At present it can load a bzip2 compressed position-independent kernel, set up paging and allocate enough space for a small heap and stack for the kernel until it gets its own memory management functions online. I would prefer to use a stock bootloader but doubt even GRUB2 will have all the functions I require. I still use it as the actual storage volume accessing part though as I don't want to have to code bootloaders for floppy, hard disk, cd, flash, network etc separately.
Regards,
John.
Regards,
John.