[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #45010] CentOS7 minimal install fails with "error: invalid modinfo
From: |
Perry Ross |
Subject: |
[bug #45010] CentOS7 minimal install fails with "error: invalid modinfo file" |
Date: |
Mon, 04 May 2015 17:24:27 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:37.0) Gecko/20100101 Firefox/37.0 |
URL:
<http://savannah.gnu.org/bugs/?45010>
Summary: CentOS7 minimal install fails with "error: invalid
modinfo file"
Project: GNU GRUB
Submitted by: prr
Submitted on: Mon 04 May 2015 05:24:25 PM GMT
Category: Installation
Severity: Major
Priority: 5 - Normal
Item Group: Software Error
Status: None
Privacy: Public
Assigned to: None
Originator Name: prr
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release:
Release: Git master
Reproducibility: Every Time
Planned Release: None
_______________________________________________________
Details:
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.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45010>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #45010] CentOS7 minimal install fails with "error: invalid modinfo file",
Perry Ross <=