Chinaunix首页 | 论坛 | 博客
  • 博客访问: 305543
  • 博文数量: 43
  • 博客积分: 2071
  • 博客等级: 大尉
  • 技术积分: 488
  • 用 户 组: 普通用户
  • 注册时间: 2009-08-25 17:48
文章分类

全部博文(43)

文章存档

2014年(5)

2013年(4)

2011年(9)

2010年(8)

2009年(17)

我的朋友

分类: LINUX

2010-04-26 10:16:46

we use the below IP address for nfs.
IP address for Host PC:      192.168.200.1
IP address for target board: 192.168.200.2

Steps:
1. target board side configuration:

1.1 make sure nfs configuration is enabled in configuration file.
File systems  ---> Network File Systems

1.2 make sure network device is ok for the kernel.
for example, eth0

1.3 modify cmdline to support NFS booting:
the below is a example, we use /download/root as the nfs folder, and use eth0 as the link network device.
    CONFIG_CMDLINE="root=/dev/nfs nfsroot=192.168.200.1:/download/root ip=192.168.200.2:192.168.100.1::255.255.255.0::eth0:on console=ttyS0,115200"

1.4 build the kernel and flash it to target board.


2. Host PC side configuration:

2.1 add IP addr auto-config in /etc/network/interfaces:
    auto eth0
    iface eth0 inet static
    address 192.168.200.1
    netmask 255.255.255.0
    network 192.168.0.0

2.2 add device info in /etc/hosts, like the last line:
    192.168.200.2 phone

2.3 install nfs service:
    apt-get install nfs-kernel-server nfs-common

2.4 add export directory(for example, /download/root) to NFS service by editing /etc/exports:
/download/root *(rw,no_root_squash,no_all_squash,sync,no_subtree_check)

2.5 copy your root files to /download/root.

2.6. check initial file in your root filles
for example, /etc/init.d/rcS, maybe also configure eth0 network device, we need set the configuration to 192.168.200.2 to keep the original configuration.
阅读(1118) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~