广告

本站里的文章大部分经过自行整理与测试

2016年5月13日星期五

Gentoo - Error: netmount needs service(s) net

1. 检查是否有 Error: netmount needs service(s) net
用 root 进入户口
# rc
Error: netmount needs service(s) net

2. 检查模块
$ find /lib/modules/4.4.6-gentoo/ -type f -iname '*.o' -or -iname '*.ko' | grep e1000
看看有没有
/lib/modules/4.4.6-gentoo/kernel/drivers/net/ethernet/intel/e1000 


3. 重新编译内核
备份内核 .config 文件
# cp /usr/src/linux/.config /usr/src/my.config
清理
# cd /usr/src/linux; make mrproper
恢复原来的 .config
# cp /usr/src/my.config /usr/src/linux/.config

编译内核与安装模块
# cd /usr/src/linux
# make menuconfig


Networking support —>
Device Drivers —>
Network device support —>
Ethernet driver support —>
Intel devices
<M> Intel(R) PRO/1000 Gigabit Ethernet support

Networking support —>
Device Drivers —>
Fusion MPT device support
<M> Fusion MPT ScsiHost drivers for SPI

<M> Fusion MPT ScsiHost drivers for FC
<M> Fusion MPT ScsiHost drivers for SAS
(128) Maximum number of scatter gather entries (16 – 128)
<M> Fusion MPT misc device (ioctl) driver

<M> Fusion MPT LAN driver

File systems —>
<M> Second extended fs support
[*] The Extended 4 (ext4) filesystem
[*] Ext4 POSIX Access Control Lists
[*] Ext4 Security Labels
[*] Ext4 debugging support


# make && make modules_install
# cp arch/x86_64/boot/bzImage /boot/kernel-4.4.6-gentoo
# cp System.map /boot/System.map-4.4.6-gentoo


# reboot

4. 重新检查模块
$ find /lib/modules/4.4.6-gentoo/ -type f -iname '*.o' -or -iname '*.ko' | grep e1000

5. 重新检查 netmount, 找 Network Interface
# rc
错误应该还在
找出 Network Interface 名, 我的是 eno16777728
大概是用 vmware - NAT 的关系吧, 所以出现这样的数字 
# ifconfig -a

6. 启动网络服务
# nano -w /etc/conf.d/net

config_eno16777728="192.168.247.200 netmask 255.255.255.0 brd 192.168.247.255"
routes_eno16777728="default via 192.168.247.2"
 


# nano -w /etc/resolv.conf

domain localdomain
nameserver 192.168.247.2


# cd /etc/init.d
# ln -s net.lo net.eno16777728  


# /etc/init.d/net.eno16777728 start

7. 测试网络
# ifconfig 应可以找到 eno16777728, 还有显示 inet,netmask,brd
# ping 8.8.8.8

8.  开机自动启动
# rc-update add net.eno16777728 default
 

9. 检查错误
# rc

没有评论:

发表评论