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

Submitted by:  Kostya Berger <bergerkos>
Submitted on:  Fri 06 Mar 2015 05:08:51 PM UTC  
 
Category: ConfigurationSeverity: Major
Priority: 5 - NormalItem Group: None
Status: InvalidPrivacy: Public
Assigned to: NoneOriginator Name: Kostya Berger
Open/Closed: ClosedRelease: 
Release: Git masterReproducibility: None
Planned Release: None

(Jump to the original submission Jump to the original submission)

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

Yes, cross-disk works.

Vladimir Serbinenko <phcoder>
Project 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>
Project 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>
Project 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>

 

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

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 14 Feb 2016 09:07:02 AM UTCphcoderStatusNone=>Invalid
      Open/ClosedOpen=>Closed
    Fri 06 Mar 2015 08:14:58 PM UTCbergerkosAttached File-=>Added grub.cfg.buggy, #33268
      Attached File-=>Added grub.cfg.good, #33269
    Fri 06 Mar 2015 05:08:51 PM UTCbergerkosAttached File-=>Added 10_kfreebsd.in.patch, #33263
      Attached File-=>Added grub-mkconfig_lib.in.patch, #33264

    Back to the top


    Powered by Savane 3.1-cleanup1