Bootloading: What method and Why?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

I use "bootprog" as i like to keep thinks simple.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

GRUB on x86 and x64 (with the ELF64 patch applied), YAMON on MIPS, yaboot on PPC, not sure what we're using on ARM.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: Bootloading: What method and Why?

Post by Brendan »

Hi,
jinksys wrote:Which bootloading method do you use and why?
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.

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.
User avatar
einsteinjunior
Member
Member
Posts: 90
Joined: Tue Sep 11, 2007 6:42 am

Post by einsteinjunior »

I don't use grub because its not tailored to my needs.
My kernel needs much more than just some basic info about memory on system and others.Moreover i am using PE file ,which is not supported by grub...too bad.
egos
Member
Member
Posts: 612
Joined: Fri Nov 16, 2007 1:59 pm

Post by egos »

jinksys wrote:Which bootloading method do you use and why?
Custom. I don't use strange program technologies in my OS. I have self-sufficient booting technology and I'm not going to reject it.
jnc100
Member
Member
Posts: 775
Joined: Mon Apr 09, 2007 12:10 pm
Location: London, UK
Contact:

Post by jnc100 »

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.
User avatar
suthers
Member
Member
Posts: 672
Joined: Tue Feb 20, 2007 3:00 pm
Location: London UK
Contact:

Post by suthers »

Custom, for the moment for no other reason than i don't like using other people's code
Jules
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post by Combuster »

Custom loader.

My kernel is multiboot-compliant though.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Post Reply