gentoo安装完后没有网卡驱动
答案:2 悬赏:60 手机版
解决时间 2021-03-21 05:36
- 提问者网友:沉默的哀伤
- 2021-03-20 17:51
有gentoo liveDVD安装完gentoo后,重启,居然没有网卡驱动,然后进去重新编译聊内核,重启,还是没网卡驱动,一怒之下,手动将整个内核给编译了,到头来还是没有网卡驱动,我的电脑是东芝J72,内核应该有相关的驱动啊!求大神回答!
最佳答案
- 五星知识达人网友:想偏头吻你
- 2021-03-20 17:58
用下面的脚本在内核中找到并配置网卡驱动,并编译
#!/bin/sh
# This script is use for configure and compile network card driver #
# Create date :Tue Dec 17 09:07:26 CST 2013 #
# Create by : pangping #
# My email adress : ppkingpping@gmail.com #
# script name :ethernetdriver.sh #
# You can copy and save it as name ethernetdriver.sh run it #
# sh ethernetdriver.sh or chmod 755 ethernetdriver.sh and #
#./ethernetdriver.sh to run it #
source_dir=/usr/src/linux
bus_id=`lspci | grep -i ethernet | awk -F: '{ print $1 }'`
pci_dir=/sys/bus/pci/devices/0000\:$bus_id\:00.0
vendor=`cat $pci_dir/vendor`
device=`cat $pci_dir/device`
vendor_id=`grep $vendor $source_dir/include/linux/pci_ids.h | awk -F" " '{print $2}'`
device_id=`grep $device $source_dir/include/linux/pci_ids.h | awk -F" " '{print $2}'`
echo $vendor $device $vendor_id $device_id
for driverfiles in `grep -Rl $vendor_id $source_dir/* | grep net `
do
networkdriver=`echo $driverfiles | awk -F/ '{ print $(NF-1) }'`
grep $device_id $driverfiles 2>&1 /dev/null
if [ $? -eq 0 ]
then
echo "ethernet driver is found"
else
driver=`echo $networkdriver | tr [:lower:] [:upper:]`
grep $driver $source_dir/.config >/dev/null
if [ $? -eq 0 ]
then
echo "CONFIG_$driver=y" >>$source_dir/.config
fi
fi
done
echo "Use instead network driver"
cd $source_dir && make && make modules_install
#!/bin/sh
# This script is use for configure and compile network card driver #
# Create date :Tue Dec 17 09:07:26 CST 2013 #
# Create by : pangping #
# My email adress : ppkingpping@gmail.com #
# script name :ethernetdriver.sh #
# You can copy and save it as name ethernetdriver.sh run it #
# sh ethernetdriver.sh or chmod 755 ethernetdriver.sh and #
#./ethernetdriver.sh to run it #
source_dir=/usr/src/linux
bus_id=`lspci | grep -i ethernet | awk -F: '{ print $1 }'`
pci_dir=/sys/bus/pci/devices/0000\:$bus_id\:00.0
vendor=`cat $pci_dir/vendor`
device=`cat $pci_dir/device`
vendor_id=`grep $vendor $source_dir/include/linux/pci_ids.h | awk -F" " '{print $2}'`
device_id=`grep $device $source_dir/include/linux/pci_ids.h | awk -F" " '{print $2}'`
echo $vendor $device $vendor_id $device_id
for driverfiles in `grep -Rl $vendor_id $source_dir/* | grep net `
do
networkdriver=`echo $driverfiles | awk -F/ '{ print $(NF-1) }'`
grep $device_id $driverfiles 2>&1 /dev/null
if [ $? -eq 0 ]
then
echo "ethernet driver is found"
else
driver=`echo $networkdriver | tr [:lower:] [:upper:]`
grep $driver $source_dir/.config >/dev/null
if [ $? -eq 0 ]
then
echo "CONFIG_$driver=y" >>$source_dir/.config
fi
fi
done
echo "Use instead network driver"
cd $source_dir && make && make modules_install
全部回答
- 1楼网友:往事埋风中
- 2021-03-20 18:12
网络适配器中 正常会有多个 一个是有线的网卡驱动 一个是无线的网卡驱动 如果你有一个黄的叹号 那就是有一个没驱动上 重新去你电脑的官方网站上下载一个对应型号的驱动即可 也可以用驱动精灵之类的驱动软件 这样更方便 祝你好运 求采纳!
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯