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

Submitter:  Patrick <p55>
Submitted:  Thu 05 May 2011 09:35:22 AM UTC
   
 
Category:  Configuration Severity:  Major
Priority:  5 - Normal Item Group:  Feature Request
Status:  Wont Fix Privacy:  Public
Assigned to:  None Originator Name:  Patrick
Open/Closed:  Closed Release:  Bazaar - trunk
Release:  Reproducibility:  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>
Group 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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-05-05 phcoder StatusNone Wont Fix
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code