Chinaunix首页 | 论坛 | 博客
  • 博客访问: 15366236
  • 博文数量: 2005
  • 博客积分: 11986
  • 博客等级: 上将
  • 技术积分: 22535
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-17 13:56
文章分类

全部博文(2005)

文章存档

2014年(2)

2013年(2)

2012年(16)

2011年(66)

2010年(368)

2009年(743)

2008年(491)

2007年(317)

分类: 嵌入式

2009-08-04 00:30:03

luther@gliethttp:~$ sudo apt-get install nfs-kernel-server
luther@gliethttp:~$ sudo vim /etc/exports
# 追加如下内容
/vobs/nfs 192.168.1.*(rw,sync,no_root_squash)
luther@gliethttp:~$ sudo service nfs-kernel-server restart
 * Stopping NFS kernel daemon                                                                [ OK ]
 * Unexporting directories for NFS kernel daemon...                                          [ OK ]
 * Exporting directories for NFS kernel daemon...                                                   exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.1.*:/vobs/nfs".
  Assuming default behaviour ('no_subtree_check').
  NOTE: this default has changed since nfs-utils version 1.0.x

                                                                                             [ OK ]
 * Starting NFS kernel daemon                                                                [ OK ]
luther@gliethttp:~$
现在我们可以在我们的ubuntu 8.10主机上测试nfs是否正常启动.
luther@gliethttp:~$ mkdir gliethttp
luther@gliethttp:~$ sudo mount -t nfs 192.168.1.101:/vobs/nfs gliethttp
luther@gliethttp:~$ ll gliethttp/
total 0
-rw-r--r-- 1 luther luther 0 2009-08-03 23:55 a.c
luther@gliethttp:~$
成功挂载a.c文件就是/vobs/nfs定义的一个测试文件,向/vobs/nfs追加内容,可以直接在gliethttp/目录下
看到,同样对gliethttp/作任何的操作,也将直接反应到挂载的/vobs/nfs目录上[luther.gliethttp].

最后配置linux 2.6.30-4的启动参数为:
console=ttyAM0,115200 root=/dev/nfs nfsroot=192.168.1.101:/vobs/nfs ip=192.168.1.150:192.168.1.101:192.168.1.1:255.255.255.0
这样就可以直接挂载/vobs/nfs目录了.[luther.gliethttp]
阅读(1391) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~