跳至主要内容

博文

目前显示的是 二月, 2007的博文

在Fedora下自动挂载移动硬盘

(一)从Mount到fstab 最早使用Linux的时候,我遇 到的第一个难题就是如何将Windows下的硬盘分区挂载到Linux中。当时用的是mount。指定了文件系统 vfat,字符编码codepage=936等参数之后,mount一下就ok了。不过偶是个懒人,所以不情愿每次进入系统都输入一遍命令(不过必须承 认,对于当时还是个新手的偶而言,多用几次命令行还是很有好处的 ^_^ )。 Google之后了解到 /etc/fstab 文件的好处。Linux中/etc目录下的fstab文件是一个文件系统表 (File System Table file ),它维护着mount point条目。这些条目是根据HAL事件自动增添或是删除的──fstab文件不是指望靠用户手动修改的,有个程序 fstab-sync 可以自动修改fstab文件。当系统的HAL服务启动之后,上一次增加的所有条目都会被删除,而后根据需要,fstab-sync 会被调用若干次,加入合适的条目。 (二)fstab-sync和policy 了解到了这里,就要知道fstab-sync是如何知道应该增添什么条目的? # man fstab-sync 文 档说主要是参考storage.policy和volume.policy的属性。缺省的属性是存放在系统配置文件中的,在偶的Fedora 4系统中,放在 /usr/share/hal/fdi/policy/10osvendor/10-storage-policy.fdi里面。别心急修改──这个文件 是osvendor提供的,在升级的时候可能会被更新,正确的作法是在policy目录中放入单独的文件,例如,为了自动挂载移动硬盘,我新建了文件: /usr/share/hal/fdi/policy/95user.fdi。 以下是这个fdi文件的内容: <?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- --> <deviceinfo version="0.2">  <device>   <match key="@block.storage_device:storage.remo...

IT名人堂:Mark Zbikowski

熟悉Windows平台上EXE文件格式的人应该都记得在文件头有个'MZ'的标记,这个标记来自于这位兄台的名字首字母缩写。 This is Behind the Code’s pilot episode with Core File Services architect, Mark Zbikowski. Mark began his career at Microsoft in 1981, working on DOS 1.0 as a designer, coder and liaison with IBM. His quarter century long career has included significant involvement in OS/2, Cairo’s Object File System (OFS), and the NT File System (NTFS). In addition, he has been a key player in all of Microsoft’s File System work. Former Microsoft software architect Pat Helland interviews Mark about the early days at Microsoft, his passion for product development and the challenges of producing software.