From 0c7e9e937b0b31aa78da86bd80f3957eafc8092d Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Tue, 4 Aug 2015 11:14:11 +0000 Subject: [PATCH] - dracut is only option now, no point to search for old initrds - tldized a bit more --- choose-preferred-initrd.patch | 53 ------------------- grub.sysconfig | 5 -- grub2.spec | 6 +-- initrd-search.patch | 30 +++++++++++ ...mkconfigdir.patch => tld-mkconfigdir.patch | 0 pld-sysconfdir.patch => tld-sysconfdir.patch | 0 6 files changed, 33 insertions(+), 61 deletions(-) delete mode 100644 choose-preferred-initrd.patch create mode 100644 initrd-search.patch rename pld-mkconfigdir.patch => tld-mkconfigdir.patch (100%) rename pld-sysconfdir.patch => tld-sysconfdir.patch (100%) diff --git a/choose-preferred-initrd.patch b/choose-preferred-initrd.patch deleted file mode 100644 index b6f1887..0000000 --- a/choose-preferred-initrd.patch +++ /dev/null @@ -1,53 +0,0 @@ -diff -dur -x '*.orig' grub-2.00.git20131218.orig/util/grub-mkconfig.in grub-2.00.git20131218/util/grub-mkconfig.in ---- grub-2.00.git20131218.orig/util/grub-mkconfig.in 2013-12-18 14:44:31.000000000 +0100 -+++ grub-2.00.git20131218/util/grub-mkconfig.in 2013-12-18 14:45:37.000000000 +0100 -@@ -255,7 +255,8 @@ - GRUB_ENABLE_CRYPTODISK \ - GRUB_BADRAM \ - GRUB_OS_PROBER_SKIP_LIST \ -- GRUB_DISABLE_SUBMENU -+ GRUB_DISABLE_SUBMENU \ -+ GRUB_PREFER_DRACUT - - if test "x${grub_cfg}" != "x"; then - rm -f "${grub_cfg}.new" -diff -dur -x '*.orig' grub-2.00.git20131218.orig/util/grub.d/10_linux.in grub-2.00.git20131218/util/grub.d/10_linux.in ---- grub-2.00.git20131218.orig/util/grub.d/10_linux.in 2013-12-18 14:44:31.000000000 +0100 -+++ grub-2.00.git20131218/util/grub.d/10_linux.in 2013-12-18 14:44:49.000000000 +0100 -@@ -198,10 +198,12 @@ - linux_root_device_thisversion="${LINUX_ROOT_DEVICE}" - - initrd= -- for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \ -- "initrd-${version}" "initramfs-${version}.img" \ -- "initrd.img-${alt_version}" "initrd-${alt_version}.img" \ -- "initrd-${alt_version}" "initramfs-${alt_version}.img" \ -+ if [ x"${GRUB_PREFER_DRACUT}" != "xtrue" ]; then -+ initrd_search_list="initrd.img-${version} initrd-${version}.img initrd-${version}.gz initrd-${version} initramfs-${version}.img initrd.img-${alt_version} initrd-${alt_version}.img initrd-${alt_version} initramfs-${alt_version}.img" -+ else -+ initrd_search_list="initramfs-${version}.img initrd.img-${version} initrd-${version}.img initrd-${version}.gz initrd-${version} initramfs-${alt_version}.img initrd.img-${alt_version} initrd-${alt_version}.img initrd-${alt_version}" -+ fi -+ for i in $initrd_search_list \ - "initramfs-genkernel-${version}" \ - "initramfs-genkernel-${alt_version}" \ - "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \ -diff -dur -x '*.orig' grub-2.00.git20131218.orig/util/grub.d/20_linux_xen.in grub-2.00.git20131218/util/grub.d/20_linux_xen.in ---- grub-2.00.git20131218.orig/util/grub.d/20_linux_xen.in 2013-12-18 14:44:31.000000000 +0100 -+++ grub-2.00.git20131218/util/grub.d/20_linux_xen.in 2013-12-18 14:44:49.000000000 +0100 -@@ -207,10 +207,12 @@ - linux_root_device_thisversion="${LINUX_ROOT_DEVICE}" - - initrd= -- for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \ -- "initrd-${version}" "initramfs-${version}.img" \ -- "initrd.img-${alt_version}" "initrd-${alt_version}.img" \ -- "initrd-${alt_version}" "initramfs-${alt_version}.img" \ -+ if [ x"${GRUB_PREFER_DRACUT}" != "xtrue" ]; then -+ initrd_search_list="initrd.img-${version} initrd-${version}.img initrd-${version}.gz initrd-${version} initramfs-${version}.img initrd.img-${alt_version} initrd-${alt_version}.img initrd-${alt_version} initramfs-${alt_version}.img" -+ else -+ initrd_search_list="initramfs-${version}.img initrd.img-${version} initrd-${version}.img initrd-${version}.gz initrd-${version} initramfs-${alt_version}.img initrd.img-${alt_version} initrd-${alt_version}.img initrd-${alt_version}" -+ fi -+ for i in $initrd_search_list \ - "initramfs-genkernel-${version}" \ - "initramfs-genkernel-${alt_version}" \ - "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \ diff --git a/grub.sysconfig b/grub.sysconfig index 0c2f181..7b1699d 100644 --- a/grub.sysconfig +++ b/grub.sysconfig @@ -49,10 +49,5 @@ GRUB_DISABLE_RECOVERY="true" # Disable creating "advanced" submenus, just use flat list GRUB_DISABLE_SUBMENU="y" -# Control which initial ramdisk should grub-mkconfig prefer. Ddefault is -# initramf-*.img created by dracut. Set to false to prefer initrd-*.img -# created by geninitrd. -GRUB_PREFER_DRACUT="true" - # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1" diff --git a/grub2.spec b/grub2.spec index b1cb292..f66007e 100644 --- a/grub2.spec +++ b/grub2.spec @@ -51,17 +51,17 @@ Source1: update-grub Source2: update-grub.8 Source3: grub.sysconfig Source4: grub-custom.cfg -Patch1: pld-sysconfdir.patch +Patch1: tld-sysconfdir.patch Patch2: grub-garbage.patch Patch3: grub-lvmdevice.patch -Patch4: pld-mkconfigdir.patch +Patch4: tld-mkconfigdir.patch Patch5: grub-mkconfig-diagnostics.patch Patch6: posix.patch Patch7: %{name}-fonts_path.patch Patch8: add-vlan-tag-support.patch Patch9: just-say-linux.patch Patch10: ignore-kernel-symlinks.patch -Patch11: choose-preferred-initrd.patch +Patch11: initrd-search.patch Patch12: %{name}-cfg.patch Patch13: efi-net-fix.patch Patch14: grub2-xfs-Add-helper-for-inode-size.patch diff --git a/initrd-search.patch b/initrd-search.patch new file mode 100644 index 0000000..bf7207c --- /dev/null +++ b/initrd-search.patch @@ -0,0 +1,30 @@ +diff -ur grub-2.02-beta2.orig/util/grub.d/10_linux.in grub-2.02-beta2/util/grub.d/10_linux.in +--- grub-2.02-beta2.orig/util/grub.d/10_linux.in 2013-12-24 20:53:23.000000000 +0000 ++++ grub-2.02-beta2/util/grub.d/10_linux.in 2015-08-04 11:09:27.932635208 +0000 +@@ -185,10 +185,7 @@ + linux_root_device_thisversion="${LINUX_ROOT_DEVICE}" + + initrd= +- for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \ +- "initrd-${version}" "initramfs-${version}.img" \ +- "initrd.img-${alt_version}" "initrd-${alt_version}.img" \ +- "initrd-${alt_version}" "initramfs-${alt_version}.img" \ ++ for i in "initramfs-${version}.img initramfs-${alt_version}.img" \ + "initramfs-genkernel-${version}" \ + "initramfs-genkernel-${alt_version}" \ + "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \ +diff -ur grub-2.02-beta2.orig/util/grub.d/20_linux_xen.in grub-2.02-beta2/util/grub.d/20_linux_xen.in +--- grub-2.02-beta2.orig/util/grub.d/20_linux_xen.in 2013-12-24 20:53:23.000000000 +0000 ++++ grub-2.02-beta2/util/grub.d/20_linux_xen.in 2015-08-04 11:10:18.928635208 +0000 +@@ -213,10 +213,7 @@ + linux_root_device_thisversion="${LINUX_ROOT_DEVICE}" + + initrd= +- for i in "initrd.img-${version}" "initrd-${version}.img" "initrd-${version}.gz" \ +- "initrd-${version}" "initramfs-${version}.img" \ +- "initrd.img-${alt_version}" "initrd-${alt_version}.img" \ +- "initrd-${alt_version}" "initramfs-${alt_version}.img" \ ++ for i in "initramfs-${version}.img initramfs-${alt_version}.img" \ + "initramfs-genkernel-${version}" \ + "initramfs-genkernel-${alt_version}" \ + "initramfs-genkernel-${GENKERNEL_ARCH}-${version}" \ diff --git a/pld-mkconfigdir.patch b/tld-mkconfigdir.patch similarity index 100% rename from pld-mkconfigdir.patch rename to tld-mkconfigdir.patch diff --git a/pld-sysconfdir.patch b/tld-sysconfdir.patch similarity index 100% rename from pld-sysconfdir.patch rename to tld-sysconfdir.patch -- 2.46.0