banner
 .::*nix::. Cập nhật kernel trên Ubuntu Go to original post Author: subnetwork - Translator:  - Entry Date: 20/02/2009 14:44:56
Nếu bạn hỏi tôi thành phần gì quan trọng nhất trong hệ điều hành Linux, tôi xin trả lời rằng đó là kernel .

Kernel là gì ?
Kernel là nhân của hệ điều hành, bắt buộc phải có kernel thì hệ điều hành Linux mới đi vào hoạt động.

Vậy cập nhật kernel để làm chi vậy ?
Ví dụ một hệ thống máy chủ Linux nếu muốn hoạt động tốt, không những cần trang bị các thiết bị phần cứng hiện tại bên cạnh đó người quản trị hệ thống cần hiểu rõ hiệu thống của mình đang có những gì và thiếu xót những gì từ đó có những biện pháp cấu hình hệ thống đạt hiệu quả cao .

Những thay đổi ở kernel sẽ giúp máy chủ hoạt động tốt hơn và cũng có thể hệ thống của bạn gặp trục trặc khi điều chĩnh kernel .

Trong phạm vi bài viết này được dịch từ nguồn
Code:


http://www.ubuntuforums.org/showthread.php?t=266666



Chắc chắn ở khâu kiến thức của tôi còn khá hạn hẹp cho nên tôi không đi vào chi tiết việc cập nhật Kernel hoàn chỉnh . Mời anh em xem qua bài viết cập nhật kernel trên Ubuntu . Nếu bạn thắc mắc ở vấn đề nào đó, anh em cùng bàn luận .

Trên console Terminal chạy command sau :
Code:


sudo aptitude install build-essential bin86 kernel-package libqt3-headers libqt3-mt-dev wget


Nếu xuất hiện
Do you want to continue? [Y/n/?]

Đặt CD Ubuntu vào và nhấn Y . Di chuyển đến thư mục /usr/src
Code:


cd /usr/src



Download Kernel mới nhất về, tôi lấy ví dụ với phiên bản 2.6.18.3
Code:


sudo wget http://kernel.org/pub/linux/kernel/v2.6/linux-2.6.18.3.tar.gz



Giải nén
Code:


sudo tar -zxvf linux-2.6.18.3.tar.gz



Xóa bỏ tập tin linux-2.6.18.3.tar.gz
Code:


sudo rm -rf linux-2.6.18.3.tar.gz



Sao chép thư mục linux-2.6.18.3 sang thư mục linux
Code:


sudo ln -s /usr/src/linux-2.6.18.3 linux



Ok đến đây ta bắt đầu import kernel và cấu hình nó
Code:


cd /usr/src/linux sudo cp /boot/config-`uname -r` .config sudo make xconfig



Lúc này màn hình qconfig hiện ra
General Setup

S: Support for paging of anonymous memory (swap)

Loadable Module Support

U: Module Versioning Support
U: Source checksum for all modules

Block Layer

U: Large Block Devices (and others if possible)
/IO Schedulers

U: Anticipatory I/O Schedulers
U: Deadline I/O Schedulers

Processor type and features

U: Symmetric processing support (unless you know your processor supports it)
U: Generic x86 support
S: HPET Timer Support
/Preemption Model

S: Voluntary Kernel Preemption (Desktop)
S: Local APCI support on uniprocessors

/Local APCI Support

S: IO-APCI support on uniprocessors

/High Memory Support

S: Off (if you have under 1GB RAM)

/Memory Model

S: Sparse Memory
S: MTRR support
S: Use register arguments
S: Enable seccomp to compute untrusted bytecode

/Timer Frequency

S: 1000hz

Bus Options

S: Message Signaled Interrupts (MSI and MSI-X)(PCI_MSI)

Networking

U: Anything in Amateur Radio, IrDA, or Bluetooth you don't have.
/Networking options

S: Network packet filtering (replaces ipchains)

/Core Netfilter Configuration

S: Netfilter Xtables support (!!!required for ip_tables)

/Network packet filtering

/IP: Net Filter configuration

S: IP Tables support

S: Packet socket:mmapped IO

Device Drivers

/ATA/ATAP/MFR/RLL support

S: Use PCI DMA by Default
U: IDE Taskfile Access

/Raid and LVM

U: everything you don't use

/I2O support

U: most people do not use this

Network Device Support

U: EQL support
U: Universal TUN/TAP device driver support
U: FDDI Driver support
U: HIPPI driver support
U: SLIP (serial line) support
U: Traffic Support
U: Network console login support
/ARCnet support

U: most people don't need this

/Ethernet Support (1000 MB)

U: everything you don't have

/Ethernet Support (10000 MB)

U: everything you don't have

/Token Ring Devices

U: everything you don't connect to

/WAN interfaces support

U: everything you don't need

ISDN subsystem

U: ISDN support (if you don't need it)

Input device support

U: Touchscreen interface
/TouchScreens

U: Touchscreens

Character Devices

U: everything you don't have
/Watchdog cards

U: Watch Dog Timer support

Misc. Devices

U: Device Driver for IBM/RSA service drivers

Video Capture Adapters

U: everything you don't have
/Radio Adapters

U: everything you don't have

/Digital Video Broadcasting Devices

U: DVB for Linux

Graphics support

U: everything you don't have
/Logo Configuration

S: Bootup Logo (and everything under it)

File Systems

U: everything you are not going to use
/DOS/FAT/NT Filesystems

S: NTFS write support

/Network File Systems

U: NFS file system support
U: NFS server support
U: NCP fle system support
U: Coda file system support
U: Andrews file system support
U: Plan 9 resource sharing support

/Partition Types

U: Advances partition selection

/Native Language Support

U: everything but your native language packages

Instrumentation Support

U: Profiling Support
U: Kprobes

Kernel Hacking

U: Show timing information on printks
U: Magic SysRq Key
U: Kernel Hacking
U: Debug Filesystem
U: Compile the kernel with frame unwind information 


Điều chỉnh các thông số thích hợp, việc điều chỉnh kernel tùy thuộc vào phần cứng của server . Ví dụ phần High Memory Support

Chọn S: Off (nếu thanh RAM của bạn dưới 1GB)

Code:


sudo -s -H

make-kpkg clean
make-kpkg -initrd --revision=386 kernel_image kernel_headers modules_image


Code:


cd .. ls



Code:


kernel-headers-2.6.18.3_386_i386.deb  kernel-image-2.6.18.3_386_i386.deb  linux  linux-2.6.18.3



Nhìn trên màn hình bạn thấy , nó xuất hiện ra hai tập tin kernel-headers-2.6.18.3_386_i386.deb và kernel-image-2.6.18.3_386_i386.deb

Code:


dpkg -i kernel-headers-2.6.18.3_386_i386.deb dpkg -i kernel-image-2.6.18.3_386_i386.deb



Nếu bạn có ý kiến ý cò thì mở topic mới trong Box *nix , ta cùng nhau bình luận .

G.A - HVA
[digg] [delicious] [google] [yahoo] [technorati] [reddit] [stumbleupon]
Go to top Go to original post  

Powered by JForum - Extended by HVAOnline
 hvaonline.net  |  hvaforum.net  |  hvazone.net  |  hvanews.net  |  vnhacker.org
1999 - 2013 © v2012|0504|218|