How to configure systemd to ignore fstab drive mount failures?
When I have first set up Ubuntu 15.04 (which is first to switch to systemd AFAIK) I was puzzled by why does it only boot some times and then become unbootable (failing to the systemd shell instead of proceeding to start X). I have chosen upstart boot from the grub menu and then came to the conclusion it fails to mount my Windows C: drive (which I have assigned a static mount point) and this is the reason. But the question is not why does it fail to mount it but why does it fail to boot then (given there are no files needed during the boot process on that drive) and how to overcome this.
I have also configured it to mount my USB hard drive to a static mount point as I want it to be found in a particular place and I hate it to appear on the Unity panel, needless to say this makes my system unbootable (unless I use upstart again) when I take my laptop somewhere without taking the USB drive with me.
How can this be fixed?
Solution 1:
As muru mentioned, add nofail
. But also add a low timeout with something like x-systemd.device-timeout=2
, because the default timeout seems to be 90 seconds.
Example from my fstab:
LABEL="test" /mnt/test ext4 defaults,nofail,x-systemd.device-timeout=4 0 2