Version Description +++-==============-==============-============================================ ii linux-firmware 1.34.1 Firmware for Linux kernel drivers ii linux-headers- 2.6.32-22.36 Header files related to Linux kernel version ii linux-headers- 2.6.32-22.36 Linux kernel headers for version 2.6.32 on x ii linux-image-2. 2.6.32-22.36 Linux kernel image for version 2.6.32 on x86 ii linux-libc-dev 2.6.32-23.37 Linux Kernel Headers for development 。。。。。
2、让我们重点看一下系统安装的linux-image软件包的功能和内容: geekard@geekard-laptop:~$ dpkg -s linux-image-2.6.32-22-generic Package: linux-image-2.6.32-22-generic Status: install ok installed Priority: optional Section: admin Installed-Size: 94652 Maintainer: Ubuntu Kernel Team <kernel-team@lists.ubuntu.com> 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) #注意这些依赖的软件包的作用是和kernel启动时需要的文件密切相关的。 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 linux-image-2.6.32-22-generic /. /boot #这就是系统启动目录,其中多是与kernel相关的文件 /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 #这就是kernel提供的module所在的目录,在开机过程中和系统运行过程中经常使用。注意module和特定版本的kernel是对应的。 /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 #kernel提供的固件程序 /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
geekard@geekard-laptop:~$ uname -a #查看系统kernel信息命令 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 postinst.d prerm.d geekard@geekard-laptop:~$
- 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-2.6.XX.tar.gz | tar xvf -
or bzip2 -dc linux-2.6.XX.tar.bz2 | tar xvf -
Replace "XX" with the version number of the latest kernel. 2、Make sure you have no stale .o files and dependencies lying around:
cd linux make mrproper
You should now have the sources correctly installed. 3、CONFIGURING the kernel: "make config" Plain text interface. "make menuconfig" Text based color menus, radiolists & dialogs. "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.
在配置kernel时最重要的是确定kernel对芯片组、总线、文件系统的支持。 4、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. COMPILING the kernel: If you configured any of the parts of the kernel as `modules', you will also have to do "make modules_install". 5、配置grub.cfg文件,在其中添加新配置的kernel及initrd文件作为启动项 6、Reboot with the new kernel and enjoy.