当且仅当外部硬盘在启动时连接到计算机时,如何自动安装它?

当且仅当外部硬盘在启动时连接到计算机时,如何自动安装它?

我的笔记本电脑底座上连接着一个 eSATA 硬盘。遗憾的是,Ubuntu 启动时它不会自动挂载,而且由于硬盘没有总是计算机启动时该磁盘就会出现。当磁盘不存在时,Ubuntu 会发出警告。

如果在启动时磁盘存在,有没有办法挂载它?

答案1

我认为你可以安全地将你的驱动器添加到 fstab,我认为对于不总是存在的分区有一个选项,可能是“nofail”,尽管已知这会导致问题,比如只读文件系统,所以谨慎行事

更多信息:

   The  mountall(8)  program  that  mounts  filesystem  during  boot  also
   recognises additional options that the ordinary mount(8) tool does not.
   These  are:  ``bootwait''  which  can  be applied to remote filesystems
   mounted outside of /usr or /var, without which  mountall(8)  would  not
   hold up the boot for these; ``nobootwait'' which can be applied to non-
   remote filesystems to explicitly instruct mountall(8) not  to  hold  up
   the boot for them; ``optional'' which causes the entry to be ignored if
   the filesystem type is not known  at  boot  time;  and  ``showthrough''
   which  permits  a mountpoint to be mounted before its parent mountpoint
   (this latter should be used carefully, as it can cause boot hangs).

具体来说:

   ``optional'' which causes the entry to be ignored if
   the filesystem type is not known  at  boot  time

我怀疑它可以与文件系统类型autobootwait选项相结合,此外还会nofail导致系统加载驱动器(如果存在),如果驱动器不可用,则失败并继续。

考虑:曼·芒塔尔文件系统维护

相关内容