假如在挂载根文件系统出现如下问题:
Try to bring eth0 interface up......nfs: server 192.168.1.10 not responding, still trying
请在虚拟机下更改要移植系统的eth0配置文件具体如下
修改NFS网络文件系统(根文件系统)里面的 /etc/init.d/ifconfig-eth0文件,修改如下:
if [ -f /etc/eth0-setting ] ; then
source /etc/eth0-setting
#if grep -q "^/dev/root / nfs " /etc/mtab ; then
if grep -q "root=/dev/nfs" /proc/cmdline;then
echo -n NFS root ... > /dev/ttySAC0
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
就是把 if grep -q "^/dev/root / nfs " /etc/mtab ; then 注释掉,然后使用
if grep -q "root=/dev/nfs" /proc/cmdline;then 判断,即可。
good 成功!