ubuntu 16.04 fstab因nobootwait而失败

我只是清理安装Ubuntu 16.04(替换14.04),意图移植大量的工作fstab文件,以便挂载其他JFS磁盘/分区。 但我似乎遇到了nobootwait

例如,在14.04中工作的一个fstab条目是:

 UUID= /storage jfs defaults,nodiratime,noatime,nofail,nobootwait 0 2 

但是在16.04中,它既不会在启动时挂载驱动器,也不会按照以下命令挂载:

 sudo mount /storage 

我安装了jfsutils,我可以手动挂载分区,即

 sudo mount -t jfs /dev/sdX /storage 

我发现这是在dmesg

 [ 6.720171] jfs: Unrecognized mount option "nobootwait" or missing value 

因此,当我从fstab中删除nobootwait选项时,将其作为提示

 sudo mount /storage 

工作良好。 (我不知道在启动时,因为我目前正在通过ssh执行此操作,并且不希望冒着计算机无法启动的风险)。

显然,一种解决方案是删除nobootwait选项。 但我不想这样做。 也许nobootwait从来没有工作(我从来没有磁盘的启动时失败)在14.04和14.04只是忽略了错误,但我想要假定的nobootwaitfunction。

Ubuntu 16.04或Linux内核是否有关于nobootwait

此选项似乎已被删除。 如果您在顶部选择14.04 LTS ,则fstab的Ubuntu 联机帮助页包含此文本:

 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). 

如果您在顶部选择16.04 ,则在您获得的页面版本中不存在此段落。

如果您只是想在16.04中查找如何复制nobootwait行为,那么您正在寻找的选项似乎是nofail 。 来自http://manpages.ubuntu.com/manpages/zesty/man5/systemd.mount.5.html

  nofail With nofail, this mount will be only wanted, not required, by local-fs.target or remote-fs.target. This means that the boot will continue even if this mount point is not mounted successfully. 

看起来有两个相关的选项需要设置来模仿nobootwait行为,取自systemd mount manpage :

  nofail With nofail, this mount will be only wanted, not required, by local-fs.target or remote-fs.target. This means that the boot will continue even if this mount point is not mounted successfully. x-systemd.device-timeout= Configure how long systemd should wait for a device to show up before giving up on an entry from /etc/fstab. Specify a time in seconds or explicitly append a unit such as "s", "min", "h", "ms". 

所以将选项设置为nofail,x-systemd.device-timeout=1应使系统等待1秒钟,以便在继续引导之前安装设备。

从Ubuntu 16.04开始,默认的init系统是systemd,它取代了mountall。 http://manpages.ubuntu.com/manpages/zesty/man5/systemd.mount.5.html提供了可能无需使用nobootwait的新选项。