jcruz/g3_kernel

语言: C

git: https://github.com/jcruz/g3_kernel

README.md (中文)
Linux kernel release 3.x <http://kernel.org/>

这些是Linux版本3的发行说明。请仔细阅读, 因为他们告诉你这是什么,解释如何安装 内核,如果出现问题该怎么办。

什么是LINUX?

Linux是Unix操作系统的克隆,是从头开始编写的   Linus Torvalds在一个松散的黑客团队的帮助下   互联网。它旨在实现POSIX和单一UNIX规范的合规性。

它具有您在现代完全成熟的Unix中所期望的所有功能,   包括真正的多任务处理,虚拟内存,共享库,需求   加载,共享写时复制可执行文件,适当的内存管理,   和多包组网,包括IPv4和IPv6。

它是在GNU通用公共许可证下发布的 - 请参阅   随附COPYING文件以获取更多详细信息。

什么硬件运行?

最初是为32位基于x86的PC(386或更高版本)开发的,   今天Linux也运行(至少)Compaq Alpha AXP,Sun SPARC和   UltraSPARC,Motorola 68000,PowerPC,PowerPC64,ARM,Hitachi SuperH,Cell,   IBM S / 390,MIPS,HP PA-RISC,Intel IA-64,DEC VAX,AMD x86-64,AXIS CRIS,   Xtensa,Tilera TILE,AVR32和Renesas M32R架构。

Linux可轻松移植到大多数通用的32位或64位架构   只要他们有一个分页内存管理单元(PMMU)和一个端口   GNU C编译器(gcc)(GNU编译器集合的一部分,GCC)。 Linux有   尽管如此,也没有PMMU也被移植到许多架构中   功能显然有些限制。   Linux也已移植到自身。您现在可以将内核作为一个运行   用户空间应用程序 - 这称为UserMode Linux(UML)。

文档:

  • 有很多文档都以电子形式提供    互联网和书籍,既特定于Linux又与之相关    一般的UNIX问题。我建议查看文档    LDP的任何Linux FTP站点上的子目录(Linux文档    项目)书籍。本自述文件不是关于文档的文档    系统:有更好的资源可用。
  • Documentation /子目录中有各种README文件:    这些通常包含特定于内核的安装说明    司机例如。有关内容的列表,请参阅Documentation / 00-INDEX    包含在每个文件中。请阅读更改文件    包含有关问题的信息,这些信息可能会通过升级产生    你的内核。
  • Documentation / DocBook /子目录包含几个指南    内核开发人员和用户。这些指南可以在一个    格式数:PostScript(.ps),PDF,HTML和手册页等。    安装完成后,“make psdocs”,“make pdfdocs”,“make htmldocs”,    或“make mandocs”将以所要求的格式呈现文档。

安装内核源代码:

  • 如果您安装了完整的源代码,请将内核tarball放入    您拥有权限的目录(例如您的主目录)和    解压缩:gzip -cd linux-3.X.tar.gz | tar xvf -

要么         bzip2 -dc linux-3.X.tar.bz2 | tar xvf -

将“XX”替换为最新内核的版本号。

不要使用/ usr / src / linux区域!这个区域有一个(通常是    不完整的)库头使用的内核头文件集    文件。它们应该匹配库,而不是搞砸了    无论内核是什么样的。

  • 您还可以通过修补在3.x版本之间进行升级。补丁是    以传统的gzip和更新的bzip2格式分发。至    通过修补安装,获取所有较新的补丁文件,输入    内核源代码的顶级目录(linux-3.x)并执行:gzip -cd ../patch-3.x.gz |补丁-p1

要么         bzip2 -dc ../patch-3.x.bz2 |补丁-p1

(对于比当前版本更大的所有版本重复xx    源码树,in_order),你应该没问题。您可能想要删除    备份文件(xxx~或xxx.orig),并确保没有    失败的补丁(xxx#或xxx.rej)。如果有的话,你或我都有    犯了一个错误。

与3.x内核的补丁不同,3.x.y内核的补丁    (也称为-stable内核)不是增量的,而是适用的    直接到基3.x内核。请阅读    有关更多信息,请参见Documentation / apply-patches.txt。

或者,脚本补丁内核可用于自动执行此操作    处理。它确定当前的内核版本并应用任何版本    补丁找到了。

    linux/scripts/patch-kernel linux

上面命令中的第一个参数是。的位置    内核源码。从当前目录应用修补程序,但是    可以将备用目录指定为第二个参数。

  • 如果使用稳定系列修补程序在版本之间进行升级    (例如,patch-3.x.y),请注意这些“点发布”是    不是增量的,必须应用于3.x基础树。对于    例如,如果您的基本内核是3.0并且您想要应用    3.0.3补丁,你没有,确实一定不能先申请    3.0.1和3.0.2补丁。同样,如果您正在运行内核    版本3.0.2,并希望跳转到3.0.3,你必须先    在应用之前反转3.0.2补丁(即补丁-R)    3.0.3补丁。    您可以在Documentation / apply-patches.txt中阅读更多相关内容
  • 确保您没有过时的.o文件和依赖项: cd linux 制作mrproper

您现在应该正确安装了源。

软件要求

编译和运行3.x内核需要最新    各种软件包的版本。请教    文档/所需最低版本号的更改    以及如何获取这些包的更新。小心使用    这些包的过旧版本可能导致间接    很难追查的错误,所以不要假设    你可以在出现明显问题时更新软件包    建造或运营。

内核的BUILD目录:

编译内核时,默认情况下所有输出文件都是    与内核源代码一起存储。    使用“make O = output / dir”选项可以指定备用项    输出文件的位置(包括.config)。    例:      内核源代码:/usr/src/linux-3.N      build目录:/ home / name / build / kernel

要配置和构建内核,请使用:    cd /usr/src/linux-3.N    make O = / home / name / build / kernel menuconfig    make O = / home / name / build / kernel    sudo make O = / home / name / build / kernel modules_install install

请注意:如果使用'O = output / dir'选项,那么它必须是    用于make的所有调用。

配置内核:

即使您只升级一个未成年人,也不要跳过此步骤    版。每个版本中都添加了新的配置选项    如果未设置配置文件,将出现奇怪的问题    正如所料。如果要将现有配置带到    使用最少工作的新版本,使用“make oldconfig”,这将是    只问你新问题的答案。

  • 备用配置命令是:     “make config”纯文本界面。     “make menuconfig”基于文本的颜色菜单,radiolists和对话框。     “make nconfig”增强的基于文本的颜色菜单。     “make xconfig”基于X windows(Qt)的配置工具。     “make gconfig”基于X windows(Gtk)的配置工具。     “make oldconfig”默认所有问题都基于内容                您现有的./.config文件并询问                新的配置符号。     “make silentoldconfig”                像上面一样,但避免使屏幕混乱                问题已经回答了。                另外更新依赖项。     “make defconfig”使用默认值创建./.config文件                来自arch / $ ARCH / defconfig的符号值                或arch / $ ARCH / configs / $ {PLATFORM} _defconfig,                取决于架构。     “make $ {PLATFORM} _defconfig”               使用默认值创建./.config文件               来自的符号值               在arch / $ ARCH / CONFIGS / $ {PLATFORM} _defconfig。               使用“make help”获取所有可用的列表               您的架构平台。     “make allyesconfig”                通过设置符号创建./.config文件                尽可能将值设为'y'。     “make allmodconfig”                通过设置符号创建./.config文件                尽可能将值设为“m”。     “make allnoconfig”通过设置符号创建./.config文件                值尽可能地为'n'。     “make randconfig”通过设置符号创建./.config文件                值为随机值。

您可以找到有关使用Linux内核配置工具的更多信息    在Documentation / kbuild / kconfig.txt中。

NOTES on "make config":
- having unnecessary drivers will make the kernel bigger, and can
  under some circumstances lead to problems: probing for a
  nonexistent controller card may confuse your other controllers
- compiling the kernel with "Processor type" set higher than 386
  will result in a kernel that does NOT work on a 386.  The
  kernel will detect this on bootup, and give up.
- 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. 
- 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.

编译内核:

  • 确保你至少有gcc 3.2可用。    有关更多信息,请参阅文档/更改。

请注意,您仍然可以使用此内核运行a.out用户程序。

  • 执行“make”以创建压缩的内核映像。也是    如果你安装了lilo以适应这种情况,可以做“make install”    内核makefile,但您可能想先检查您的特定lilo设置。

要进行实际安装,你必须是root用户,但不是正常的    构建应该要求。不要徒劳地取根的名字。

  • 如果你将内核的任何部分配置为`modules',那么你    还必须做“make modules_install”。
  • 详细内核编译/构建输出:

通常,内核构建系统以相当安静的模式运行(但不是    完全沉默)。但是,有时您或其他内核开发人员需要    完全按照执行的方式查看编译,链接或其他命令。    为此,请使用“详细”构建模式。这是通过插入完成的    “make”命令中的“V = 1”。例如。:

make V=1 all

让构建系统也告诉每个构建系统重建的原因    目标,使用“V = 2”。默认值为“V = 0”。

  • 保持备份内核方便出现问题。这是    从每个新版本开始,特别适用于开发版本    包含尚未调试的新代码。确保你保持一个    备份与该内核对应的模块。如果你    正在安装一个与你的版本号相同的新内核    工作内核,在你之前备份你的modules目录    做一个“make modules_install”。    或者,在编译之前,使用内核配置选项    “LOCALVERSION”为常规内核版本附加一个唯一的后缀。    可以在“常规设置”菜单中设置LOCALVERSION。
  • 要启动新内核,您需要复制内核    图像(例如编译后的... / linux / arch / i386 / boot / bzImage)    到找到常规可启动内核的地方。
  • 在没有a的帮助下直接从软盘启动内核    不再支持引导加载程序,如LILO。

如果你从硬盘驱动器启动Linux,你可能会使用LILO    使用文件/etc/lilo.conf中指定的内核映像。该    内核映像文件通常是/ vmlinuz,/ boot / vmlinuz,/ bzImage或    的/ boot / bzImage的。要使用新内核,请保存旧映像的副本    并将旧图像复制到旧图像上。然后,你必须RERUN LILO    更新加载地图!!如果不这样做,您将无法启动    新的内核映像。

重新安装LILO通常是运行/ sbin / lilo的问题。    您可能希望编辑/etc/lilo.conf以指定您的条目    旧内核映像(例如,/ vmlinux.old),以防新的内核映像没有    工作。有关更多信息,请参阅LILO文档。

重新安装LILO后,你应该全部设置好。关闭系统,    重启,享受!

如果您需要更改默认的根设备,视频模式,    内核映像中的ramdisk大小等,使用'rdev'程序(或    或者适当的LILO启动选项)。无需    重新编译内核以更改这些参数。

  • 使用新内核重新启动并享受。

如果有些错误:

  • 如果你有问题似乎是由于内核错误,请检查    文件MAINTAINERS以查看是否存在关联的特定人员    与您遇到问题的内核部分。如果有    不是那里列出的任何人,那么第二个最好的事情是邮寄    他们(torvalds@linux-foundation.org),也可能是其他任何人    相关的邮件列表或新闻组。
  • 在所有错误报告中,请告诉您正在谈论的内核,    如何复制问题,以及您的设置是什么(使用您的常见问题    感)。如果问题是新的,请告诉我,如果问题是    老了,请你第一次注意时告诉我。
  • 如果错误导致像这样的消息 无法在地址C0000010处理内核分页请求 哎呀:0002 EIP:0010:XXXXXXXX eax:xxxxxxxx ebx:xxxxxxxx ecx:xxxxxxxx edx:xxxxxxxx esi:xxxxxxxx edi:xxxxxxxx ebp:xxxxxxxx ds:xxxx es:xxxx fs:xxxx gs:xxxx Pid:xx,进程nr:xx xx xx xx xx xx xx xx xx xx xx

或类似的内核调试信息在您的屏幕或您的屏幕上    系统日志,请完全复制。转储可能看起来    你不可理解,但它确实包含可能的信息    帮助调试问题。转储上方的文本也是    重要的是:它讲述了为什么内核转储代码(在    上面的例子,这是由于糟糕的内核指针)。更多信息    了解转储的方法是在Documentation / oops-tracing.txt中

  • 如果使用CONFIG_KALLSYMS编译内核,则可以发送转储    原样,否则你将不得不使用“ksymoops”程序    转储感(但通常首选使用CONFIG_KALLSYMS进行编译)。    该实用程序可以从中下载 ftp://ftp..kernel.org/pub/linux/utils/kernel/ksymoops/。    或者,您可以手动执行转储查找:
  • 在如上所述的调试转储中,如果可以的话,它会有很大帮助    查看EIP值的含义。这样的十六进制值没有帮助    我或其他任何人:这取决于你的特殊情况    内核设置。你应该做的是从EIP获取十六进制值    line(忽略“0010:”),并在内核名称列表中查找    查看哪个内核函数包含有问题的地址。

要找出内核函数名称,您需要找到系统    与显示症状的内核相关联的二进制文件。这是    文件'linux / vmlinux'。提取名单并与之匹配    来自内核崩溃的EIP,做:

    nm vmlinux | sort | less

这将为您提供按升序排序的内核地址列表    顺序,从中可以很容易地找到包含该函数的函数    违规地址。请注意内核给出的地址    调试消息不一定与之完全匹配    函数地址(事实上,这是非常不可能的),所以你不能    只是'grep'列表:然而,列表将为您提供启动    每个核心函数的点,所以通过寻找函数    起始地址低于您要搜索的地址但是    接下来是一个具有更高地址的函数,你会找到一个    你要。实际上,包含一些内容可能是个好主意    问题报告中的“上下文”,给出了几行    有趣的一个。

如果由于某种原因你不能做到以上(你有一个预编译    内核图像或类似的),告诉我你的设置    可能会有所帮助。有关详细信息,请阅读REPORTING-BUGS文档。

  • 或者,您可以在正在运行的内核上使用gdb。 (只读;即你    无法更改值或设置断点。)为此,首先编译    内核用-g;适当地编辑arch / i386 / Makefile,然后执行“make    干净“。你还需要启用CONFIG_PROC_FS(通过”make config“)。

使用新内核重新启动后,执行“gdb vmlinux / proc / kcore”。    您现在可以使用所有常用的gdb命令。查找的命令    系统崩溃的地方是“l * 0xXXXXXXXX”。 (替换XXXes    与EIP值。)

gdb'ing一个非运行的内核当前失败,因为gdb(错误地)    忽略编译内核的起始偏移量。

本文使用googletrans自动翻译,仅供参考, 原文来自github.com

en_README.md
Linux kernel release 3.x <http://kernel.org/>

These are the release notes for Linux version 3. Read them carefully,
as they tell you what this is all about, explain how to install the
kernel, and what to do if something goes wrong.

WHAT IS LINUX?

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.

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.

It is distributed under the GNU General Public License - see the
accompanying COPYING file for more details.

ON WHAT HARDWARE DOES IT RUN?

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
UltraSPARC, Motorola 68000, PowerPC, PowerPC64, ARM, Hitachi SuperH, Cell,
IBM S/390, MIPS, HP PA-RISC, Intel IA-64, DEC VAX, AMD x86-64, AXIS CRIS,
Xtensa, Tilera TILE, AVR32 and Renesas M32R architectures.

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.
Linux has also been ported to itself. You can now run the kernel as a
userspace application - this is called UserMode Linux (UML).

DOCUMENTATION:

  • 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:
    these typically contain kernel-specific installation notes for some
    drivers for example. See Documentation/00-INDEX for a list of what
    is contained in each file. Please read the Changes file, as it
    contains information about the problems, which may result by upgrading
    your kernel.

  • The Documentation/DocBook/ subdirectory contains several guides for
    kernel developers and users. These guides can be rendered in a
    number of formats: PostScript (.ps), PDF, HTML, & man-pages, among others.
    After installation, "make psdocs", "make pdfdocs", "make htmldocs",
    or "make mandocs" will render the documentation in the requested format.

INSTALLING the kernel source:

  • If you install the full sources, put the kernel tarball in a
    directory where you have permissions (eg. your home directory) and
    unpack it:
    gzip -cd linux-3.X.tar.gz | tar xvf -
    

or
bzip2 -dc linux-3.X.tar.bz2 | tar xvf -

Replace "XX" with the version number of the latest kernel.

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.

  • You can also upgrade between 3.x releases by patching. Patches are
    distributed in the traditional gzip and the newer bzip2 format. To
    install by patching, get all the newer patch files, enter the
    top level directory of the kernel source (linux-3.x) and execute:
    gzip -cd ../patch-3.x.gz | patch -p1
    

or
bzip2 -dc ../patch-3.x.bz2 | patch -p1

(repeat xx for all versions bigger than the version of your current
source tree, in_order) and you should be ok. You may want to remove
the backup files (xxx~ or xxx.orig), and make sure that there are no
failed patches (xxx# or xxx.rej). If there are, either you or me has
made a mistake.

Unlike patches for the 3.x kernels, patches for the 3.x.y kernels
(also known as the -stable kernels) are not incremental but instead apply
directly to the base 3.x kernel. Please read
Documentation/applying-patches.txt for more information.

Alternatively, the script patch-kernel can be used to automate this
process. It determines the current kernel version and applies any
patches found.

    linux/scripts/patch-kernel linux

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.

  • If you are upgrading between releases using the stable series patches
    (for example, patch-3.x.y), note that these "dot-releases" are
    not incremental and must be applied to the 3.x base tree. For
    example, if your base kernel is 3.0 and you want to apply the
    3.0.3 patch, you do not and indeed must not first apply the
    3.0.1 and 3.0.2 patches. Similarly, if you are running kernel
    version 3.0.2 and want to jump to 3.0.3, you must first
    reverse the 3.0.2 patch (that is, patch -R) before applying
    the 3.0.3 patch.
    You can read more on this in Documentation/applying-patches.txt

  • Make sure you have no stale .o files and dependencies lying around:

    cd linux
    make mrproper
    

You should now have the sources correctly installed.

SOFTWARE REQUIREMENTS

Compiling and running the 3.x kernels requires up-to-date
versions of various software packages. Consult
Documentation/Changes for the minimum version numbers required
and how to get updates for these packages. Beware that using
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.

BUILD directory for the kernel:

When compiling the kernel all output files will per default be
stored together with the kernel source code.
Using the option "make O=output/dir" allow you to specify an alternate
place for the output files (including .config).
Example:
kernel source code: /usr/src/linux-3.N
build directory: /home/name/build/kernel

To configure and build the kernel use:
cd /usr/src/linux-3.N
make O=/home/name/build/kernel menuconfig
make O=/home/name/build/kernel
sudo make O=/home/name/build/kernel modules_install install

Please note: If the 'O=output/dir' option is used then it must be
used for all invocations of make.

CONFIGURING the kernel:

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
new version with minimal work, use "make oldconfig", which will
only ask you for the answers to new questions.

  • Alternate configuration commands are:
    "make config" Plain text interface.
    "make menuconfig" Text based color menus, radiolists & dialogs.
    "make nconfig" Enhanced text based color menus.
    "make xconfig" X windows (Qt) based configuration tool.
    "make gconfig" X windows (Gtk) based configuration tool.
    "make oldconfig" Default all questions based on the contents of
    your existing ./.config file and asking about
    new config symbols.
    "make silentoldconfig"
    Like above, but avoids cluttering the screen
    with questions already answered.
    Additionally updates the dependencies.
    "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.
    "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.
    "make allyesconfig"
    Create a ./.config file by setting symbol
    values to 'y' as much as possible.
    "make allmodconfig"
    Create a ./.config file by setting symbol
    values to 'm' as much as possible.
    "make allnoconfig" Create a ./.config file by setting symbol
    values to 'n' as much as possible.
    "make randconfig" Create a ./.config file by setting symbol
    values to random values.

You can find more information on using the Linux kernel config tools
in Documentation/kbuild/kconfig.txt.

NOTES on "make config":
- having unnecessary drivers will make the kernel bigger, and can
  under some circumstances lead to problems: probing for a
  nonexistent controller card may confuse your other controllers
- compiling the kernel with "Processor type" set higher than 386
  will result in a kernel that does NOT work on a 386.  The
  kernel will detect this on bootup, and give up.
- 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. 
- 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.

COMPILING the kernel:

  • Make sure you have at least gcc 3.2 available.
    For more information, refer to Documentation/Changes.

Please note that you can still run a.out user programs with this kernel.

  • Do a "make" to create a compressed kernel image. It is also
    possible to do "make install" if you have lilo installed to suit the
    kernel makefiles, but you may want to check your particular lilo setup first.

To do the actual install you have to be root, but none of the normal
build should require that. Don't take the name of root in vain.

  • If you configured any of the parts of the kernel as `modules', you
    will also have to do "make modules_install".

  • Verbose kernel compile/build output:

Normally the kernel build system runs in a fairly quiet mode (but not
totally silent). However, sometimes you or other kernel developers need
to see compile, link, or other commands exactly as they are executed.
For this, use "verbose" build mode. This is done by inserting
"V=1" in the "make" command. E.g.:

make V=1 all

To have the build system also tell the reason for the rebuild of each
target, use "V=2". The default is "V=0".

  • Keep a backup kernel handy in case something goes wrong. This is
    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
    do a "make modules_install".
    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.

  • In order to boot your new kernel, you'll need to copy the kernel
    image (e.g. .../linux/arch/i386/boot/bzImage after compilation)
    to the place where your regular bootable kernel is found.

  • Booting a kernel directly from a floppy without the assistance of a
    bootloader such as LILO, is no longer supported.

If you boot Linux from the hard drive, chances are you use LILO which
uses the kernel image as 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,
reboot, and enjoy!

If you ever need to change the default root device, video mode,
ramdisk size, etc. in the kernel image, use the 'rdev' program (or
alternatively the LILO boot options when appropriate). No need to
recompile the kernel to change these parameters.

  • Reboot with the new kernel and enjoy.

IF SOMETHING GOES WRONG:

  • If you have problems that seem to be due to kernel bugs, please check
    the file MAINTAINERS to see if there is a particular person associated
    with the part of the kernel that you are having trouble with. If there
    isn't anyone listed there, then the second best thing is to mail
    them to me (torvalds@linux-foundation.org), and possibly to any other
    relevant mailing-list or to the newsgroup.

  • In all bug-reports, please tell what kernel you are talking about,
    how to duplicate the problem, and what your setup is (use your common
    sense). If the problem is new, tell me so, and if the problem is
    old, please try to tell me when you first noticed it.

  • If the bug results in a message like

    unable to handle kernel paging request at address C0000010
    Oops: 0002
    EIP: 0010:XXXXXXXX
    eax: xxxxxxxx ebx: xxxxxxxx ecx: xxxxxxxx edx: xxxxxxxx
    esi: xxxxxxxx edi: xxxxxxxx ebp: xxxxxxxx
    ds: xxxx es: xxxx fs: xxxx gs: xxxx
    Pid: xx, process nr: xx
    xx xx xx xx xx xx xx xx xx xx

or similar kernel debugging information on your screen or in your
system log, please duplicate it exactly. The dump may look
incomprehensible to you, but it does contain information that may
help debugging the problem. The text above the dump is also
important: it tells something about why the kernel dumped code (in
the above example it's due to a bad kernel pointer). More information
on making sense of the dump is in Documentation/oops-tracing.txt

  • If you compiled the kernel with CONFIG_KALLSYMS you can send the dump
    as is, otherwise you will have to use the "ksymoops" program to make
    sense of the dump (but compiling with CONFIG_KALLSYMS is usually preferred).
    This utility can be downloaded from
    ftp://ftp..kernel.org/pub/linux/utils/kernel/ksymoops/ .
    Alternately you can do the dump lookup by hand:

  • In debugging dumps like the above, it helps enormously if you can
    look up what the EIP value means. The hex value as such doesn't help
    me or anybody else very much: it will depend on your particular
    kernel setup. What you should do is take the hex value from the EIP
    line (ignore the "0010:"), and look it up in the kernel namelist to
    see which kernel function contains the offending address.

To find out the kernel function name, you'll need to find the system
binary associated with the kernel that exhibited the symptom. This is
the file 'linux/vmlinux'. To extract the namelist and match it against
the EIP from the kernel crash, do:

    nm vmlinux | sort | less

This will give you a list of kernel addresses sorted in ascending
order, from which it is simple to find the function that contains the
offending address. Note that the address given by the kernel
debugging messages will not necessarily match exactly with the
function addresses (in fact, that is very unlikely), so you can't
just 'grep' the list: the list will, however, give you the starting
point of each kernel function, so by looking for the function that
has a starting address lower than the one you are searching for but
is followed by a function with a higher address you will find the one
you want. In fact, it may be a good idea to include a bit of
"context" in your problem report, giving a few lines around the
interesting one.

If you for some reason cannot do the above (you have a pre-compiled
kernel image or similar), telling me as much about your setup as
possible will help. Please read the REPORTING-BUGS document for details.

  • Alternately, you can use gdb on a running kernel. (read-only; i.e. you
    cannot change values or set break points.) To do this, first compile the
    kernel with -g; edit arch/i386/Makefile appropriately, then do a "make
    clean". You'll also need to enable CONFIG_PROC_FS (via "make config").

After you've rebooted with the new kernel, do "gdb vmlinux /proc/kcore".
You can now use all the usual gdb commands. The command to look up the
point where your system crashed is "l *0xXXXXXXXX". (Replace the XXXes
with the EIP value.)

gdb'ing a non-running kernel currently fails because gdb (wrongly)
disregards the starting offset for which the kernel is compiled.