[Bug 930447] Re: Unable to start Ubuntu 12.04 live CD with syslinux loader on Pentium M x86 Laptop due to bug in PAE kernel, initramfs or syslinux

roland aus köln devzero at web.de
Tue Nov 26 23:17:57 UTC 2013


I've been tinkering around a little bit this evening....


To: kernel-team at lists.ubuntu.com
Cc: "H. Peter Anvin" <hpa at zytor.com>
Subject: [PATCH] - add "fixpae" bootparam to fix/workaround #930447

Hello kernel-team,

regarding https://bugs.launchpad.net/ubuntu/+source/syslinux/+bug/930447
, i have developed a simple patch to (hopefully) provide an easy and
elegant workaround/fix for the issue. I assume some hundred users (if
not some thousand, as entries in bugreports are only the tip of an
iceberg) are affected by this issue.

Please take a review and feel free to merge.

As defaulting to PAE kernels is specific for some distros only, i think
this is no patch for mainline (yet).

I did not often do patches, nor am i a good programmer - so sorry if the
patch or the submission style is not perfect.

regards
Roland

---
This patch adds a kernel bootparam "fixpae". If integrated into the kernel, this should make life more easy, as installation quirks like fake-pae package, upgrade path from ubuntu 12.04 onwards or specially crafted installation media are not needed anymore. Affected users also get a hint that their issue may be workarounded with this param. Just add the bootparam to the kernel commandline and you`re done.

       fixpae          [x86] Workaround for a nasty PAE issue with older CPU`s
                       like Pentium M, as they may report PAE incapability
                       although they support it. This bootparam adds a fake
                       pae entry to the flags section in /proc/cpuinfo and
                       skips the validate_cpu() routine in arch/x86/boot/main.c
                       This is necesssary as major distros nowadays only ship
                       PAE Kernels for x86 and there is no easy workaround.

signed-off-by: Roland Kletzing <devzero at web.de>
---

diff -uprN linux-source-3.11.0.orig/arch/x86/boot/main.c linux-source-3.11.0/arch/x86/boot/main.c
--- linux-source-3.11.0.orig/arch/x86/boot/main.c       2013-09-02 22:46:10.000000000 +0200
+++ linux-source-3.11.0/arch/x86/boot/main.c    2013-11-26 20:56:01.175269235 +0100
@@ -146,9 +146,17 @@ void main(void)

        /* Make sure we have all the proper CPU support */
        if (validate_cpu()) {
-               puts("Unable to boot - please use a kernel appropriate "
-                    "for your CPU.\n");
-               die();
+               if(cmdline_find_option_bool("fixpae"))
+                       puts("fixpae bootparam active. Skipping CPU "
+                            "validation and continuing Kernel execution\n");
+               else {
+                       puts("Unable to boot - please use a kernel appropriate "
+                            "for your CPU.\n"
+                            "Hint: CPU`s like Pentium M may incorrectly report "
+                            "on PAE incapability, so you may try booting with "
+                            "fixpae bootparam as a workaround.\n");
+                       die();
+               }
        }

        /* Tell the BIOS what CPU mode we intend to run in. */
diff -uprN linux-source-3.11.0.orig/arch/x86/kernel/cpu/proc.c linux-source-3.11.0/arch/x86/kernel/cpu/proc.c
--- linux-source-3.11.0.orig/arch/x86/kernel/cpu/proc.c 2013-09-02 22:46:10.000000000 +0200
+++ linux-source-3.11.0/arch/x86/kernel/cpu/proc.c      2013-11-26 21:15:53.961267903 +0100
@@ -4,6 +4,17 @@
 #include <linux/seq_file.h>
 #include <linux/cpufreq.h>

+/* fixpae kernelparam workaround, see kernel-parameters.txt */
+static int fixpaeflag = 0;
+
+static int __init fixpae(char *s)
+{
+       fixpaeflag=1;
+        return 1;
+}
+
+__setup("fixpae", fixpae);
+
 /*
  *     Get CPU information for use by the procfs.
  */
@@ -96,6 +107,8 @@ static int show_cpuinfo(struct seq_file
        show_cpuinfo_misc(m, c);

        seq_printf(m, "flags\t\t:");
+       if(fixpaeflag)
+               seq_printf(m, " pae");
        for (i = 0; i < 32*NCAPINTS; i++)
                if (cpu_has(c, i) && x86_cap_flags[i] != NULL)
                        seq_printf(m, " %s", x86_cap_flags[i]);
diff -uprN linux-source-3.11.0.orig/Documentation/kernel-parameters.txt linux-source-3.11.0/Documentation/kernel-parameters.txt
--- linux-source-3.11.0.orig/Documentation/kernel-parameters.txt        2013-10-23 19:26:00.000000000 +0200
+++ linux-source-3.11.0/Documentation/kernel-parameters.txt     2013-11-26 21:13:28.515313678 +0100
@@ -900,6 +900,14 @@ bytes respectively. Such letter suffixes
                        Format: <interval>,<probability>,<space>,<times>
                        See also Documentation/fault-injection/.

+       fixpae          [x86] Workaround for a nasty PAE issue with older CPU`s
+                       like Pentium M, as they may report PAE incapability
+                       although they support it. This bootparam adds a fake
+                       pae entry to the flags section in /proc/cpuinfo and
+                       skips the validate_cpu() routine in arch/x86/boot/main.c
+                       This is necesssary as major distros nowadays only ship
+                       PAE Kernels for x86 and there is no easy workaround.
+
        floppy=         [HW]
                        See Documentation/blockdev/floppy.txt.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to syslinux in Ubuntu.
https://bugs.launchpad.net/bugs/930447

Title:
  Unable to start Ubuntu 12.04 live CD with syslinux loader on Pentium M
  x86 Laptop due to bug in PAE kernel, initramfs or syslinux

Status in “syslinux” package in Ubuntu:
  Confirmed
Status in Baltix GNU/Linux:
  Triaged

Bug description:
  Ubuntu 12.04 doesn't start from Desktop CD or USB with syslinux boot
  loader on Pentium M 1.6Ghz or faster Pentium M CPU - displays error
  message about missing PAE feature in CPU, but *the same* *Ubuntu
  12.04* Desktop CD/LiveUSB starts fine on *the same CPU* (and same PAE
  kernel) if GRUB boot loader is used, for example when WUBI or LiveUSB
  with GRUB boot loader, like Multisystem
  (http://liveusb.info/dotclear/index.php?pages/install ) is used!

  The error message is:
  "This kernel requires the following features not present on the CPU: pae.
  Unable to boot - please use a kernel appropriate for you CPU."

  THIS IS AN IMPORTANT REGRESSION! People are able to install and successfully use Ubuntu 12.04 on such pretty new hardware, like IBM Thinkpad T42 laptop with Pentium M 1700Mhz processor, but the bug in syslinux (or something related) forbids Ubuntu 12.04 installation.
  This bug is reproducible on lots of computers, there are several log files and /proc/cpuinfo file attached to this bugreport, AFAIK it's enough to reopen this bug.

  ---
  ApportVersion: 1.23-0ubuntu4
  Architecture: i386
  CurrentDmesg: Error: command ['sh', '-c', 'dmesg | comm -13 --nocheck-order /var/log/dmesg -'] failed with exit code 1: comm: /var/log/dmesg: Permission denied
  MachineType: IBM 2373PPU
  dmi.bios.date: 06/18/2007
  dmi.bios.vendor: IBM
  dmi.bios.version: 1RETDRWW (3.23 )
  dmi.board.name: 2373PPU
  dmi.board.vendor: IBM
  dmi.board.version: Not Available
  dmi.chassis.asset.tag: No Asset Information
  dmi.chassis.type: 10
  dmi.chassis.vendor: IBM
  dmi.chassis.version: Not Available
  dmi.modalias: dmi:bvnIBM:bvr1RETDRWW(3.23):bd06/18/2007:svnIBM:pn2373PPU:pvrThinkPadT42:rvnIBM:rn2373PPU:rvrNotAvailable:cvnIBM:ct10:cvrNotAvailable:
  dmi.product.name: 2373PPU
  dmi.product.version: ThinkPad T42
  dmi.sys.vendor: IBM

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/syslinux/+bug/930447/+subscriptions



More information about the foundations-bugs mailing list