Grub boot modules

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.
Post Reply
Dangamoose

Grub boot modules

Post by Dangamoose »

I've set up my grub config and os to boot a module but if the module is not present Grub won't boot the os.
Is there a method to tell Grub to boot my os regardless of module availability?

Thanks in advance.
Dangamoose.
carbonBased

RE:Grub boot modules

Post by carbonBased »

Unfortunately, no (unless it's a new/undocumented feature).  You'll have to alter the GRUB sources for that, or load the module yourself, after GRUB has loaded your kernel.

Alternatively, I suppose you could put an empty file in that location, and test the module length to see that it's not == 0.
Dangamoose

RE:Grub boot modules

Post by Dangamoose »

Well my idea was to load the module as a config file of ascii text which i've done, then parse it in my os as an easy route to configure it without having to load it myself, because then i would have to configure things, load the config file, then reconfigure. And thats too much playing around for me.

I wanted Grub to boot my os regardless of my config file so that even if one is not present, my os would still boot and use a default configuration that it could assume uppon.
Oh well.

Thanks.
Dangamoose.
carbonBased

RE:Grub boot modules

Post by carbonBased »

Yeah, I wondered if that's what you were thinking about.

I've actually considered a similar method in my OS, and this functionality in GRUB would definitly be desirable.

Perhaps we could set out a proposal for the GRUB maintainers to add an 'optional' feature to the modules list?  Or perhaps we can simply write the support in ourselves?  It wouldn't require much more then a couple lines of code, I'm sure.

It's not, necessarily, breaking the multiboot standard, at all.  It's simply adding a feature to it, so I can't see any real disadvantage in adding this functionality.  Although, this would render both of our OSs unbootable from a strict Multiboot-Compliant boot-loader.

Let me know what you think!

Cheers,
Jeff
Post Reply