问题:
新创建的文件系统报错:
Try to bring eth0 interface up......grep: /etc/mtab: No such file or directory
解决:
修改 etc/init.d/ifcpnfig-eth0
文件:
修改前:
#!/bin/sh
echo -n Try to bring eth0 interface up......>/dev/ttymxc0
if [ -f /etc/eth0-setting ] ; then
source /etc/eth0-setting
if grep -q "^/dev/root / nfs " /etc/mtab ; then
echo -n NFS root ... > /dev/ttymxc0
else
ifconfig eth0 down
ifconfig eth0 hw ether $MAC
ifconfig eth0 $IP netmask $Mask up
route add default gw $Gateway
fi
echo nameserver $DNS > /etc/resolv.conf
else
if grep -q "^/dev/root / nfs " /etc/mtab ; then
echo -n NFS root ... > /dev/ttymxc0
else
/sbin/ifconfig eth0 172.16.2.100 netmask 255.255.255.0 up
fi
fi
echo Done > /dev/ttymxc0
修改后:
#!/bin/sh
echo -n Try to bring eth0 interface up......>/dev/ttymxc0
if [ -f /etc/eth0-setting ] ; then
source /etc/eth0-setting
if grep -q nfs /proc/mounts ; then
echo -n NFS root ... > /dev/ttymxc0
else
ifconfig eth0 down
ifconfig eth0 hw ether $MAC
ifconfig eth0 $IP netmask $Mask up
route add default gw $Gateway
fi
echo nameserver $DNS > /etc/resolv.conf
else
if grep -q "^/dev/root / nfs " /etc/mtab ; then
echo -n NFS root ... > /dev/ttymxc0
else
/sbin/ifconfig eth0 172.16.2.100 netmask 255.255.255.0 up
fi
fi
echo Done > /dev/ttymxc0