nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

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