分类: LINUX
2010-11-20 09:51:43
+++-==============-==============-============================================
ii
ii
ii
ii
ii
。。。。。
可以看出系统安装的与kernel相关的软件包挺多的,但主要有三种类型:
linux-firmware
linux-headers
linux-image
linux-generic
2、让我们重点看一下系统安装的linux-image软件包的功能和内容:
geekard@geekard-laptop:~$ dpkg
-s
Package: linux-image-2.6.32-22-generic
Status: install ok installed
Priority: optional
Section: admin
Installed-Size: 94652
Maintainer: Ubuntu Kernel Team <>
Architecture: i386
Source: linux
Version: 2.6.32-22.36
Provides: fuse-module, ivtv-modules, kvm-api-4, linux-image,
linux-image-2.6, ndiswrapper-modules-1.9,
redhat-cluster-modules
Depends: initramfs-tools (>= 0.36ubuntu6), coreutils
| fileutils (>= 4.0), module-init-tools
(>= 3.3-pre11-4ubuntu3), wireless-crda
Pre-Depends: dpkg (>=
1.10.24)
Recommends: grub-pc | grub | lilo (>= 19.1)
Suggests: fdutils, linux-doc-2.6.32 | linux-source-2.6.32,
linux-tools
Breaks: lvm2 (<<
2.02.54-1ubuntu3)
Conflicts: hotplug (<<
0.0.20040105-1)
Description: Linux kernel image for version 2.6.32 on
x86/x86_64
This package contains the Linux kernel
image for version 2.6.32 on
x86/x86_64.
.
Also includes the corresponding System.map file, the modules built by
the
packager, and scripts that try to ensure that the system is not
left in an
unbootable state after an
update.
.
Supports Generic processors.
.
Geared toward desktop systems.
.
You likely do not want to install this package directly. Instead,
install
the linux-generic meta-package, which will ensure that upgrades
work
correctly, and that supporting packages are also installed.
geekard@geekard-laptop:~$
geekard@geekard-laptop:~$ dpkg
-L
/.
/boot
/boot/vmlinuz-2.6.32-22-generic
/boot/config-2.6.32-22-generic
/boot/abi-2.6.32-22-generic
/boot/System.map-2.6.32-22-generic
/boot/vmcoreinfo-2.6.32-22-generic
/lib
/lib/modules
/lib/modules/2.6.32-22-generic
/lib/modules/2.6.32-22-generic/kernel
/lib/modules/2.6.32-22-generic/kernel/arch
/lib/modules/2.6.32-22-generic/kernel/arch/x86/kvm/kvm.ko
…..
/lib/firmware/2.6.32-22-generic/mts_gsm.fw
/lib/firmware/2.6.32-22-generic/yam/9600.bin
/usr
/usr/share
/usr/share/doc
/usr/share/doc/linux-image-2.6.32-22-generic
/usr/share/doc/linux-image-2.6.32-22-generic/changelog.Debian.old.gz
/usr/share/doc/linux-image-2.6.32-22-generic/copyright
/usr/share/doc/linux-image-2.6.32-22-generic/changelog.Debian.gz
3、好了,我们现在知道了/boot目录下除grub子目录外的所有文件都是由linux-image软件包提供的,那么这些文件的作用是什么呢?
geekard@geekard-laptop:~$ ls
/boot
abi-2.6.32-22-generic
config-2.6.32-22-generic
grub
initrd.img-2.6.32-22-generic
geekard@geekard-laptop:~$
各文件功能如下:
config-2.6.32-22-generic
System.map-2.6.32-22-generic
vmcoreinfo-2.6.32-22-generic
initrd.img-2.6.32-22-generic
vmlinuz-2.6.32-22-generic
geekard@geekard-laptop:~$ uname
-a
Linux geekard-laptop 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3
22:02:19 UTC 2010 i686 GNU/Linux
geekard@geekard-laptop:~$
显示的含义为:主机名为geekard-laptop、硬件平台为i686的笔记本电脑安装了GNU/Linux
类型的操作系统,其kernel是在SMP Thu Jun 3 22:02:19 UTC
2010第36次编译的,版本为版本为2.6.32-22-generic
另外在系统运行的过程中可以查看和编辑/proc/sys/kernel/下的相应文件,实时获取和设置kernel的参数
geekard@geekard-laptop:~$ ls
/etc/kernel
header_postinst.d
geekard@geekard-laptop:~$
4、内核的安装方式:
从源代码安装的步骤:(以下内容摘自kernel源代码的README文件)
1、INSTALLING the kernel source:
- If you install the full sources, put the kernel tarball in
a
2、Make sure you have no stale .o files and dependencies lying
around: