nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

Blame SOURCES/0115-Use-linux16-when-appropriate-880840.patch

f725e3
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
f725e3
From: Peter Jones <pjones@redhat.com>
f725e3
Date: Mon, 28 Oct 2013 10:05:07 -0400
f725e3
Subject: [PATCH] Use linux16 when appropriate (#880840)
f725e3
f725e3
The kernel group really would prefer that we use the 16 bit entry point
f725e3
on x86 bios machines.
f725e3
f725e3
Resolves: rhbz#880840
f725e3
f725e3
Signed-off-by: Peter Jones <pjones@redhat.com>
f725e3
---
f725e3
 util/grub.d/10_linux.in | 9 +++++++--
f725e3
 1 file changed, 7 insertions(+), 2 deletions(-)
f725e3
f725e3
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
f725e3
index e762e1f4e37..600bfd29dc7 100644
f725e3
--- a/util/grub.d/10_linux.in
f725e3
+++ b/util/grub.d/10_linux.in
f725e3
@@ -74,6 +74,11 @@ linux_entry ()
f725e3
   type="$3"
f725e3
   args="$4"
f725e3
 
f725e3
+  sixteenbit=""
f725e3
+  case "$machine" in
f725e3
+    i?86|x86_64) sixteenbit="16" ;;
f725e3
+  esac
f725e3
+
f725e3
   if [ -z "$boot_device_id" ]; then
f725e3
       boot_device_id="$(grub_get_device_id "${GRUB_DEVICE}")"
f725e3
   fi
f725e3
@@ -132,7 +137,7 @@ linux_entry ()
f725e3
 EOF
f725e3
   else
f725e3
     sed "s/^/$submenu_indentation/" << EOF
f725e3
-	linux	${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
f725e3
+	linux${sixteenbit} ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
f725e3
 EOF
f725e3
   fi
f725e3
   if test -n "${initrd}" ; then
f725e3
@@ -142,7 +147,7 @@ EOF
f725e3
 EOF
f725e3
     else
f725e3
       sed "s/^/$submenu_indentation/" << EOF
f725e3
-	initrd	${rel_dirname}/${initrd}
f725e3
+	initrd${sixteenbit} ${rel_dirname}/${initrd}
f725e3
 EOF
f725e3
     fi
f725e3
   fi