bugGNU GRUB - Bugs: bug #28642, GRUB2 1.97.1 - Strange behavior...

 
 

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

bug #28642: GRUB2 1.97.1 - Strange behavior after using configfile command

Submitter:  Alexey Loukianov <lexa2>
Submitted:  Sun 17 Jan 2010 08:40:40 AM UTC
   
 
Category:  Booting Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  Fixed Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Closed Release:  Bazaar - trunk
Release:  Reproducibility:  Every Time
Planned Release:  None

Wed 20 Jan 2010 11:56:30 PM UTC, comment #5: 

This was fixed in bazaar trunk

Vladimir Serbinenko <phcoder>
Group administrator
Mon 18 Jan 2010 01:56:12 AM UTC, comment #4: 

Figured it out!
Main point is that it looks like that:
a) "export" statement should be specified before the "set" statement for that variable;
b) "export" statement should be supplied no matter is the variable set or not in current configfile context.

So the following set of commands works normally:

sh:grub> export prefix
sh:grub> export root
sh:grub> set prefix=(hd0,5)/boot/grub
sh:grub> configfile (hd0,5)/boot/grub/grub.cfg
sh:grub> export prefix
sh:grub> export root
sh:grub> set prefix=(hd0,5)/boot/grub
sh:grub> configfile (hd0,5)/boot/grub/grub.cfg
sh:grub> export prefix
sh:grub> export root
sh:grub> set prefix=(hd0,5)/boot/grub
sh:grub> set root=(hd0,1)
sh:grub> chainloader +1
sh:grub> ls /
txtsetup.sif autorun.inf ...
sh:grub> boot

Alexey Loukianov <lexa2>
Mon 18 Jan 2010 01:46:37 AM UTC, comment #3: 

Hmm, still no success:

sh:grub> set prefix=(hd0,5)/boot/grub
sh:grub> export prefix
sh:grub> configfile (hd0,5)/boot/grub/grub.cfg
sh:grub> set prefix=(hd0,5)/boot/grub
sh:grub> export prefix
sh:grub> configfile (hd0,5)/boot/grub/grub.cfg
sh:grub> set prefix=(hd0,5)/boot/grub
sh:grub> export prefix
sh:grub> set root=(hd0,1)
sh:grub> export root
sh:grub> chainloader +1
error: no such disk
sh:grub> ls /
error: no such disk

Am I doing something wrong?

Alexey Loukianov <lexa2>
Mon 18 Jan 2010 01:34:59 AM UTC, comment #2: 

Thanks for clarifications. I was unaware about export command.
For now I will use it, as it is a bit uncomfortable for me now to use trunk branch in production environment. Will the fixes from the r1951 go to next stable release?

Alexey Loukianov <lexa2>
Sun 17 Jan 2010 02:00:08 PM UTC, comment #1: 

That behaviour is caused by a bug in the export behaviour. Therefore the essential variables root and prefix are not properly exported all the time.
It's fixed as of revision 1951.

You can workaround it by always exporting prefix and root like this:
export prefix
export root

Do this also for any other variable you would like to keep.

This report is a duplicate of that fixed bug: https://savannah.gnu.org/bugs/?func=detailitem&item_id=27710

Andreas Born <shador>
Sun 17 Jan 2010 08:40:40 AM UTC, original submission:  

I'm using grub2 1.97.1 built by myself on Fedora 8 box.

Strange grub2 behavior experienced after using configfile command with following scenario:

1. Boot from media to grub2. On boot grub2 loads up grub.cfg by default.
2. Get into grub shell and use configfile command twice or more times (for ex.):

sh:grub> configfile (hd0,5)/boot/grub/grub.cfg
sh:grub> configfile (hd0,5)/boot/grub/grub.cfg

3. Trying to use GRUB2 to chainload results in a strange errors:
sh:grub> set root=(hd0,1)
sh:grub> chainloader +1
error: no such disk
sh:grub> ls /
error: no such disk

Using chainloader (hd0,1)+1 works as expected.
Using configfile command only once gives correct behavior:

sh:grub> set root=(hd0,1)
sh:grub> chainloader +1
sh:grub> ls /
txtsetup.sif autorun.inf ...
sh:grub> boot

Confirmed to happen on several PCs, and also inside VirtualBOX.

Alexey Loukianov <lexa2>

 

(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 shador (Posted a comment)
  • -email is unavailable- added by lexa2 (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-01-20 phcoder StatusNone Fixed
        Open/ClosedOpen Closed
        Releaseother Bazaar - trunk

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code