Gentoo安裝詳解(二)-- 編譯內核

編譯內核:

  • 安裝內核源碼:

選擇內核:如gentoo-sources

emerge gentoo-sources
ls -l /usr/src/linux

手動編譯內核:

cd /usr/src/linux
make menuconfig
  • 必須啓用的選項:

顯卡:Xorg/Configuration
聲卡:ALSA
網卡:根據具體網卡芯片型號,查看wiki。
無線網卡芯片驅動查詢:Linux Wireless

其他選項根據需要添加,不瞭解保持默認即可.

  • 編譯內核與模塊:
make && make modules_install
  • 拷貝內核到啓動分區:
cp arch/x86_64/boot/bzImage /boot/kernel-3.10.10-gentoo
或
make install  #使用make install

This will copy the kernel image into /boot together with the System.map file and the kernel configuration file.

使用genkernel編譯內核:

emerge genkernel
  • 可選:複製安裝光盤上的內核配置文件:
zcat /proc/config.gz > /usr/share/genkernel/arch/x86_64/kernel-config
  • 編譯:
genkernel --menuconfig all 

一旦genkernel運行完成,一個包括全部模塊和initrd的內核將被建立。在後面配置引導程序時我們將會用到這個內核和initrd。請記下內核和initrd的名字,因爲您將在配置引導程序的時候用到他們(Grub Legacy使用)。initrd將會在啓動真正的系統前自動識別硬件(如同安裝光盤一樣)。

ls /boot/kernel* /boot/initramfs*
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章