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.
I have been considering writing a bootloader vs. using GRUB (2). I was reading through the GRUB Wiki, and was shocked when i started on their... ambitious, TODO list. It looks more like they're developing a full operating system or something, because GRUB is starting to take on the appearance of "bloat-ware".
For example:
Add a fancy menu interface which utilizes the GraphicsMode extensively with many eye-candies. This is important to beat GRUB legacy
Use GRUB memory management in grub-emu (yes, it has MM)
Scripting (it's already there, but they want to expand it to the config file and menu)
Now for the disscussion: has GRUB become overly feature-rich or am I being to Minimalistic (excuse my spelling )? Also, what do you think GRUB needs/can get rid of?
I agree much with that. My bootloader's design follows the "simple is sweet" ideaolgy. You got a list, you enter a number. If something fails, enter "manual" or something to get a commandline that allows you to enter the boot parameters. Simple.
What you're talking about is GRUB 2, which is a completely new beast compared to what they call "GRUB legacy" (and which the rest of the world simply refers to as "GRUB").
I agree that GRUB 2 seems a bit overly ambitious, and loaded with lots of not-really-essential features. But nothing beats GRUB (legacy) to get you started into kernel space (IMHO).
Then again... in the end you'll have to cope with whatever your users decide to set up, which might not always be what you imagined.
Every good solution is obvious once you've found it.
I'd just vouch for a home brewed boot loader, who wants a MB compliant boot loader if for example they only run your OS? Sure YOU get the advantages of GRUB but they just see a menu instead of just booting the OS.
I'd use a homebrew and if they want to dual boot they can install GRUB themselves then chainload
i've been running my own bootloader, made of bits gathered here and there and glued together for about 5 years now. I recently switched to multiboot-compliant kernel (e.g. using "grub legacy") and i should say it's a breath of fresh air ...
I don't mind too much about what they feel interresting to put in GRUB 2 as long as they keep the binary compatibility with "multiboot" ...
Nelson wrote:
...who wants a MB compliant boot loader if for example they only run your OS?
It will be a far cry before any of our operating systems will be installed as the only one on any machine. The idea is more like, virtually everyone tinkering with multiboot systems already has GRUB installed.
Sure YOU get the advantages of GRUB but they just see a menu instead of just booting the OS.
Set timeout to 0 and you don't see a menu at all. (I'm doing that on my laptop, which has nothing but Gentoo Linux installed.)
Every good solution is obvious once you've found it.
Nelson wrote:
...who wants a MB compliant boot loader if for example they only run your OS?
It will be a far cry before any of our operating systems will be installed as the only one on any machine. The idea is more like, virtually everyone tinkering with multiboot systems already has GRUB installed.
Sure YOU get the advantages of GRUB but they just see a menu instead of just booting the OS.
Set timeout to 0 and you don't see a menu at all. (I'm doing that on my laptop, which has nothing but Gentoo Linux installed.)
Well yea I was just finding things to complain about.
You know..if things went my way. :/
Scripting (it's already there, but they want to expand it to the config file and menu)
...
The scripting thing reminds me of the native FreeBSD bootloader, IIRC they used Forth or something there to make the loader fully programmable. But IMO this doesn't belong to a 'grand unified bootloader' which should be able to boot virtually any type of OS out there...
I like using GRUB (legacy, of course) though, just for fetching the files needed for booting and then switching to protected mode - things like relocation or dynamic linking (like the freebsd loader does) will be done in a seperate, 'intermediate loader' file though, as well as switching to long mode (which is what I'm currently working at).
So, for me, GRUB legacy does about everything I'll need...
Dragon_Hilord wrote:Now for the disscussion: has GRUB become overly feature-rich or am I being to Minimalistic (excuse my spelling )? Also, what do you think GRUB needs/can get rid of?
I don't like GRUB much, but I've seen the specs for EFI. Trust me when I say GRUB isn't bloated....
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.
Have none of you heard of "KISS" , why make things difficult, all you need is something like "bootprog" available here: http://alexfru.chat.ru/epm.html#bootprog
Not one of you has a OS, thats anywhere near needing some thing like GRUB.
I could make a small and simple bootloader, full of great looking i-candy, but still none of you would use it.
PS: I-candy does not mean blotware, if care is taken. this is coded in ASM in less than 200bytes including the vesa code. it could be a boot menu as well.
Not one of you has a OS, thats anywhere near needing some thing like GRUB.
That's a pretty bold statement, considering that you don't know the full scope of everyone's OS projects.
I for one have looked at "bootprog", but opted not to use it. This is primarily due to its requirement that the OS kernel be a DOS-style .COM or .EXE on a FAT12/16 formatted disk.
For me, I'd much rather use GRUB which supports a wider variety of OSes and filesystems. I've also explored the use of the L4 microkernel as a possible base for a more powerful version of my OS. With GRUB, loading modules at boot is trivial. Nothing I've seen of "bootprog" gives me any reason to assume that it supports loading modules at boot.
Yes we have, and GRUB provides me with a boot menu, loads ELF files and modules off my ReiserFS partition by name, switches to Protected Mode and gives me a map of available memory. That's KISS for me.
Every good solution is obvious once you've found it.
<moderated> things about ASM vs C and the like </moderated>
count the number of time you read this "I can not get GRUB to work" or get addvice like this
avoid using DJGPP.
why because you need to use dos and does not like ELF files.
Well that useless thing called DOS that is 20 years old, is more usefull than any hobby OS, so far made, so what does that say about how far hobby OS dev has come.
Maybe if more OS dev's used the "KISS" principle, this would not be the case.