« 为在Google的成绩庆祝一下 | 首 页 | Top Climbers of Spread Firefox This Week »

2005 年 01 月 05 日

升级 kernel 到 2.6.10

| 分类: 服务器日志 Server Log |

为了安装 VPN ,我把 kernel 加入了 ppp 模块并升级到了 2.6.10。
今天的升级比较顺利。 嘿嘿~

参考文档:

  • Kernel Rebuild Guide
    找到了原作者的老家,所以比较容易读懂。 ;-) 不过 Kwan 的主页上还有 mathmatics 噢~ 需要的朋友可以去看看

  • [原]在redhat as 3.0 上精简并编译系统内核(适用于初级用户)
    这篇最后对于重启的部分没有很好的说明,只看看那些硬件或者配置需要或不需要就可以了。
  • 我主要的配置过程中使用 make menuconfig 从现有的 rpm 升级的内核 2.6.9 中提取了原配置(/boot/config-2.6.9-1.667smp),然后在此基础上,去掉了不需要的模块:

    IEEE 1394 (FireWire) support
    Token Ring devices
    Parallel port support
    PCMCIA network device support
    IrDA (infrared) subsystem support
    ISDN support
    Graphic - vodoo3 etc.
    并 build in 了 ppp。
    以下是配置记录,红色处是重点或者需注意处。这里可以下载编译前的 2.6.9smp 的配置文件和 2.6.10 的 .config 文件。

    [root@dalouis root]# uname -a Linux dalouis.com 2.6.9-1.667smp #1 SMP Tue Nov 2 14:59:52 EST 2004 i686 i686 i386 GNU/Linux

    [root@dalouis root]# uname -m
    i686

    [root@dalouis root]# lsmod
    Module Size Used by
    ipt_REJECT 10433 717
    ipt_limit 6337 3
    iptable_filter 6721 1
    ip_tables 20929 3 ipt_REJECT,ipt_limit,iptable_filter
    md5 8001 1
    ipv6 235105 139
    autofs4 21700 0
    tg3 79045 0
    ohci1394 35033 0
    ieee1394 302965 1 ohci1394
    floppy 57297 0
    parport_pc 27777 0
    parport 40969 1 parport_pc
    ohci_hcd 23889 0
    ext3 117961 5
    jbd 59353 1 ext3
    aacraid 43249 6
    sd_mod 20289 7
    scsi_mod 112136 2 aacraid,sd_mod


    [root@dalouis ppp]# lspci
    00:00.0 Host bridge: ServerWorks CMIC-LE (rev 13)
    00:00.1 Host bridge: ServerWorks CMIC-LE
    00:00.2 Host bridge: ServerWorks: Unknown device 0000
    00:04.0 Class ff00: Dell Computer Corporation Embedded Systems Management Device 4
    00:04.1 Class ff00: Dell Computer Corporation PowerEdge Expandable RAID Controller 3/Di
    00:04.2 Class ff00: Dell Computer Corporation: Unknown device 000d
    00:0e.0 VGA compatible controller: ATI Technologies Inc Rage XL (rev 27)
    00:0f.0 Host bridge: ServerWorks CSB5 South Bridge (rev 93)
    00:0f.1 IDE interface: ServerWorks CSB5 IDE Controller (rev 93)
    00:0f.2 USB Controller: ServerWorks OSB4/CSB5 OHCI USB Controller (rev 05)
    00:0f.3 ISA bridge: ServerWorks GCLE Host Bridge
    00:10.0 Host bridge: ServerWorks: Unknown device 0101 (rev 03)
    00:10.2 Host bridge: ServerWorks: Unknown device 0101 (rev 03)
    00:11.0 Host bridge: ServerWorks: Unknown device 0101 (rev 03)
    00:11.2 Host bridge: ServerWorks: Unknown device 0101 (rev 03)
    03:06.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5701 Gigabit Ethernet (rev 15)
    03:08.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5701 Gigabit Ethernet (rev 15)
    04:08.0 PCI bridge: Intel Corp.: Unknown device 0309 (rev 01)
    04:08.1 RAID bus controller: Dell Computer Corporation PowerEdge Expandable RAID Controller 3 (rev 01)
    05:06.0 SCSI storage controller: Adaptec RAID subsystem HBA (rev 01)
    05:06.1 SCSI storage controller: Adaptec RAID subsystem HBA (rev 01)


    [root@dalouis ppp]# cat /proc/cpuinfo
    processor : 0
    vendor_id : GenuineIntel
    cpu family : 15
    model : 2
    model name : Intel(R) Xeon(TM) CPU 2.00GHz
    stepping : 7
    cpu MHz : 1994.403
    cache size : 512 KB
    physical id : 0
    siblings : 2
    fdiv_bug : no
    hlt_bug : no
    f00f_bug : no
    coma_bug : no
    fpu : yes
    fpu_exception : yes
    cpuid level : 2
    wp : yes
    flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse

    sse2 ss ht tm pbe cid
    bogomips : 3923.96


    [root@dalouis source]# cd /root/source/kernel


    #
    # Download new kernel
    #

    [root@dalouis kernel]# wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.10.tar.bz2
    [root@dalouis kernel]# wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.10.tar.bz2.sign
    [root@dalouis kernel]# wget http://www.kernel.org/pub/linux/kernel/v2.6/patch-2.6.10.bz2
    [root@dalouis kernel]# wget http://www.kernel.org/pub/linux/kernel/v2.6/patch-2.6.10.bz2.sign

    [root@dalouis kernel]# tar xvfj linux-2.6.10.tar.bz2
    [root@dalouis kernel]# bzip2 -d patch-2.6.10.bz2
    [root@dalouis kernel]# cp patch-2.6.10 linux-2.6.10
    [root@dalouis kernel]# cd linux-2.6.10

    [root@dalouis kernel]# patch -p1 < ../patch-2.6.10
    patching file CREDITS
    Reversed (or previously applied) patch detected! Assume -R? [n]
    Apply anyway? [n]
    Skipping patch.

    #
    # UPGRADE menuconfig (Unnecerssary for everybody)
    #

    [root@dalouis rpms]# wget http://download.fedora.redhat.com/pub/fedora/linux/core/3/i386/os/Fedora/RPMS/ncurses-

    5.4-13.i386.rpm
    [root@dalouis rpms]# wget http://download.fedora.redhat.com/pub/fedora/linux/core/3/i386/os/Fedora/RPMS/ncurses-

    devel-5.4-13.i386.rpm

    #
    # Read the config file from recent kernel
    #

    [root@dalouis boot]# cp /boot/config-2.6.9-1.667smp ~/source/kernel/linux-2.6.10/


    #
    # Configuration
    #


    [root@dalouis linux-2.6.10]# make menuconfig


    #
    # Save your .config
    #


    #
    # Compile
    #


    [root@dalouis linux-2.6.10]# make dep
    *** Warning: make dep is unnecessary now.

    [root@dalouis linux-2.6.10]# make clean

    [root@dalouis linux-2.6.10]# make bzImage
    Root device is (8, 1)
    Boot sector 512 bytes.
    Setup is 4735 bytes.
    System is 1510 kB
    Kernel: arch/i386/boot/bzImage is ready

    [root@dalouis linux-2.6.10]# make modules


    #
    # Intallation
    #


    [root@dalouis linux-2.6.10]# make modules_install
    ...
    INSTALL sound/soundcore.ko
    if [ -r System.map ]; then /sbin/depmod -ae -F System.map 2.6.10; fi


    #
    # Make it bootable
    #


    [root@dalouis linux-2.6.10]# mkinitrd /boot/initrd-2.6.10.img 2.6.10

    [root@dalouis linux-2.6.10]# cp arch/i386/boot/bzImage /boot/bzImage-2.6.10
    [root@dalouis linux-2.6.10]# cp System.map /boot/System.map-2.6.10
    [root@dalouis linux-2.6.10]# ln -s /boot/System.map-2.6.10 /boot/System.map


    #
    # Edit boot menu
    #


    [root@dalouis linux-2.6.10]# vi /etc/grub.conf
    # Add your new kernel

    title The Linux Kernel (2.6.10)
    root (hd0,0)
    kernel /boot/bzImage-2.6.10 ro root=LABEL=/
    initrd /boot/initrd-2.6.10.img


    -----------------------------------------------
    After reboot
    -----------------------------------------------


    [root@dalouis root]# lsmod
    Module Size Used by
    autofs4 20100 0
    tg3 86020 0
    ipt_REJECT 9984 717
    ipt_limit 6144 3
    iptable_filter 7168 1
    ip_tables 20352 3 ipt_REJECT,ipt_limit,iptable_filter
    floppy 58768 0
    ohci_hcd 23688 0
    aacraid 45584 6
    sd_mod 19072 7
    scsi_mod 110464 2 aacraid,sd_mod

    [root@dalouis root]# uname -a
    Linux dalouis.com 2.6.10 #1 SMP Wed Jan 5 02:07:46 CST 2005 i686 i686 i386 GNU/Linux

    v^O^v Cool!

    (END)

    引用

    引用本文的 URL:
    http://weblog.kreny.com/cgi-bin/mt/mt-tb.cgi/210.

    发表评论

    (如果您还为在此成功留言,也许是因为需要管理员逐一审核留言内容后放可看到您的评论。请稍后并感谢您的耐心等待。)

    阅览更多文章请访问 首页过去的存档