Gentoo安装详解(二)-- 编译内核

编译内核:

  • 安装内核源码:

选择内核:如gentoo-sources

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

手动编译内核:

cd /usr/src/linux
make menuconfig
  • 必须启用的选项:

Most information can be gathered by emerging sys-apps/pciutils which contains the lspci command:
显卡: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*

转载于:https://www.cnblogs.com/wonux/p/5174556.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值