bugGNU GRUB - Bugs: bug #44454, grub-mkconfig output not very...

 
 

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

bug #44454: grub-mkconfig output not very useful -- patches

Submitter:  Kostya Berger <bergerkos>
Submitted:  Fri 06 Mar 2015 05:08:51 PM UTC
   
 
Category:  Configuration Severity:  Major
Priority:  5 - Normal Item Group:  None
Status:  Invalid Privacy:  Public
Assigned to:  None Originator Name:  Kostya Berger
Open/Closed:  Closed Release:  Git master
Release:  Reproducibility:  None
Planned Release:  None

Jump to the original submission

Sun 14 Feb 2016 09:07:02 AM UTC, comment #6: 

Yes, cross-disk works.

Vladimir Serbinenko <phcoder>
Group administrator
Fri 06 Mar 2015 11:39:10 PM UTC, comment #5: 

A! So GRUB2 can do even that?? Load a kernel from one disk, then switch to another root and load modules from there? Thanks for the general idea, it was worth knowing. Is this known to work?

Kostya Berger <bergerkos>
Fri 06 Mar 2015 10:06:49 PM UTC, comment #4: 

What is the real failure? mkconfig_lib.in.patch increases minimal version needed at boot. 10_kfreebsd.in.patch introduces an assumption that all modules are on the same disk as kernel (usually the case but doesn't have to be).

Vladimir Serbinenko <phcoder>
Group administrator
Fri 06 Mar 2015 08:14:58 PM UTC, comment #3: 

Here are both "good" and "buggy" configs.

1. Buggy: the construction
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  46464c03259a8cb0
else
  search --no-floppy --fs-uuid --set=root 46464c03259a8cb0
fi
is obviously not much use. Although grub DOES boot with it, I also somewhat care about the readability of grub.cfg. Which can be seen in the attached grub.cfg.good.

Secondly, there is no need to repeat the statement above after every line in grub.cfg (as is seen in the grub.cfg.buggy).

2. In the file util/grub-mkconfig_lib.in (which is responsible for the output above) the part:
echo "if [ x\$feature_platform_search_hint = xy ]; then"
echo "  search --no-floppy --fs-uuid --set=root ${hints} ${fs_uuid}"
echo "else"
echo "  search --no-floppy --fs-uuid --set=root ${fs_uuid}"
echo "fi"

can be replaced with:
echo "search --no-floppy --fs-uuid --set=root ${hints} ${fs_uuid}"

which produces the same result and the output is more readable.

But of course, I don't know everything and may be wrong. Therefore, I submit this as a mere suggestion, as a result that works fine for me. Works both on Linux and FreeBSD.


(file #33268, file #33269)

Kostya Berger <bergerkos>
Fri 06 Mar 2015 05:35:02 PM UTC, comment #2: 

Please attach buggy grub.cfg and explain why it is buggy.

Andrei Borzenkov <arvidjaar>
Group Member
Fri 06 Mar 2015 05:27:51 PM UTC, comment #1: 

OK, on linux this doesn't hurt either.

Kostya Berger <bergerkos>
Fri 06 Mar 2015 05:08:51 PM UTC, original submission:  

Existing grub-mkconfig produces somewhat buggy menu, which isn't much use as is.

Here are two patches that correct this behaviour, at least on freebsd platform and for kfreebsd-related menu. Will test this on linux and report back.

NOTE: I'm not sure what the purpose was of placing the strings deleted by these patches into grub-mkconfig script. But as of my experience with linux and freebsd, this makes grub-mkconfig almost useless. Hence these patches...

Kostya Berger <bergerkos>

 

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

Attached Files
file #33268:  grub.cfg.buggy added by bergerkos (7KiB - application/octet-stream - self-explanatory)
file #33269:  grub.cfg.good added by bergerkos (5KiB - application/octet-stream - self-explanatory)
file #33263:  10_kfreebsd.in.patch added by bergerkos (751B - text/x-patch - patches for grub-mkconfig output correction)
file #33264:  grub-mkconfig_lib.in.patch added by bergerkos (700B - text/x-patch - patches for grub-mkconfig output correction)

 

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 arvidjaar (Posted a comment)
  • -email is unavailable- added by bergerkos (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 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-02-14 phcoder StatusNone Invalid
        Open/ClosedOpen Closed
    2015-03-06 bergerkos Attached File- Added grub.cfg.buggy, #33268
        Attached File- Added grub.cfg.good, #33269
    2015-03-06 bergerkos Attached File- Added 10_kfreebsd.in.patch, #33263
        Attached File- Added grub-mkconfig_lib.in.patch, #33264

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code