Chinaunix首页 | 论坛 | 博客
  • 博客访问: 568195
  • 博文数量: 155
  • 博客积分: 7055
  • 博客等级: 少将
  • 技术积分: 1700
  • 用 户 组: 普通用户
  • 注册时间: 2004-11-22 11:40
文章分类

全部博文(155)

文章存档

2016年(1)

2011年(2)

2010年(1)

2009年(2)

2008年(9)

2007年(39)

2006年(58)

2005年(38)

2004年(5)

我的朋友

分类: LINUX

2005-10-28 19:05:47

mount显示:
/dev/mtdblock0 on /flash type jffs2 (rw)
/dev/mtdblock0 on /etc type jffs2 (rw)

看到的现象是这样,我们再看一看启动脚本,为什么是这样:

先是mount /dev/mtdblock0 /flash
然后看一下/flash里内容,有一个目录 etc
然后mount --bind /flash/etc /etc
这样/etc里的内容就是/flash/etc里的内容了

用的linux是uClinux,image里包含了kernel+rootfs,当然也有/etc配置目录

这样处理的用处,大约是:
如果mtdblock0分区上已有etc配置文件,则不使用自带的
如果没有,则将其copy到mtdblock0上

下面是man mount对bind选项的说明:

Since Linux 2.4.0 it is possible to remount part of the file  hierarchy somewhere else. The call is

    mount --bind olddir newdir

After this call the same contents is accessible in two places.


阅读(6021) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~