文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Everest0.2中关闭自动挂载Windows分区功能

Everest0.2中关闭自动挂载Windows分区功能

时间:2006-09-23  来源:lenovox

    自己的硬盘装在朋友的机器上双硬盘一起用。朋友硬盘上安装的是WindowsXP,自己硬盘上使用Linux。每次朋友看到我进入linux系统,看到能在Linux下面直接读到他的硬盘分区,总是很担心哪天我在Linux系统中破坏掉他系统里面的数据。朋友硬盘上有一个FAT32分区,其它的全是NTFS分区,虽然自己知道在Linux下面可以读到Windows分区对其系统是没有什么影响。为了打消朋友的担心,决定不挂载朋友的硬盘。
    通常在系统中可以通过修改/etc/fstab文件来设置分区的自动挂载。由于自己使用的是everest,它在启动时是通过一个脚本程序来进行自动挂载,修改/etc/fstab不起任何作用。后来认真查看了一下,原来everest使用一个名为fsautomount的脚本进行Windows分区的自动挂载。这个脚本的位置在/usr/sbin/fsautomount。在系统中通过在 /etc/rc.d/rc.local这个文件中进行定义。rc.local文件的内容如下:
    #!/bin/sh
    #
    # This script will be executed *after* all the other init scripts.
    # You can put your own initialization stuff in here if you don't
    # want to do the full Sys V style init stuff.

    touch /var/lock/subsys/local
    sh /usr/sbin/fsautomount
    sh /usr/sbin/unmute
    蓝色字体的部分就是自动挂载Windows分区的程序。注释中说明,这些脚本是在所有其它init脚本启动后才开始启动的。所以禁用不会影响到系统的正常运行。现在把系统自动挂载Windows分区功能禁用。修改后如下:
    #!/bin/sh
    #
    # This script will be executed *after* all the other init scripts.
    # You can put your own initialization stuff in here if you don't
    # want to do the full Sys V style init stuff.

    touch /var/lock/subsys/local
    #sh /usr/sbin/fsautomount 此行也可以直接删除。
    sh /usr/sbin/unmute
   
    呵呵,再次启动系统,原来自动挂载的Windows分区不见了。没有那么多挂载分区,感觉一下子清爽了许多。

排行榜 更多 +
机场大亨

机场大亨

模拟经营 下载
神椿市协奏中

神椿市协奏中

休闲益智 下载
炮击达人

炮击达人

休闲益智 下载