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