解决编译内核系列问题
2011-12-03 21:34
519 查看
最近一段时间在玩Gentoo,编译内核,多次出现各种问题,现集锦如下:
# lspci -v
在.config文件里查找 R8169,然后修改( 后来证实这是个 愚蠢的做法
)如下:
另外,VirtualBox 中是这样的:
界面名称:Realtek PCIe GBE Family Controller
控制芯片:Intel PRO/1000 MT Desktop (82540EM)
然后make menuconfig 选择:Device Drivers --> Network device support --> Ethernet (1000 Mbit) --> Intel (R) PRO/1000
/etc/fstab内容(记得有次把defaults 写成default, 结果(谁试试?)检查了一整天 ...)
一. 内核版本 3.1.1,使用新内核重启后无eth0 , ifconfig -a 也是没有eth0, 确定是因为网卡驱动未编译进内核所致。
1. 确定网卡类型():
在配置正确内核的系统中可以得到非常有用的信息,以下是本人的(lspci -v)输出
(Gentoo系统此命令需要 emerge sys-apps/pciutils )# lspci -v
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 02) Subsystem: Giga-byte Technology GA-EP45-DS5 Motherboard Flags: bus master, fast devsel, latency 0, IRQ 41 I/O ports at de00 [size=256] Memory at fdaff000 (64-bit, prefetchable) [size=4K] Memory at fdae0000 (64-bit, prefetchable) [size=64K] [virtual] Expansion ROM at fda00000 [disabled] [size=64K] Capabilities: [40] Power Management version 3 Capabilities: [50] MSI: Enable+ Count=1/2 Maskable- 64bit+ Capabilities: [70] Express Endpoint, MSI 01 Capabilities: [b0] MSI-X: Enable- Count=2 Masked- Capabilities: [d0] Vital Product Data Capabilities: [100] Advanced Error Reporting Capabilities: [140] Virtual Channel Capabilities: [160] Device Serial Number 12-34-56-78-12-34-56-78 Kernel driver in use: r8169得到 r8169 这个重要参数后,可以去 make menuconfig 里找,不过最简单的方法却是:
在.config文件里查找 R8169,然后修改( 后来证实这是个 愚蠢的做法
)如下:
# filename: .config # Search R8169 and edit # CONFIG_E1000E is not set # CONFIG_IGB is not set # CONFIG_IGBVF is not set # CONFIG_NS83820 is not set # CONFIG_HAMACHI is not set CONFIG_R8169=y # CONFIG_SIS190 is not set # CONFIG_SKGE is not set # CONFIG_SKY2 is not set # CONFIG_VIA_VELOCITY is not set
另外,VirtualBox 中是这样的:
界面名称:Realtek PCIe GBE Family Controller
控制芯片:Intel PRO/1000 MT Desktop (82540EM)
然后make menuconfig 选择:Device Drivers --> Network device support --> Ethernet (1000 Mbit) --> Intel (R) PRO/1000
2. 如果内核代码里找不到对应网卡型号,那就得自己下载驱动了(记得Dell有款电脑就必须得这样)
二. 系统启动是提示:Failed to set the system clock
解决办法:设置.config 内 CONFIG_RTC=y 即设置 Look at Device Drivers ---> Character devices ---> Enhanced Real Time Clock Support.三. 重启后无法进入系统
提示:kernel panic - not syncing: VFS: Unable to mount root fs on unknow-block(0,0)
解决办法:暂无...(因素太多)
提示:kernel panic - not syncing: No init found. Try passing init= option to kernel.
解决办法: 一般是grub.conf 的问题,或/etc/fstab配置问题:以下是本人配置(可用,仅供参考)# This is a sample grub.conf for use with Genkernel, per the Gentoo handbook # http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=10#doc_chap2 # If you are not using Genkernel and you need help creating this file, you # should consult the handbook. Alternatively, consult the grub.conf.sample that # is included with the Grub documentation. default 0 timeout 10 splashimage=(hd0,0)/boot/grub/splash.xpm.gz title Gentoo Gnome root (hd0,0) kernel (hd0,0)/vmlinuz-3.0.6-gentoo #这里还是“绝对路径”靠谱 title Windows 7 root (hd0,2) chainloader +1
/etc/fstab内容(记得有次把defaults 写成default, 结果(谁试试?)检查了一整天 ...)
# /etc/fstab: static file system information. # # <fs> <mountpoint> <type> <opts> <dump/pass> # NOTE: If your BOOT partition is ReiserFS, add the notail option to opts. /dev/sda1 /boot ext3 defaults,noatime 1 2 /dev/sda2 / ext4 defaults,noatime 0 1 /dev/sda5 none swap sw 0 0 /dev/cdrom /mnt/cdrom auto noauto,ro 0 0 /dev/fd0 /mnt/floppy auto noauto 0 0
四. Waiting ...
相关文章推荐
- boadcom x86_64 431*系列无线网卡驱动在linux 3.10以上内核编译问题的解决
- 安卓系统源码编译系列(七)——单独编译WebView兼容性问题解决
- ubuntu 14.04 编译内核出现unable to locate package ncurses-devel 问题的解决
- 交叉编译基于ARM架构的linux-3.6内核遇到的问题及解决方法
- 解决编译linux2.4和linux 2.6内核出现/usr/bin/ld: cannot find -lncurses的问题
- 解决Ubuntu编译内核uImage出现问题“mkimage” command not found - U-Boot
- 编译2.6内核模块出问题了,尚未解决.............
- NanoPi K2 (Amlogic S905) 解决自行编译内核无法启动问题
- 解决Fedora 自己编译的内核不能运行Virtualbox的问题。
- 基于ubuntu14.04下编译linux-2.6.34版本内核的步骤和遇到的一些问题及解决
- ubuntu 14.04 编译内核出现unable to locate package ncurses-devel 问题的解决
- linux 编译内核几个常见问题解决方法
- Linux+RTAI实时内核编译所遇到的问题及解决方法
- ubuntu环境下编译linux内核问题解决备忘
- 天漠SBC8100(OMAP3530)在Ubuntu11.04上编译内核是存在问题的解决方法
- Ubuntu从9.10升级到14.10(64位)后编译Linux内核遇到的系列问题解决方法
- 《Linux设备驱动程序》Ubuntu5.04中编译内核2.6.10的遇到的drivers/char/gnome问题解决。。。。
- Linux 内核编译,解决网卡驱动缺少的问题,使用更新的内核来完善驱动
- ubuntu10.10下内核编译,解决开机启动出现Could not load /lib/modules/.../modules.dep的问题
- 关于编译内核后出现start kernel...停止不动的问题及解决方法