6. Installing from scratch

ACPI is constantly being revised. It is currently not available in the 2.4.x series kernels but will be released into the 2.5.x version kernels (or possibly not until 2.6). This means all kernels released before 2.5.x must be patched. The patches are available from acpi.sourceforge.net. You need to get the patch that exactly matches the version of the kernel that you are running. Since this is the "install from scratch" section I will assume you know exactly which kernel you will be installing.

6.1. Choosing a kernel

This document was written for the 2.4.20 kernel. Since that time the 2.4.21 kernel has been released as the latest stable kernel. There have been mixed levels of success with 2.4.21 and the latest ACPI patch. For now I recommend sticking to the 2.4.20 kernel and its latest patch: 2002.12.12. Others recommend doing other things. A Google through the debian-user, debian-laptop and acpi-support email lists will be of help to you if you're not sure what you should do for your specific system.

Note

For sanity's sake this document will use the 2.4.20 kernel as an example, substitute your own kernel version as appropriate.

It is important to use the latest version of the ACPI patch. Some distributions have already patched their kernels. This is the case for Debian, and may be the case for others. For more information on the patches that have been applied to the Debian kernel source package scan through: /usr/src/kernel-source-<version>/README.Debian. If you are not using Debian you will probably still be able to find an equivalent file for your distribution.

A user on acpi-support confirmed that I shouldn't need any of the additional patches that have been applied to the kernel to run my laptop. If you are running a production-level server and/or are serving web pages to the internet, you should really apply any additional security patches.

Warning

If a kernel has had other patches applied to it, you may have problems applying the ACPI patch. Of course, an ACPI patch should not be applied to a kernel that is already patched for ACPI. As long as there has not been an ACPI patch applied to the kernel it should be possible to apply one now. Depending on the patches applied, you may need to modify some of the Makefiles for your patch to be successful. This is beyond my current grasp of reality so it is not covered in this document.

6.1.1. Debian-ized pre-patched kernel

If you would prefer to use a Debian-ized kernel instead of a fresh one, maxx has provided a pre-patched kernel-source package with the latest patch for the 2.4.20 kernel. This would be instead of downloading a fresh (non-patched) kernel from www.kernel.org. He sent me an email with the following details:

 

I took the kernel-source 2.4.20-8 from unstable, removed the ACPI changes [i.e. the old patch] and applied acpi-20021212-2.4.20.diff.gz from acpi.sf.net since the vanilla 2.4.20 HAS several security leaks (ptrace, hash table, ...).

You can find the package at http://people.debian.org/~maxx/kernel-source-2.4.20/ (I didn't upload the .orig.tar.gz since you can get it from any debian mirror and the .deb is already big enough)

 
--maxx 

Warning

I have not tested these packages. You may or may not have any luck with them. Please don't email me asking about them, ask maxx instead.