版本1和2间的区别
于2007-08-18 10:39:32修订的的版本1
大小: 1148
编辑: czk
备注:
于2007-08-31 16:28:39修订的的版本2
大小: 1147
编辑: czk
备注:
删除的内容标记成这样。 加入的内容标记成这样。
行号 1: 行号 1:
行号 8: 行号 7:
 1. 下载内核:http://www.kernel.org/,解压缩  1. 下载内核:http://www.kernel.org/ ,解压缩

linux 进程管理api

  • fork 创建新进程
  • exec* 用一个新的程序代替当前运行的进程
  • wait 等待子进程结束

内核编译

  1. 下载内核:http://www.kernel.org/ ,解压缩

  2. 配置内核选项:

    cp /boot/config-`uname -r` ./.config
    make menuconfig
  3. 编译内核:

    make-kpkg clean
    fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers
  4. 安装内核:

    dpkg -i linux-image-2.6.18.1-custom_2.6.18.1-custom-10.00.Custom_i386.deb
    dpkg -i linux-headers-2.6.18.1-custom_2.6.18.1-custom-10.00.Custom_i386.deb
  5. 修改引导文件:

    vi /boot/grub/menu.lst
    
    title           Ubuntu, kernel 2.6.18.1-custom
    root            (hd0,0)
    kernel          /boot/vmlinuz-2.6.18.1-custom root=/dev/sda1 ro quiet splash
    initrd          /boot/initrd.img-2.6.18.1-custom
    savedefault
    boot
    
    title           Ubuntu, kernel 2.6.18.1-custom (recovery mode)
    root            (hd0,0)
    kernel          /boot/vmlinuz-2.6.18.1-custom root=/dev/sda1 ro single
    initrd          /boot/initrd.img-2.6.18.1-custom
    boot
  6. 使用新内核重启
ch3n2k.com | Copyright (c) 2004-2020 czk.