Kernel install fails due PAE checks

Bug #1307105 reported by Jii
76
This bug affects 10 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Triaged
Low
Andy Whitcroft

Bug Description

[TRIAGE NOTE]
When a user boots Ubuntu Live/Install media with 'forcepae' option, the option should automatically be added to /etc/default/grub, or kernel upgrades will refuse to install when they do not see pae capability in cpuinfo.

[ORIGINAL REPORT]
On Thinkpad T42 with Pentium M processor linux image upgrade fails with message "This kernel does not support a non-PAE CPU.". System was installed from ubuntu-14.04-beta2-desktop-i386.iso with "forcepae" kernel option. After install, system works, but cannot be upgraded to laters kernel.

    root@t42:/boot# apt-get upgrade
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    You might want to run 'apt-get -f install' to correct these.
    The following packages have unmet dependencies:
     linux-image-extra-3.13.0-24-generic : Depends: linux-image-3.13.0-24-generic but it is not installed
     linux-image-generic : Depends: linux-image-3.13.0-24-generic but it is not installed
    E: Unmet dependencies. Try using -f.

    root@t42:/boot# apt-get install -f
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Correcting dependencies... Done
    The following extra packages will be installed:
      linux-image-3.13.0-24-generic
    Suggested packages:
      fdutils linux-doc-3.13.0 linux-source-3.13.0 linux-tools
    The following NEW packages will be installed:
      linux-image-3.13.0-24-generic
    0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
    3 not fully installed or removed.
    Need to get 0 B/14.6 MB of archives.
    After this operation, 32.3 MB of additional disk space will be used.
    Do you want to continue? [Y/n]
    (Reading database ... 196089 files and directories currently installed.)
    Preparing to unpack .../linux-image-3.13.0-24-generic_3.13.0-24.46_i386.deb ...
    This kernel does not support a non-PAE CPU.
    dpkg: error processing archive /var/cache/apt/archives/linux-image-3.13.0-24-generic_3.13.0-24.46_i386.deb (--unpack):
     subprocess new pre-installation script returned error exit status 1
    Examining /etc/kernel/postrm.d .
    run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-24-generic /boot/vmlinuz-3.13.0-24-generic
    run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-24-generic /boot/vmlinuz-3.13.0-24-generic
    Errors were encountered while processing:
     /var/cache/apt/archives/linux-image-3.13.0-24-generic_3.13.0-24.46_i386.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)

Jii (jii123a)
affects: xserver-xorg-video-savage (Ubuntu) → linux-meta (Ubuntu)
Brad Figg (brad-figg)
affects: linux-meta (Ubuntu) → linux (Ubuntu)
Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1307105

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: trusty
Revision history for this message
Jii (jii123a) wrote :

The apport-collect is not installed and apt-get refuses to install it until the unmet depedencies problem is first resolved (linux-image-generic).

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Daniel Letzeisen (dtl131) wrote :

Are you still booting with the forcepae option? If not, you'll need to add it.

gksu gedit /etc/default/grub

Make GRUB_CMDLINE_LINUX_DEFAULT line look like:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash forcepae"

Save. Quit. Run:
sudo update-grub

Reboot and try the update again.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Jii (jii123a) wrote :

No, I was not booting with forcepae option. After installer, the system was fully operational so I didn't know there was need to add it. Notes in https://help.ubuntu.com/community/EnablingPAE didn't either suggest such, maybe instructions should be added there to help other people.

Now after adding the forcepae to /etc/default/grub, further kernel upgrades were properly installed.

Thank you very much !

Changed in linux (Ubuntu):
importance: Undecided → Low
status: Incomplete → Triaged
description: updated
description: updated
Revision history for this message
sudodus (nio-wiklund) wrote :

I was testing the Lubuntu Trusty desktop i386 final iso file and had the message 'This kernel does not support a non-PAE CPU' when I tried to install the low latency kernel.

Please make the installer (or some other program part) add forcepae

into /etc/default/grub and from there into /boot/grub/grub.cfg

so that it will be possible to install and upgrade kernels.

The *big* problem will arrive, when new kernel versions arrive, and the system wants to upgrade to them. And we can expect quite a lot of new users who come to Lubuntu and Xubuntu after the end of life of Windows XP. Let us save trouble for these new users by adding forcepae automatically to the installed system :-)

-o-

Just to confirm my suggested solution, I added forcepae to

/etc/default/grub

and ran

sudo update-grub

After reboot it was possible to install the new kernel (in this somewhat synthetic case the low-latency kernel), and the computer can run with it (both kernels work).

Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1307105

tags: added: iso-testing
Revision history for this message
Colin Watson (cjwatson) wrote :

Just put the forcepae option after the "--" entry on the installer command line and it will be copied to the target system. The "--" entry defines the boundary between options which are specific to the installer and ones that are copied to the target system.

Revision history for this message
sudodus (nio-wiklund) wrote :

This is new and positive information :-)

I did not know the function of -- and I think many people need to be informed about it.

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

so, the post-inst on the kernel checks to see that cpu does not have PAE and then bails the upgrade.
However, it could check that even though cpu has no PAE support yet the currently running kernel does have PAE config option enabled and continue with the upgrade.

Changed in linux (Ubuntu):
assignee: nobody → Andy Whitcroft (apw)
Revision history for this message
Andy Whitcroft (apw) wrote :

If the kernel is booted, then forcepae must have been supplied, and if it is supplied then PAE should be flagged in cpuinfo. It looks like this is only about copying forcepae across. See comment #8 for that.

Revision history for this message
sudodus (nio-wiklund) wrote :

I can confirm that Colin Watson's advice in post #8 works.

Revision history for this message
Jii (jii123a) wrote :

Comment to #11 : Actually the system works with or without the forcepae at boot arguments. When option is removed from /etc/grup/default (and grub updated), everything still works, but /proc/cpuinfo just does not show the pae over there.

System bootet without forcepae option:
    foo@t42:~$ cat /proc/cpuinfo
    processor : 0
    vendor_id : GenuineIntel
    cpu family : 6
    model : 13
    model name : Intel(R) Pentium(R) M processor 1.70GHz
    stepping : 6
    microcode : 0x18
    cpu MHz : 1700.000
    cache size : 2048 KB
    physical id : 0
    siblings : 1
    core id : 0
    cpu cores : 1
    apicid : 0
    initial apicid : 0
    fdiv_bug : no
    f00f_bug : no
    coma_bug : no
    fpu : yes
    fpu_exception : yes
    cpuid level : 2
    wp : yes
    flags : fpu vme de pse tsc msr mce cx8 sep mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ss tm pbe bts est tm2
    bogomips : 3397.00
    clflush size : 64
    cache_alignment : 64
    address sizes : 36 bits physical, 32 bits virtual
    power management:

    foo@t42:~$ uname -a
    Linux t42 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:08:14 UTC 2014 i686 i686 i686 GNU/Linux

Revision history for this message
Daniel Letzeisen (dtl131) wrote :

I'm not sure if a software fix is appropriate here. Should the ubiquity installer do a special check to see if it's been s tarted with forcepae and copy that option to the install regardless of what side of the '--' the user put it on?

If not, then this really isn't a bug per se, as better documentation by those suggesting the forcepae option would be the appropriate fix.

Revision history for this message
Chris Bainbridge (chris-bainbridge) wrote :

Jii wrote:
> No, I was not booting with forcepae option. After installer, the system was fully operational so I didn't know there was need to add it.

How did you boot the installer? Normally syslinux will boot the kernel in 16-bit mode and you would get the forcepae error message.

Andy Whitcroft wrote:
> If the kernel is booted, then forcepae must have been supplied

This is not always true. A PAE kernel will boot on a PAE capable Pentium M without forcepae if the boot loader skips the 16-bit entry code of the Linux kernel. This is the case with a default install of grub on Ubuntu - which is why many Pentium M users who had installed Ubuntu before the switch to PAE-only didn't have any problems when they got upgraded (but later ran into problems when the check for pae in /proc/cpuinfo was added to the linux-image preinst). You can force grub to boot the kernel in 16-bit mode by using the linux16 and initrd16 commands instead of plain linux and initrd; using the 16-bit boot path seems to be preferred by upstream since then the kernel CPU checks get run, but it is probably too late for Ubuntu to switch.

Daniel Letzeisen wrote:
> Should the ubiquity installer do a special check to see if it's been s tarted with forcepae

Could do, the check is not hard (running pae kernel and (forcepae or no pae in cpuinfo flags).

It would be nice for the user to not have to bother with forcepae; I would have preferred to enable it automatically rather than having the kernel parameter, but the x86 maintainers thought that a user should have to consent to operating their CPU out of spec. If Ubuntu were happy with assuming consent, then you could just add it to the default pae-kernel boot parameters and make the whole thing invisible to the user.

Revision history for this message
sudodus (nio-wiklund) wrote :

Yes, it would be nice for the user to not have to bother with forcepae to run computers with Pentium M and Celeron M CPUs.

But I think this is a great improvement. Forcepae (used according to Colin Watson's advice in post #8) makes it much easier to use Ubuntu flavours in version 14.04 LTS compared to the previous releases. This advice is made clear in the following link

https://help.ubuntu.com/community/PAE

Revision history for this message
Luiz Angelo Daros de Luca (luizluca) wrote :

Ubuntu, just add forcepae for if used in install

Revision history for this message
amjjawad  (amjjawad) wrote :

Hi,

Following with: https://lists.ubuntu.com/archives/ubuntu-quality/2014-October/005515.html

I have tried to follow the advice in comment #8 but this is what I get.

I am trying to boot from Lubuntu 14.04 LiveUSB

Note that: before reading this bug report and come across comment #8 .. I was using:

quiet splash forcepae

without "--"

and everything was fine but my problem started after upgrading 14.04 to 14.04.1

Now, with "--", I am stuck with the attached message :(

Revision history for this message
Chris Bainbridge (chris-bainbridge) wrote : Re: [Bug 1307105] Re: Kernel install fails due PAE checks

Amjjawad, Your screenshot shows you used "--forcepae". It should be "--
forcepae" (note the space).

Revision history for this message
Daniel Risacher (junk-launchpad-risacher) wrote :

FWIW - the rebooting part of comment #8 is essential.

Revision history for this message
martinr (martinr1111) wrote :

I also ran into this problem with Xubuntu 16.04 LTS.
I'm running an Intel Pentium M 735, Dothan, (2MB L2 Cache, 1.70 GHz, 400 MHz FSB) (CPUID: 6.D.6 (hex) or 06D6h or 6.13.6 (dec)).

When I lookup the specification on the Intel site, then it says:
Physical Address Extensions (PAE) 32-bit is available.
(source: http://ark.intel.com/products/27588/Intel-Pentium-M-Processor-735-2M-Cache-1_70A-GHz-400-MHz-FSB#@specifications )

Are there any adverse effects known about the boot parameter "forcepae"?

What I need to know is if the compiled stock kernel / compiler implemented work-arounds for the W25 and W40 errata* to the Dothan (stepping B1) family of processors.
If that is so, then the PAE flag can be set / forced without problems.

* Intel Celeron M Specification Update errata
W25: Upper Four PAT Entries Not Usable with Mode B or Mode C Paging

W40: INIT Does Not Clear Global Entries in the TLB
Problem: INIT may not flush a TLB entry when:
1. The processor is in protected mode with paging enabled and the page global
enable flag is set (PGEbit of CR4 register)
2. G bit for the page table entry is set
3. TLB entry is present in TLB when INIT occurs
Implication: Software may encounter unexpected page fault or incorrect address
translation due to a TLB entry erroneously left in TLB after INIT.
Workaround: Write to CR3, CR4 (settingbits PSE, PGE or PAE) or CR0 (setting bits PG or PE)
registers before writing to memory early in BIOS code to clear all the global entries
from TLB.
(source: http://download.intel.com/support/processors/mobile/celeron/sb/30030336.pdf )

See also: http://ubuntuforums.org/showthread.php?t=2326769&p=13499191#post13499191

Revision history for this message
Chris Bainbridge (chris-bainbridge) wrote :

> Physical Address Extensions (PAE) 32-bit is available.

If the pae flag is not present in /proc/cpuinfo then PAE is not enabled on your particular CPU, even if it is available for other CPUs in the same family. The CPU indicates PAE support (or not) in the result of the CPUID instruction, which is hardcoded in the processor microcode.

> Are there any adverse effects known about the boot parameter "forcepae"?

I have not seen any reports of adverse effects, but given the small number of users and non-extensive testing it is possible.

> If that is so, then the PAE flag can be set / forced without problems.

afaik those errata would not be a problem as Linux does not use PAT on Pentium M, and the TLB is cleared on init. But there may be other issues or internal errata that Intel hasn't published. Nobody knows why Intel disabled PAE for these processors. As the docs say:

 forcepae [X86-32]
   Forcefully enable Physical Address Extension (PAE).
   Many Pentium M systems disable PAE but may have a
   functionally usable PAE implementation.
   Warning: use of this parameter will taint the kernel
   and may cause unknown problems.

The CPU is run out-of-spec so there are no guarantees. If this is not acceptable then the next easiest workaround is to compile your own kernel with PAE disabled (CONFIG_X86_PAE=n).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.