[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Add support for UEFI operating systems returned by os-prober
From: |
Lubomir Rintel |
Subject: |
[PATCH] Add support for UEFI operating systems returned by os-prober |
Date: |
Tue, 21 Jan 2014 00:38:08 +0100 |
From: Matthew Garrett <address@hidden>
os-prober returns UEFI operating systems in the form:
path:long-name:name
where path is the path under the EFI directory on the ESP. This is in
contrast to legacy OSes, where path is the device string. Handle this case.
address@hidden: Add Changelog]
---
Hi,
this is taken from Fedora (and RHEL) package as it is. I've only added the
Changelog.
Please have a look and let me know if there's anything I could do to have his
mainlined, so that we can get rid of the pile of patches we ship in Fedora.
Other Linux distributions interested in Linux on EFI support may find this
useful too.
Thank you!
Lubo
ChangeLog | 4 ++++
util/grub.d/30_os-prober.in | 22 ++++++++++++++++++----
2 files changed, 22 insertions(+), 4 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 10abfe2..d33278f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-02-21 Matthew Garrett <address@hidden>
+
+ * util/grub.d/30_os-prober.in: Chainload *.efi entries.
+
2014-01-19 Colin Watson <address@hidden>
* grub-core/osdep/freebsd/hostdisk.c (grub_util_fd_open): Ignore
diff --git a/util/grub.d/30_os-prober.in b/util/grub.d/30_os-prober.in
index 7cf8487..390bb0e 100644
--- a/util/grub.d/30_os-prober.in
+++ b/util/grub.d/30_os-prober.in
@@ -319,9 +319,23 @@ EOF
EOF
;;
*)
- echo -n " "
- # TRANSLATORS: %s is replaced by OS name.
- gettext_printf "%s is not yet supported by grub-mkconfig.\n"
"${LONGNAME}" >&2
- ;;
+ case ${DEVICE} in
+ *.efi)
+ cat << EOF
+menuentry '$(echo "${LONGNAME}" | grub_quote)' {
+EOF
+ save_default_entry | grub_add_tab
+ cat << EOF
+ chainloader /EFI/${DEVICE}
+ boot
+}
+EOF
+ ;;
+ *)
+ echo -n " "
+ # TRANSLATORS: %s is replaced by OS name.
+ gettext_printf "%s is not yet supported by grub-mkconfig.\n"
"${LONGNAME}" >&2
+ ;;
+ esac
esac
done
--
1.8.3.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] Add support for UEFI operating systems returned by os-prober,
Lubomir Rintel <=