* util/grub-install.in: Don't try to verify core.img until after

running grub-mkimage to create it.
This commit is contained in:
Colin Watson 2010-09-10 23:15:56 +01:00
parent 90367e043d
commit 5ed7d816b4
2 changed files with 13 additions and 8 deletions

View file

@ -1,3 +1,8 @@
2010-09-10 Colin Watson <cjwatson@ubuntu.com>
* util/grub-install.in: Don't try to verify core.img until after
running grub-mkimage to create it.
2010-09-10 Robert Millan <rmh@gnu.org>
* util/grub.d/10_hurd.in: Add misc readability checks.

View file

@ -402,14 +402,7 @@ case "${target_cpu}-${platform}" in
esac
# Verify readability of a few critical files
# verify_files is a temporary workaround; drop this once the install branch
# is merged.
verify_files=grubenv
if [ "${target_cpu}-${platform}" = "i386-pc" ] || [ "${target_cpu}-${platform}" = "sparc64-ieee1275" ]; then
verify_files="$verify_files core.img"
fi
verify_files="$verify_files normal.mod"
for file in $verify_files ; do
for file in grubenv normal.mod ; do
if is_path_readable_by_grub ${grubdir}/${file} ${grub_device} ${relative_grubdir}/${file} ; then : ; else
echo "GRUB is unable to read ${grubdir}/${file}" >&2
exit 1
@ -419,6 +412,13 @@ done
if [ "${target_cpu}-${platform}" = "i386-pc" ] || [ "${target_cpu}-${platform}" = "sparc64-ieee1275" ] ; then
$grub_mkimage ${config_opt} -O ${mkimage_target} --output=${grubdir}/core.img --prefix=${prefix_drive}${relative_grubdir} $modules || exit 1
# This is a temporary workaround; it can be merged back into the check
# above once the install branch is merged.
if is_path_readable_by_grub ${grubdir}/core.img ${grub_device} ${relative_grubdir}/core.img ; then : ; else
echo "GRUB is unable to read ${grubdir}/core.img" >&2
exit 1
fi
# Now perform the installation.
$grub_setup ${setup_verbose} ${setup_force} --directory=${grubdir} --device-map=${device_map} \
${install_device} || exit 1