2018-06-03 11:16:09 -07:00
|
|
|
.. _readme:
|
|
|
|
|
2022-08-24 01:08:36 -07:00
|
|
|
Linux kernel release 6.x <http://kernel.org/>
|
2016-09-21 05:09:49 -07:00
|
|
|
=============================================
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2022-08-24 01:08:36 -07:00
|
|
|
These are the release notes for Linux version 6. Read them carefully,
|
2005-04-16 15:20:36 -07:00
|
|
|
as they tell you what this is all about, explain how to install the
|
2016-04-03 00:34:48 -07:00
|
|
|
kernel, and what to do if something goes wrong.
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2016-09-21 05:09:49 -07:00
|
|
|
What is Linux?
|
|
|
|
--------------
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-01-14 11:56:28 -07:00
|
|
|
Linux is a clone of the operating system Unix, written from scratch by
|
|
|
|
Linus Torvalds with assistance from a loosely-knit team of hackers across
|
|
|
|
the Net. It aims towards POSIX and Single UNIX Specification compliance.
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-01-14 11:56:28 -07:00
|
|
|
It has all the features you would expect in a modern fully-fledged Unix,
|
|
|
|
including true multitasking, virtual memory, shared libraries, demand
|
|
|
|
loading, shared copy-on-write executables, proper memory management,
|
|
|
|
and multistack networking including IPv4 and IPv6.
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2017-01-10 11:28:40 -07:00
|
|
|
It is distributed under the GNU General Public License v2 - see the
|
2016-04-03 00:34:48 -07:00
|
|
|
accompanying COPYING file for more details.
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2016-09-21 05:09:49 -07:00
|
|
|
On what hardware does it run?
|
|
|
|
-----------------------------
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2006-01-14 11:56:28 -07:00
|
|
|
Although originally developed first for 32-bit x86-based PCs (386 or higher),
|
|
|
|
today Linux also runs on (at least) the Compaq Alpha AXP, Sun SPARC and
|
2006-12-06 16:45:58 -07:00
|
|
|
UltraSPARC, Motorola 68000, PowerPC, PowerPC64, ARM, Hitachi SuperH, Cell,
|
2018-03-09 04:02:36 -07:00
|
|
|
IBM S/390, MIPS, HP PA-RISC, Intel IA-64, DEC VAX, AMD x86-64 Xtensa, and
|
|
|
|
ARC architectures.
|
2006-01-14 11:56:28 -07:00
|
|
|
|
|
|
|
Linux is easily portable to most general-purpose 32- or 64-bit architectures
|
|
|
|
as long as they have a paged memory management unit (PMMU) and a port of the
|
|
|
|
GNU C compiler (gcc) (part of The GNU Compiler Collection, GCC). Linux has
|
|
|
|
also been ported to a number of architectures without a PMMU, although
|
|
|
|
functionality is then obviously somewhat limited.
|
2006-12-06 16:45:58 -07:00
|
|
|
Linux has also been ported to itself. You can now run the kernel as a
|
|
|
|
userspace application - this is called UserMode Linux (UML).
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2016-09-21 05:09:49 -07:00
|
|
|
Documentation
|
|
|
|
-------------
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
- There is a lot of documentation available both in electronic form on
|
|
|
|
the Internet and in books, both Linux-specific and pertaining to
|
|
|
|
general UNIX questions. I'd recommend looking into the documentation
|
|
|
|
subdirectories on any Linux FTP site for the LDP (Linux Documentation
|
|
|
|
Project) books. This README is not meant to be documentation on the
|
|
|
|
system: there are much better sources available.
|
|
|
|
|
|
|
|
- There are various README files in the Documentation/ subdirectory:
|
2016-04-03 00:34:48 -07:00
|
|
|
these typically contain kernel-specific installation notes for some
|
Drop all 00-INDEX files from Documentation/
This is a respin with a wider audience (all that get_maintainer returned)
and I know this spams a *lot* of people. Not sure what would be the correct
way, so my apologies for ruining your inbox.
The 00-INDEX files are supposed to give a summary of all files present
in a directory, but these files are horribly out of date and their
usefulness is brought into question. Often a simple "ls" would reveal
the same information as the filenames are generally quite descriptive as
a short introduction to what the file covers (it should not surprise
anyone what Documentation/sched/sched-design-CFS.txt covers)
A few years back it was mentioned that these files were no longer really
needed, and they have since then grown further out of date, so perhaps
it is time to just throw them out.
A short status yields the following _outdated_ 00-INDEX files, first
counter is files listed in 00-INDEX but missing in the directory, last
is files present but not listed in 00-INDEX.
List of outdated 00-INDEX:
Documentation: (4/10)
Documentation/sysctl: (0/1)
Documentation/timers: (1/0)
Documentation/blockdev: (3/1)
Documentation/w1/slaves: (0/1)
Documentation/locking: (0/1)
Documentation/devicetree: (0/5)
Documentation/power: (1/1)
Documentation/powerpc: (0/5)
Documentation/arm: (1/0)
Documentation/x86: (0/9)
Documentation/x86/x86_64: (1/1)
Documentation/scsi: (4/4)
Documentation/filesystems: (2/9)
Documentation/filesystems/nfs: (0/2)
Documentation/cgroup-v1: (0/2)
Documentation/kbuild: (0/4)
Documentation/spi: (1/0)
Documentation/virtual/kvm: (1/0)
Documentation/scheduler: (0/2)
Documentation/fb: (0/1)
Documentation/block: (0/1)
Documentation/networking: (6/37)
Documentation/vm: (1/3)
Then there are 364 subdirectories in Documentation/ with several files that
are missing 00-INDEX alltogether (and another 120 with a single file and no
00-INDEX).
I don't really have an opinion to whether or not we /should/ have 00-INDEX,
but the above 00-INDEX should either be removed or be kept up to date. If
we should keep the files, I can try to keep them updated, but I rather not
if we just want to delete them anyway.
As a starting point, remove all index-files and references to 00-INDEX and
see where the discussion is going.
Signed-off-by: Henrik Austad <henrik@austad.us>
Acked-by: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Just-do-it-by: Steven Rostedt <rostedt@goodmis.org>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Acked-by: Paul Moore <paul@paul-moore.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Mark Brown <broonie@kernel.org>
Acked-by: Mike Rapoport <rppt@linux.vnet.ibm.com>
Cc: [Almost everybody else]
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2018-09-03 15:15:23 -07:00
|
|
|
drivers for example. Please read the
|
2016-10-18 05:12:27 -07:00
|
|
|
:ref:`Documentation/process/changes.rst <changes>` file, as it
|
2005-04-16 15:20:36 -07:00
|
|
|
contains information about the problems, which may result by upgrading
|
|
|
|
your kernel.
|
|
|
|
|
2016-09-21 05:09:49 -07:00
|
|
|
Installing the kernel source
|
|
|
|
----------------------------
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
- If you install the full sources, put the kernel tarball in a
|
2015-12-05 12:50:10 -07:00
|
|
|
directory where you have permissions (e.g. your home directory) and
|
2016-09-21 05:09:49 -07:00
|
|
|
unpack it::
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2022-08-24 01:08:36 -07:00
|
|
|
xz -cd linux-6.x.tar.xz | tar xvf -
|
2005-10-30 16:03:19 -07:00
|
|
|
|
2012-04-01 15:27:30 -07:00
|
|
|
Replace "X" with the version number of the latest kernel.
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
Do NOT use the /usr/src/linux area! This area has a (usually
|
|
|
|
incomplete) set of kernel headers that are used by the library header
|
|
|
|
files. They should match the library, and not get messed up by
|
|
|
|
whatever the kernel-du-jour happens to be.
|
|
|
|
|
2022-08-24 01:08:36 -07:00
|
|
|
- You can also upgrade between 6.x releases by patching. Patches are
|
2015-03-03 07:08:03 -07:00
|
|
|
distributed in the xz format. To install by patching, get all the
|
|
|
|
newer patch files, enter the top level directory of the kernel source
|
2022-08-24 01:08:36 -07:00
|
|
|
(linux-6.x) and execute::
|
2012-04-01 17:46:58 -07:00
|
|
|
|
2022-08-24 01:08:36 -07:00
|
|
|
xz -cd ../patch-6.x.xz | patch -p1
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2019-02-12 07:41:01 -07:00
|
|
|
Replace "x" for all versions bigger than the version "x" of your current
|
2016-09-21 05:09:49 -07:00
|
|
|
source tree, **in_order**, and you should be ok. You may want to remove
|
2012-04-01 15:27:30 -07:00
|
|
|
the backup files (some-file-name~ or some-file-name.orig), and make sure
|
|
|
|
that there are no failed patches (some-file-name# or some-file-name.rej).
|
2012-04-03 12:20:02 -07:00
|
|
|
If there are, either you or I have made a mistake.
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2022-08-24 01:08:36 -07:00
|
|
|
Unlike patches for the 6.x kernels, patches for the 6.x.y kernels
|
2005-11-13 17:07:44 -07:00
|
|
|
(also known as the -stable kernels) are not incremental but instead apply
|
2022-08-24 01:08:36 -07:00
|
|
|
directly to the base 6.x kernel. For example, if your base kernel is 6.0
|
|
|
|
and you want to apply the 6.0.3 patch, you must not first apply the 6.0.1
|
|
|
|
and 6.0.2 patches. Similarly, if you are running kernel version 6.0.2 and
|
|
|
|
want to jump to 6.0.3, you must first reverse the 6.0.2 patch (that is,
|
|
|
|
patch -R) **before** applying the 6.0.3 patch. You can read more on this in
|
2016-10-18 05:12:27 -07:00
|
|
|
:ref:`Documentation/process/applying-patches.rst <applying_patches>`.
|
2005-11-13 17:07:44 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
Alternatively, the script patch-kernel can be used to automate this
|
|
|
|
process. It determines the current kernel version and applies any
|
2016-09-21 05:09:49 -07:00
|
|
|
patches found::
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-04-01 18:07:52 -07:00
|
|
|
linux/scripts/patch-kernel linux
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
The first argument in the command above is the location of the
|
|
|
|
kernel source. Patches are applied from the current directory, but
|
|
|
|
an alternative directory can be specified as the second argument.
|
|
|
|
|
2016-09-21 05:09:49 -07:00
|
|
|
- Make sure you have no stale .o files and dependencies lying around::
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-04-01 18:07:52 -07:00
|
|
|
cd linux
|
|
|
|
make mrproper
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
You should now have the sources correctly installed.
|
|
|
|
|
2016-09-21 05:09:49 -07:00
|
|
|
Software requirements
|
|
|
|
---------------------
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2022-08-24 01:08:36 -07:00
|
|
|
Compiling and running the 6.x kernels requires up-to-date
|
2005-04-16 15:20:36 -07:00
|
|
|
versions of various software packages. Consult
|
2016-10-18 05:12:27 -07:00
|
|
|
:ref:`Documentation/process/changes.rst <changes>` for the minimum version numbers
|
2016-09-21 05:09:49 -07:00
|
|
|
required and how to get updates for these packages. Beware that using
|
2005-04-16 15:20:36 -07:00
|
|
|
excessively old versions of these packages can cause indirect
|
|
|
|
errors that are very difficult to track down, so don't assume that
|
|
|
|
you can just update packages when obvious problems arise during
|
|
|
|
build or operation.
|
|
|
|
|
2016-09-21 05:09:49 -07:00
|
|
|
Build directory for the kernel
|
|
|
|
------------------------------
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-04-01 17:31:33 -07:00
|
|
|
When compiling the kernel, all output files will per default be
|
2005-04-16 15:20:36 -07:00
|
|
|
stored together with the kernel source code.
|
2016-09-21 05:09:49 -07:00
|
|
|
Using the option ``make O=output/dir`` allows you to specify an alternate
|
2005-04-16 15:20:36 -07:00
|
|
|
place for the output files (including .config).
|
2016-09-21 05:09:49 -07:00
|
|
|
Example::
|
2012-04-01 17:46:58 -07:00
|
|
|
|
2022-08-24 01:08:36 -07:00
|
|
|
kernel source code: /usr/src/linux-6.x
|
2012-04-01 18:07:52 -07:00
|
|
|
build directory: /home/name/build/kernel
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2016-09-21 05:09:49 -07:00
|
|
|
To configure and build the kernel, use::
|
2012-04-01 17:46:58 -07:00
|
|
|
|
2022-08-24 01:08:36 -07:00
|
|
|
cd /usr/src/linux-6.x
|
2012-04-01 17:46:58 -07:00
|
|
|
make O=/home/name/build/kernel menuconfig
|
|
|
|
make O=/home/name/build/kernel
|
|
|
|
sudo make O=/home/name/build/kernel modules_install install
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2016-09-21 05:09:49 -07:00
|
|
|
Please note: If the ``O=output/dir`` option is used, then it must be
|
2005-04-16 15:20:36 -07:00
|
|
|
used for all invocations of make.
|
|
|
|
|
2016-09-21 05:09:49 -07:00
|
|
|
Configuring the kernel
|
|
|
|
----------------------
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
Do not skip this step even if you are only upgrading one minor
|
|
|
|
version. New configuration options are added in each release, and
|
|
|
|
odd problems will turn up if the configuration files are not set up
|
|
|
|
as expected. If you want to carry your existing configuration to a
|
2016-09-21 05:09:49 -07:00
|
|
|
new version with minimal work, use ``make oldconfig``, which will
|
2005-04-16 15:20:36 -07:00
|
|
|
only ask you for the answers to new questions.
|
|
|
|
|
2016-09-21 05:09:49 -07:00
|
|
|
- Alternative configuration commands are::
|
2012-04-01 17:46:58 -07:00
|
|
|
|
2012-04-01 18:07:52 -07:00
|
|
|
"make config" Plain text interface.
|
2012-04-01 17:46:58 -07:00
|
|
|
|
2012-04-01 18:07:52 -07:00
|
|
|
"make menuconfig" Text based color menus, radiolists & dialogs.
|
2012-04-01 17:46:58 -07:00
|
|
|
|
2012-04-01 18:07:52 -07:00
|
|
|
"make nconfig" Enhanced text based color menus.
|
2012-04-01 17:46:58 -07:00
|
|
|
|
2015-12-05 12:50:10 -07:00
|
|
|
"make xconfig" Qt based configuration tool.
|
2012-04-01 17:46:58 -07:00
|
|
|
|
2015-12-05 12:50:10 -07:00
|
|
|
"make gconfig" GTK+ based configuration tool.
|
2012-04-01 17:46:58 -07:00
|
|
|
|
2012-04-01 18:07:52 -07:00
|
|
|
"make oldconfig" Default all questions based on the contents of
|
|
|
|
your existing ./.config file and asking about
|
|
|
|
new config symbols.
|
2012-04-01 17:46:58 -07:00
|
|
|
|
2012-10-24 10:22:43 -07:00
|
|
|
"make olddefconfig"
|
|
|
|
Like above, but sets new symbols to their default
|
|
|
|
values without prompting.
|
|
|
|
|
2012-04-01 18:07:52 -07:00
|
|
|
"make defconfig" Create a ./.config file by using the default
|
|
|
|
symbol values from either arch/$ARCH/defconfig
|
|
|
|
or arch/$ARCH/configs/${PLATFORM}_defconfig,
|
|
|
|
depending on the architecture.
|
2012-04-01 17:46:58 -07:00
|
|
|
|
2012-04-01 18:07:52 -07:00
|
|
|
"make ${PLATFORM}_defconfig"
|
|
|
|
Create a ./.config file by using the default
|
|
|
|
symbol values from
|
|
|
|
arch/$ARCH/configs/${PLATFORM}_defconfig.
|
|
|
|
Use "make help" to get a list of all available
|
|
|
|
platforms of your architecture.
|
2012-04-01 17:46:58 -07:00
|
|
|
|
2012-04-01 18:07:52 -07:00
|
|
|
"make allyesconfig"
|
|
|
|
Create a ./.config file by setting symbol
|
|
|
|
values to 'y' as much as possible.
|
2012-04-01 17:46:58 -07:00
|
|
|
|
2012-04-01 18:07:52 -07:00
|
|
|
"make allmodconfig"
|
|
|
|
Create a ./.config file by setting symbol
|
|
|
|
values to 'm' as much as possible.
|
2012-04-01 17:46:58 -07:00
|
|
|
|
2012-04-01 18:07:52 -07:00
|
|
|
"make allnoconfig" Create a ./.config file by setting symbol
|
|
|
|
values to 'n' as much as possible.
|
2012-04-01 17:46:58 -07:00
|
|
|
|
2012-04-01 18:07:52 -07:00
|
|
|
"make randconfig" Create a ./.config file by setting symbol
|
|
|
|
values to random values.
|
2006-04-18 22:21:53 -07:00
|
|
|
|
2012-10-05 13:52:50 -07:00
|
|
|
"make localmodconfig" Create a config based on current config and
|
|
|
|
loaded modules (lsmod). Disables any module
|
|
|
|
option that is not needed for the loaded modules.
|
|
|
|
|
|
|
|
To create a localmodconfig for another machine,
|
|
|
|
store the lsmod of that machine into a file
|
|
|
|
and pass it in as a LSMOD parameter.
|
|
|
|
|
2020-05-12 08:36:07 -07:00
|
|
|
Also, you can preserve modules in certain folders
|
|
|
|
or kconfig files by specifying their paths in
|
|
|
|
parameter LMC_KEEP.
|
|
|
|
|
2012-10-05 13:52:50 -07:00
|
|
|
target$ lsmod > /tmp/mylsmod
|
|
|
|
target$ scp /tmp/mylsmod host:/tmp
|
|
|
|
|
2020-05-12 08:36:07 -07:00
|
|
|
host$ make LSMOD=/tmp/mylsmod \
|
|
|
|
LMC_KEEP="drivers/usb:drivers/gpu:fs" \
|
|
|
|
localmodconfig
|
2012-10-05 13:52:50 -07:00
|
|
|
|
|
|
|
The above also works when cross compiling.
|
|
|
|
|
|
|
|
"make localyesconfig" Similar to localmodconfig, except it will convert
|
2020-05-12 08:36:07 -07:00
|
|
|
all module options to built in (=y) options. You can
|
|
|
|
also preserve modules by LMC_KEEP.
|
2012-10-05 13:52:50 -07:00
|
|
|
|
2021-01-29 18:45:47 -07:00
|
|
|
"make kvm_guest.config" Enable additional options for kvm guest kernel
|
|
|
|
support.
|
2018-03-22 05:06:56 -07:00
|
|
|
|
2021-01-29 18:45:47 -07:00
|
|
|
"make xen.config" Enable additional options for xen dom0 guest kernel
|
|
|
|
support.
|
2018-03-22 05:06:56 -07:00
|
|
|
|
|
|
|
"make tinyconfig" Configure the tiniest possible kernel.
|
|
|
|
|
2008-02-29 15:21:53 -07:00
|
|
|
You can find more information on using the Linux kernel config tools
|
2019-06-12 10:52:48 -07:00
|
|
|
in Documentation/kbuild/kconfig.rst.
|
2008-02-29 15:21:53 -07:00
|
|
|
|
2016-09-21 05:09:49 -07:00
|
|
|
- NOTES on ``make config``:
|
2012-04-01 17:46:58 -07:00
|
|
|
|
2012-04-01 18:07:52 -07:00
|
|
|
- Having unnecessary drivers will make the kernel bigger, and can
|
|
|
|
under some circumstances lead to problems: probing for a
|
2017-01-10 11:28:40 -07:00
|
|
|
nonexistent controller card may confuse your other controllers.
|
2012-04-01 17:46:58 -07:00
|
|
|
|
2012-04-01 18:07:52 -07:00
|
|
|
- A kernel with math-emulation compiled in will still use the
|
|
|
|
coprocessor if one is present: the math emulation will just
|
|
|
|
never get used in that case. The kernel will be slightly larger,
|
|
|
|
but will work on different machines regardless of whether they
|
|
|
|
have a math coprocessor or not.
|
2012-04-01 17:46:58 -07:00
|
|
|
|
2012-04-01 18:07:52 -07:00
|
|
|
- The "kernel hacking" configuration details usually result in a
|
|
|
|
bigger or slower kernel (or both), and can even make the kernel
|
|
|
|
less stable by configuring some routines to actively try to
|
|
|
|
break bad code to find kernel problems (kmalloc()). Thus you
|
|
|
|
should probably answer 'n' to the questions for "development",
|
|
|
|
"experimental", or "debugging" features.
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2016-09-21 05:09:49 -07:00
|
|
|
Compiling the kernel
|
|
|
|
--------------------
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2021-09-13 10:29:44 -07:00
|
|
|
- Make sure you have at least gcc 5.1 available.
|
2016-10-18 05:12:27 -07:00
|
|
|
For more information, refer to :ref:`Documentation/process/changes.rst <changes>`.
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2024-02-07 10:10:07 -07:00
|
|
|
- Do a ``make`` to create a compressed kernel image. It is also possible to do
|
|
|
|
``make install`` if you have lilo installed or if your distribution has an
|
|
|
|
install script recognised by the kernel's installer. Most popular
|
|
|
|
distributions will have a recognized install script. You may want to
|
|
|
|
check your distribution's setup first.
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2012-04-01 17:31:33 -07:00
|
|
|
To do the actual install, you have to be root, but none of the normal
|
2005-04-16 15:20:36 -07:00
|
|
|
build should require that. Don't take the name of root in vain.
|
|
|
|
|
2016-09-21 05:09:49 -07:00
|
|
|
- If you configured any of the parts of the kernel as ``modules``, you
|
|
|
|
will also have to do ``make modules_install``.
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-02-29 15:21:53 -07:00
|
|
|
- Verbose kernel compile/build output:
|
|
|
|
|
2012-04-01 17:31:33 -07:00
|
|
|
Normally, the kernel build system runs in a fairly quiet mode (but not
|
2008-02-29 15:21:53 -07:00
|
|
|
totally silent). However, sometimes you or other kernel developers need
|
|
|
|
to see compile, link, or other commands exactly as they are executed.
|
2015-12-05 12:50:10 -07:00
|
|
|
For this, use "verbose" build mode. This is done by passing
|
2016-09-21 05:09:49 -07:00
|
|
|
``V=1`` to the ``make`` command, e.g.::
|
2008-02-29 15:21:53 -07:00
|
|
|
|
2012-04-01 18:07:52 -07:00
|
|
|
make V=1 all
|
2008-02-29 15:21:53 -07:00
|
|
|
|
|
|
|
To have the build system also tell the reason for the rebuild of each
|
2016-09-21 05:09:49 -07:00
|
|
|
target, use ``V=2``. The default is ``V=0``.
|
2008-02-29 15:21:53 -07:00
|
|
|
|
2016-04-03 00:34:48 -07:00
|
|
|
- Keep a backup kernel handy in case something goes wrong. This is
|
2005-04-16 15:20:36 -07:00
|
|
|
especially true for the development releases, since each new release
|
|
|
|
contains new code which has not been debugged. Make sure you keep a
|
|
|
|
backup of the modules corresponding to that kernel, as well. If you
|
|
|
|
are installing a new kernel with the same version number as your
|
|
|
|
working kernel, make a backup of your modules directory before you
|
2016-09-21 05:09:49 -07:00
|
|
|
do a ``make modules_install``.
|
2012-04-01 17:46:58 -07:00
|
|
|
|
2005-09-22 21:44:07 -07:00
|
|
|
Alternatively, before compiling, use the kernel config option
|
|
|
|
"LOCALVERSION" to append a unique suffix to the regular kernel version.
|
|
|
|
LOCALVERSION can be set in the "General Setup" menu.
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
- In order to boot your new kernel, you'll need to copy the kernel
|
2016-07-26 06:21:33 -07:00
|
|
|
image (e.g. .../linux/arch/x86/boot/bzImage after compilation)
|
2016-04-03 00:34:48 -07:00
|
|
|
to the place where your regular bootable kernel is found.
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2024-02-07 10:10:07 -07:00
|
|
|
- Booting a kernel directly from a storage device without the assistance
|
|
|
|
of a bootloader such as LILO or GRUB, is no longer supported in BIOS
|
|
|
|
(non-EFI systems). On UEFI/EFI systems, however, you can use EFISTUB
|
|
|
|
which allows the motherboard to boot directly to the kernel.
|
|
|
|
On modern workstations and desktops, it's generally recommended to use a
|
|
|
|
bootloader as difficulties can arise with multiple kernels and secure boot.
|
|
|
|
For more details on EFISTUB,
|
|
|
|
see "Documentation/admin-guide/efi-stub.rst".
|
|
|
|
|
|
|
|
- It's important to note that as of 2016 LILO (LInux LOader) is no longer in
|
|
|
|
active development, though as it was extremely popular, it often comes up
|
|
|
|
in documentation. Popular alternatives include GRUB2, rEFInd, Syslinux,
|
|
|
|
systemd-boot, or EFISTUB. For various reasons, it's not recommended to use
|
|
|
|
software that's no longer in active development.
|
|
|
|
|
|
|
|
- Chances are your distribution includes an install script and running
|
|
|
|
``make install`` will be all that's needed. Should that not be the case
|
|
|
|
you'll have to identify your bootloader and reference its documentation or
|
|
|
|
configure your EFI.
|
|
|
|
|
|
|
|
Legacy LILO Instructions
|
|
|
|
------------------------
|
|
|
|
|
|
|
|
|
|
|
|
- If you use LILO the kernel images are specified in the file /etc/lilo.conf.
|
|
|
|
The kernel image file is usually /vmlinuz, /boot/vmlinuz, /bzImage or
|
|
|
|
/boot/bzImage. To use the new kernel, save a copy of the old image and copy
|
|
|
|
the new image over the old one. Then, you MUST RERUN LILO to update the
|
|
|
|
loading map! If you don't, you won't be able to boot the new kernel image.
|
|
|
|
|
|
|
|
- Reinstalling LILO is usually a matter of running /sbin/lilo. You may wish
|
|
|
|
to edit /etc/lilo.conf to specify an entry for your old kernel image
|
|
|
|
(say, /vmlinux.old) in case the new one does not work. See the LILO docs
|
|
|
|
for more information.
|
|
|
|
|
|
|
|
- After reinstalling LILO, you should be all set. Shutdown the system,
|
2005-04-16 15:20:36 -07:00
|
|
|
reboot, and enjoy!
|
|
|
|
|
2024-02-07 10:10:07 -07:00
|
|
|
- If you ever need to change the default root device, video mode, etc. in the
|
|
|
|
kernel image, use your bootloader's boot options where appropriate. No need
|
|
|
|
to recompile the kernel to change these parameters.
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2016-04-03 00:34:48 -07:00
|
|
|
- Reboot with the new kernel and enjoy.
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2024-02-07 10:10:07 -07:00
|
|
|
|
2016-09-21 05:09:49 -07:00
|
|
|
If something goes wrong
|
|
|
|
-----------------------
|
2005-04-16 15:20:36 -07:00
|
|
|
|
docs: admin-guide: for kernel bugs refer to other kernel documentation
The current section 'If something goes wrong' makes a number of suggestions
for debugging, bug hunting and reporting issues, which are quite briefly
described in that section.
However, the suggestions are also well covered in other kernel
documentation or sometimes simply outdated. Here, each suggestion in that
section is summarized, and then followed with its assessment, and the
derived action for each suggestion:
- use MAINTAINERS and mailing list: covered in 'Reporting issues',
summarized in the short guide, detailed in its further section.
Reporting issues even provides some specific examples that guides
readers well through the needed steps. Refer to 'Reporting issues'.
- contact Linus Torvalds: probably outdated as currently described.
nevertheless covered in 'Reporting issues'. Reporting issues points out
to contact the relevant kernel maintainers first, and after some
patience and failed attempts with those maintainers, contacting Linus
Torvalds might be okay. Refer to 'Reporting issues'.
- tell what kernel, how to duplicate, the setup, if the problem is new
or old and when did you notice: covered in 'Reporting issues',
especially in Step-by-step guide how to report issues to the kernel
maintainers. Refer to 'Reporting issues'.
- duplicate kernel bug reports exactly: covered in 'Reporting issues',
especially in Write and send the report. Refer to 'Reporting issues'.
- read 'Bug hunting': keep this reference. Refer to 'Bug hunting'.
- compile the kernel with CONFIG_KALLSYMS: covered in 'Reporting issues',
especially in Decode failure messages. Refer to 'Reporting issues'.
- alternatively, use ksymoops: ksymoops at the mentioned URL seems not to
be maintained anymore. It was released roughly once a year until
version 2.4.11 in 2005, but has not seen a new release since then. The
information in ./scripts/ksymoops/README is from 1999, and does not
give more insight on its actual maintenance state either. Ksymoops is
mentioned as system utility in changes.rst, but also not recommended
there. Drop the explanation on using ksymoops.
- alternatively, lookup dump manually with the EIP and nm to determine
the function in which the kernel crashes: this method seems already a
quite advanced and low-level debugging method. Even all the further
references on bug hunting and debugging do not mention it. Drop this
alternative method and limit mentioning methods explained in the other
existing kernel documentation.
- read 'Reporting issues': keep this reference.
Refer to 'Reporting issues'.
- use gdb for debugging: some specific details, e.g., edit
arch/x86/Makefile, are probably outdated or limited to one (historic
important) setup. Using gdb is covered in 'Bug hunting', 'Debugging
kernel and modules via gdb' and 'Using kgdb, kdb and the kernel
debugger internals'. Refer to those three documents.
Overall, it is sufficient to refer to reporting-issues.rst,
bug-hunting.rst, gdb-kernel-debugging.rst and kgdb.rst and this way cover
the existing suggestions.
'Reporting issues' is quite new and probably up to date. 'Bug hunting',
'Debugging kernel and modules via gdb' and 'Using kgdb, kdb and the kernel
debugger internals' might need some revisit and update, but they are
generally in an acceptable state for referring to them.
Replace the existing suggestions by reference to other existing kernel
documentation covering those suggestions---partly even nicely summarized
and then explained in greater detail.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Link: https://lore.kernel.org/r/20220720041325.15693-3-lukas.bulwahn@gmail.com
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2022-07-19 21:13:25 -07:00
|
|
|
If you have problems that seem to be due to kernel bugs, please follow the
|
|
|
|
instructions at 'Documentation/admin-guide/reporting-issues.rst'.
|
|
|
|
|
|
|
|
Hints on understanding kernel bug reports are in
|
|
|
|
'Documentation/admin-guide/bug-hunting.rst'. More on debugging the kernel
|
|
|
|
with gdb is in 'Documentation/dev-tools/gdb-kernel-debugging.rst' and
|
|
|
|
'Documentation/dev-tools/kgdb.rst'.
|