diff --git a/grub2-add-bootpath-device-to-the-list.patch b/grub2-add-bootpath-device-to-the-list.patch new file mode 100644 index 0000000..d493bb5 --- /dev/null +++ b/grub2-add-bootpath-device-to-the-list.patch @@ -0,0 +1,54 @@ +From d2863ca186a6d4ba2a56559bf522f46c18403645 Mon Sep 17 00:00:00 2001 +From: Fedora Ninjas +Date: Fri, 14 Dec 2012 20:10:21 -0200 +Subject: [PATCH] Add bootpath device to the list + +When scanning the devices, always check (and add) the bootpath device if it +isn't in the device list. +--- + grub-core/disk/ieee1275/ofdisk.c | 29 +++++++++++++++++++++++++++++ + 1 file changed, 29 insertions(+) + +diff --git a/grub-core/disk/ieee1275/ofdisk.c b/grub-core/disk/ieee1275/ofdisk.c +index b0aa7ec..99b156e 100644 +--- a/grub-core/disk/ieee1275/ofdisk.c ++++ b/grub-core/disk/ieee1275/ofdisk.c +@@ -213,6 +213,35 @@ scan (void) + return grub_children_iterate (alias->path, dev_iterate); + } + ++ char *bootpath; ++ int bootpath_size; ++ char *type; ++ ++ if (grub_ieee1275_get_property_length (grub_ieee1275_chosen, "bootpath", ++ &bootpath_size) ++ || bootpath_size <= 0) ++ { ++ /* Should never happen. */ ++ grub_printf ("/chosen/bootpath property missing!\n"); ++ return; ++ } ++ ++ bootpath = (char *) grub_malloc ((grub_size_t) bootpath_size + 64); ++ if (! bootpath) ++ { ++ grub_print_error (); ++ return; ++ } ++ grub_ieee1275_get_property (grub_ieee1275_chosen, "bootpath", bootpath, ++ (grub_size_t) bootpath_size + 1, 0); ++ bootpath[bootpath_size] = '\0'; ++ ++ type = grub_ieee1275_get_device_type (bootpath); ++ if (type && grub_strcmp (type, "block") == 0) ++ dev_iterate_real (bootpath, bootpath); ++ ++ grub_free (bootpath); ++ + grub_devalias_iterate (dev_iterate_alias); + grub_children_iterate ("/", dev_iterate); + } +-- +1.8.0 + diff --git a/grub2.spec b/grub2.spec index b69afdb..b927a17 100644 --- a/grub2.spec +++ b/grub2.spec @@ -41,7 +41,7 @@ Name: grub2 Epoch: 1 Version: 2.00 -Release: 13%{?dist} +Release: 14%{?dist} Summary: Bootloader with support for Linux, Multiboot and more Group: System Environment/Base @@ -77,6 +77,7 @@ Patch33: follow-the-symbolic-link-ieee1275.patch Patch34: grub-2.00-add-X-option-to-printf-functions.patch Patch35: grub-2.00-dhcp-client-id-and-uuid-options-added.patch Patch36: grub-2.00-search-for-specific-config-file-for-netboot.patch +Patch37: grub2-add-bootpath-device-to-the-list.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -430,6 +431,9 @@ fi %doc grub-%{tarversion}/themes/starfield/COPYING.CC-BY-SA-3.0 %changelog +* Mon Dec 17 2012 Karsten Hopp 2.00-14 +- add bootpath device to the device list (pfsmorigo, #886685) + * Tue Nov 27 2012 Peter Jones - 2.00-13 - Add vlan tag support (pfsmorigo, #871563) - Follow symlinks during PReP installation in grub2-install (pfsmorigo, #874234)