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-grub mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-grub