bugGNU GRUB - Bugs: bug #45010, CentOS7 minimal install fails with...

 
 

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

bug #45010: CentOS7 minimal install fails with "error: invalid modinfo file"

Submitted by:  Perry Ross <prr>
Submitted on:  Mon 04 May 2015 05:24:25 PM UTC  
 
Category: InstallationSeverity: Major
Priority: 5 - NormalItem Group: Software Error
Status: NonePrivacy: Public
Assigned to: NoneOriginator Name: prr
Open/Closed: OpenRelease: 
Release: Git masterReproducibility: Every Time
Planned Release: 2.03+

Thu 07 May 2015 03:12:26 PM UTC, comment #3:

What locale do you use? Please type "locale" and "set" in shell. This sounds like some weird local problem. Last time we had sth similar it was about [a-z] not matching u in Estonian due to different letter order. Also could you make it print the input and output? Then could you try using strstr with those inputs in astandalone program?

Vladimir Serbinenko <phcoder>
Project Administrator
Wed 06 May 2015 09:54:58 PM UTC, comment #2:

Agreed, as a guess I'd say there's something wrong with the strstr in the C library, although I can't imagine what.

I assumed there was a reason for having a private copy as grub_strstr(), and when I saw it was used everywhere else but these two spots, I decided to try it, and it worked.

But what the "correct fix" would be, I don't have a clue.

The problem was repeatable. I used CentOS-7-x86_64-Minimal-1503-01.iso, and the kickstart is pasted in below. It was installing under KVM with these settings:

1GB RAM
1 CPU
10GB qcow2 hd
no graphics

I'm happy to test fixes if that helps.

HTH! -- prr

kickstart:

Perry Ross <prr>
Wed 06 May 2015 05:39:49 PM UTC, comment #1:

That really sounds more like CentOS issue and I would like to understand why it fails and fix root cause, not paper over.

Buffer size is not nice but we are really interested in two strings and they have always been at the same location in this file. Thanks for the hint.

Andrei Borzenkov <arvidjaar>
Project Member
Mon 04 May 2015 05:24:25 PM UTC, original submission:

While doing CentOS7 minimal install with custom kickstart, I get:

grub2-install: error: invalid modinfo file '/usr/lib/grub/i386-pc/modinfo.sh'

For some reason, strstr is incorrectly returning null in 2 places in util/grub-install-common.c:

c = strstr (buf, "grub_modinfo_target_cpu=");
if (!c || (c != buf && !grub_isspace (*(c-1))))
grub_util_error (_("invalid modinfo file `%s'"), fn);
pl = strstr (buf, "grub_modinfo_platform=");
if (!pl || (pl != buf && !grub_isspace (*(pl-1))))
grub_util_error (_("invalid modinfo file `%s'"), fn);

Changing both strstr() to grub_strstr() fixes this.

As an aside, I also noted that the buffer for reading modinfo.sh is only 2048, while the file is 2251 (due to some recent additions, I think). It works here, because the options we are looking for seem to be at the top of the file, but it could become a problem later.

Perry Ross <prr>

 

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 rwp (Updated the item)
  • -unavailable- added by arvidjaar (Posted a comment)
  • -unavailable- added by prr (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 06 Mar 2017 07:46:45 PM UTCphcoderPlanned Release2.02=>2.03+
    Wed 02 Mar 2016 01:36:09 PM UTCphcoderPlanned ReleaseNone=>2.02
    Thu 07 May 2015 07:44:52 PM UTCrwpPrivacyPrivate=>Public
    Thu 07 May 2015 12:14:06 AM UTCrwpPrivacyPublic=>Private

    Back to the top


    Powered by Savane 3.1-cleanup1