bugGNU GRUB - Bugs: bug #33236, config files embedded in core.img...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #33236: config files embedded in core.img can not declare menuentrys

Submitted by:  Patrick <p55>
Submitted on:  Thu 05 May 2011 09:35:22 AM UTC  
 
Category: ConfigurationSeverity: Major
Priority: 5 - NormalItem Group: Feature Request
Status: Wont FixPrivacy: Public
Assigned to: NoneOriginator Name: Patrick
Open/Closed: ClosedRelease: 
Release: Bazaar - trunkReproducibility: Every Time
Planned Release: None

Thu 05 May 2011 10:03:59 AM UTC, comment #2:

Dough. Totally missed memdisk. It's exactly what I need of course. Well, shit happens....

Thank you for the advice!

Patrick <p55>
Thu 05 May 2011 09:40:04 AM UTC, comment #1:

menuentries need normal.mod parsing. If you need sth like this you should use memdisk. Adding menuentries is outside of scope of embeded configfile. embed configfile is designed to be lightweight and rely on kernel alone.

Vladimir Serbinenko <phcoder>
Project Administrator
Thu 05 May 2011 09:35:22 AM UTC, original submission:

It should be possible to execute the embedded config file in "normal mode"

I have been investigating grub for several hours just now and have been able to implement the feature.

There is, though, of course more than one way to do it. Grub is NOT lacking concepts and levels of abstraction.

The basic "problem" is that "normal mode" relies on files. Functions in grub-core/normal/main.c expect file paths.

The way I approached the task was basically to move the grub_load_config() function from kern/main.c to normal/main.c and duplicate some functions in normal/main.c to make them accept char* buffers instead of grub_file_t as arguments. It works nicely so far. But is not compatible with the current behavior.

I have 2 possibilities how to proceed now and would like to know which would have more chances to be included in the trunk.

1. write a module which basically does the same like kern/main.c does. The module would provide a special function that would "take over" control from kern/main.c as soon as it gets called from the embedded config file. The embedded config config file would then start with
embedded_normal
or something like that and the module would switch mode and never return control to kern/main.c

2. adjust kern/main.c and normal/main.c and make grub switch to "normal mode" in case
normal
is called from an embedded config file and NOT load (prefix)/grub.cfg. If "normal" is not called, switch to normal mode and load /grub.cfg, just like before.

Method 2 would use significantly less code I think. Should I give it a try? (I actually don't really have the time anytime soon anyway... :-) maybe somebody else would like doing it as well... )

Thoughts??

Patrick <p55>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by phcoder (Posted a comment)
  • -unavailable- added by p55 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 05 May 2011 09:40:04 AM UTCphcoderStatusNone=>Wont Fix
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1