ubuntu 16.04 fstab失败,出现nobootwait


16

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

例如,在14.04中有效的一个fstab条目是:

UUID=<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

因此,以此为提示,当我nobootwait从fstab中删除该选项时,该命令

sudo mount /storage 

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

显然,一种解决方案是删除该nobootwait选项。但是我不想那样做。也许nobootwait在14.04和14.04中从未起作用(我从未遇到过磁盘启动时故障),只是忽略了该错误,但是我想要的假定功能nobootwait

在Ubuntu 16.04或linux内核方面是否有所更改nobootwait


当我将计算机升级到16.04时,这也发生在我身上。根据我的经验nobootwait,可以选择删除该记录,但是我在任何地方都找不到记录。我将其替换为nofail
有机大理石

@Organic Marble很高兴来到这里,我并没有完全的想法。谢谢。我仍然想获得nobootwait功能。
codechimp

Answers:


12

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

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,则此版本在您所获得页面的版本中不存在。


8
有没有人有可行的替代方案?您知道吗,除了添加菜单noauto选项然后mount -a通过rc.local带有@reboot标志的cron作业或从cron作业调用的骇人方式之外,还可以吗?
约翰·黑莓

10

如果您只是想nobootwait在16.04中复制行为,似乎您正在寻找的选项是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.

6
两者之间有根本的区别:在放弃之前nofail等待1.5分钟nobootwait根本没有等待。
rustyx

10

看起来有2个相关选项需要设置以模仿nobootwait行为,该选项取自systemd mount手册页

   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秒钟等待设备安装。


0

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


3
链接可能会消失,请您在此处复制相关信息吗?
Dr_Bunsen '17

@Dr_Bunsen为了方便起见,该链接是在线联机帮助页,您也可以运行man systemd.mount以在本地查看同一文件。
Skylar Ittner's

7
发布相关信息是通常的事情。
Dr_Bunsen'9
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.