个人工具

UbuntuHelp:EnablingPAE

来自Ubuntu中文

Wikibot讨论 | 贡献2009年11月17日 (二) 19:01的版本 (创建新页面为 '{{From|https://help.ubuntu.com/community/EnablingPAE}} {{Languages|UbuntuHelp:EnablingPAE}} #Enabling_PAE === Why? === Originally, 32 bit operating systems could only access up ...')

(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳转至: 导航, 搜索
  1. Enabling_PAE

Why?

Originally, 32 bit operating systems could only access up to 4 Gb of memory, and for various reasons, some of that memory isn't available, leaving some people with 32 bit operating systems with only around 3 Gb of memory. Luckily, Ubuntu isn't just any operating system, it supports Physical Address Extension (and doesn't cripple it, unlike certain other operating systems). Physical Address Extension allows 32 bit operating systems to use up to 64 Gb of memory, and is supported on all Intel processors starting with the Pentium Pro, and all AMD processors since the Athlon (and if you have more than 4 Gb of memory you probably have a processor that supports PAE). Unfortunately, PAE is not enabled by default in Ubuntu, but it's easy to do. All we need to do is install a PAE enabled kernel, like the server kernel. From what I've read, there shouldn't be a speed difference between 32 bit Ubuntu generic vs 32 bit Ubuntu server (PAE), but 64 bit Ubuntu generic should out-perform both. If you have the option, you should probably just install the amd64 version of Ubuntu. However, if you want to use all of your 3+ Gb of memory Of course, 64 bit processors will do most things faster in 64 bit mode, so it's always recommended that you use the amd64 version of Ubuntu if you can, but for various reasons, some people need to run Ubuntu in 32 bit mode.

How

First, turn off any restricted drivers. We'll turn them back on once we're done, but if you don't turn them off first, X won't start, and that's bad. Just go into System -> Administration -> Hardware Drivers and turn off your graphics drivers. Next we just install the server kernel:

sudo aptitude install linux-image-server

In Karmic, the server kernel has been replaced by the PAE kernel:

sudo aptitude install linux-image-generic-pae

You might also want the restricted modules:

sudo aptitude install linux-restricted-modules-server

It's worth nnoting that Karmic replaced linux-restricted in favor of dkms. Now restart, and your first boot option should be ubuntu-something-server (-generic-pae in Karmic). Once you're at the desktop, re-enable your restricted drivers (System -> Administration -> Hardware Drivers). If everything worked right, you should have 4 Gb of memory enabled. You can use the system monitor to confirm this: System -> Administration -> System Monitor. The first tab shows usable memory.

Removing old kernels

If everything went ok, you probably don't want Ubuntu to keep installing updates for the generic kernel, so remove the generic kernel meta-package:

sudo aptitude remove linux-image-generic

If you want to remove all of the old kernels from your boot menu, it seems like you have to do it all manually:

sudo aptitude remove linux-image-<numbers go here>-generic

There should be some way of doing wildcards in aptitude, but I can't figure it out. You basically want to remove linux-image*generic, but I don't know how.

Something went wrong

If something went wrong, just remove the server kernel and use your old kernels. They should still be there. Make sure to turn off the restricted drivers when switching between them. You can remove the server kernel with:

sudo aptitude remove linux-image-server linux-image-<version number goes here>-server