Saturday 24 March 2018

linux - fstab on boot: mount when device is plugged in


I have an external USB drive which I want to be mounted automatically on boot when it is plugged in. With the current settings in fstab, mount will try to mount it even when it is not available, which produces a filesystem error. Is there an option for an fstab entry to declare that it should be mounted only when available? My current entry is as follows:


UUID=myawesomeid /media/usb1 ext3 rw,async,user,auto 0 2



Answer



You want the nofail mount option.


man mount



nofail Do not report errors for this device if it does not exist.



No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...