* util/grub-install.in: New option --efi-directory.
This commit is contained in:
parent
b41be5623a
commit
c6ca973d4b
2 changed files with 40 additions and 26 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2012-04-18 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* util/grub-install.in: New option --efi-directory.
|
||||||
|
|
||||||
2012-04-17 Vladimir Serbinenko <phcoder@gmail.com>
|
2012-04-17 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/loader/i386/linux.c (allocate_pages): Overwrite low memory
|
* grub-core/loader/i386/linux.c (allocate_pages): Overwrite low memory
|
||||||
|
|
|
@ -111,6 +111,7 @@ usage () {
|
||||||
print_option_help "--no-nvram" "$(gettext "don't update the \`boot-device' NVRAM variable. This option is only available on IEEE1275 targets.")"
|
print_option_help "--no-nvram" "$(gettext "don't update the \`boot-device' NVRAM variable. This option is only available on IEEE1275 targets.")"
|
||||||
print_option_help "--removable" "$(gettext "the installation device is removable. This option is only available on EFI.")"
|
print_option_help "--removable" "$(gettext "the installation device is removable. This option is only available on EFI.")"
|
||||||
print_option_help "--bootloader-id=$(gettext "ID")" "$(gettext "the ID of bootloader. This option is only available on EFI.")"
|
print_option_help "--bootloader-id=$(gettext "ID")" "$(gettext "the ID of bootloader. This option is only available on EFI.")"
|
||||||
|
print_option_help "--efi-directory=$(gettext "DIR")" "$(gettext "use DIR as the EFI System Partition root.")"
|
||||||
echo
|
echo
|
||||||
gettext "INSTALL_DEVICE must be system device filename.";echo
|
gettext "INSTALL_DEVICE must be system device filename.";echo
|
||||||
echo
|
echo
|
||||||
|
@ -134,6 +135,7 @@ argument () {
|
||||||
|
|
||||||
allow_floppy=""
|
allow_floppy=""
|
||||||
force_file_id=
|
force_file_id=
|
||||||
|
efidir=
|
||||||
|
|
||||||
# Check the arguments.
|
# Check the arguments.
|
||||||
while test $# -gt 0
|
while test $# -gt 0
|
||||||
|
@ -174,6 +176,11 @@ do
|
||||||
--boot-directory=*)
|
--boot-directory=*)
|
||||||
bootdir="`echo "$option" | sed 's/--boot-directory=//'`" ;;
|
bootdir="`echo "$option" | sed 's/--boot-directory=//'`" ;;
|
||||||
|
|
||||||
|
--efi-directory)
|
||||||
|
efidir="`argument $option "$@"`"; shift;;
|
||||||
|
--efi-directory=*)
|
||||||
|
efidir="`echo "$option" | sed 's/--efi-directory=//'`" ;;
|
||||||
|
|
||||||
--directory | -d)
|
--directory | -d)
|
||||||
source_dir="`argument $option "$@"`"; shift;;
|
source_dir="`argument $option "$@"`"; shift;;
|
||||||
--directory=*)
|
--directory=*)
|
||||||
|
@ -397,37 +404,40 @@ fi
|
||||||
|
|
||||||
if [ x"$grub_modinfo_platform" = xefi ]; then
|
if [ x"$grub_modinfo_platform" = xefi ]; then
|
||||||
# Find the EFI System Partition.
|
# Find the EFI System Partition.
|
||||||
efidir=
|
if test -n "$efidir"; then
|
||||||
if test -d "${bootdir}/efi"; then
|
install_device="`"$grub_probe" --target=device --device-map= "${efidir}"`"
|
||||||
install_device="`"$grub_probe" --target=device --device-map= "${bootdir}/efi"`"
|
else
|
||||||
# Is it a mount point?
|
if test -d "${bootdir}/efi"; then
|
||||||
if test "x$install_device" != "x`"$grub_probe" --target=device --device-map= "${bootdir}"`"; then
|
install_device="`"$grub_probe" --target=device --device-map= "${bootdir}/efi"`"
|
||||||
efidir="${bootdir}/efi"
|
# Is it a mount point?
|
||||||
fi
|
if test "x$install_device" != "x`"$grub_probe" --target=device --device-map= "${bootdir}"`"; then
|
||||||
elif test -d "${bootdir}/EFI"; then
|
efidir="${bootdir}/efi"
|
||||||
install_device="`"$grub_probe" --target=device --device-map= "${bootdir}/EFI"`"
|
fi
|
||||||
# Is it a mount point?
|
elif test -d "${bootdir}/EFI"; then
|
||||||
if test "x$install_device" != "x`"$grub_probe" --target=device --device-map= "${bootdir}"`"; then
|
install_device="`"$grub_probe" --target=device --device-map= "${bootdir}/EFI"`"
|
||||||
efidir="${bootdir}/EFI"
|
# Is it a mount point?
|
||||||
fi
|
if test "x$install_device" != "x`"$grub_probe" --target=device --device-map= "${bootdir}"`"; then
|
||||||
elif test -n "$rootdir" && test "x$rootdir" != "x/"; then
|
efidir="${bootdir}/EFI"
|
||||||
|
fi
|
||||||
|
elif test -n "$rootdir" && test "x$rootdir" != "x/"; then
|
||||||
# The EFI System Partition may have been given directly using
|
# The EFI System Partition may have been given directly using
|
||||||
# --root-directory.
|
# --root-directory.
|
||||||
install_device="`"$grub_probe" --target=device --device-map= "${rootdir}"`"
|
install_device="`"$grub_probe" --target=device --device-map= "${rootdir}"`"
|
||||||
# Is it a mount point?
|
# Is it a mount point?
|
||||||
if test "x$install_device" != "x`"$grub_probe" --target=device --device-map= "${rootdir}/.."`"; then
|
if test "x$install_device" != "x`"$grub_probe" --target=device --device-map= "${rootdir}/.."`"; then
|
||||||
efidir="${rootdir}"
|
efidir="${rootdir}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -n "$efidir"; then
|
||||||
|
efi_fs=`"$grub_probe" --target=fs "--device-map=${device_map}" "${efidir}"`
|
||||||
|
if test "x$efi_fs" = xfat; then :; else
|
||||||
|
gettext_printf "%s doesn't look like an EFI partition.\n" "${efidir}" 1>&2
|
||||||
|
efidir=
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -n "$efidir"; then
|
|
||||||
efi_fs=`"$grub_probe" --target=fs "--device-map=${device_map}" "${efidir}"`
|
|
||||||
if test "x$efi_fs" = xfat; then :; else
|
|
||||||
gettext_printf "%s doesn't look like an EFI partition.\n" "${efidir}" 1>&2
|
|
||||||
efidir=
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -n "$efidir"; then
|
if test -n "$efidir"; then
|
||||||
# The EFI specification requires that an EFI System Partition must
|
# The EFI specification requires that an EFI System Partition must
|
||||||
# contain an "EFI" subdirectory, and that OS loaders are stored in
|
# contain an "EFI" subdirectory, and that OS loaders are stored in
|
||||||
|
|
Loading…
Reference in a new issue