Mount an external drive at boot time only if it is plugged in.
Posted
by
Jeremy
on Ask Ubuntu
See other posts from Ask Ubuntu
or by Jeremy
Published on 2010-11-22T06:12:20Z
Indexed on
2011/03/03
23:33 UTC
Read the original article
Hit count: 376
I've got an entry for an external harddrive in my fstab:
UUID="680C0FE30C0FAAE0" /jgdata ntfs noatime,rw
But sometimes this drive isn't plugged in at boot time. This leaves me half way through a boot, with a prompt to "Continue Waiting, press S or press M" but no keypress has any affect at this stage (including ctrl-alt-delete, not even caps-lock).
Short of writing a script to check the output of fdisk -l, how can I mount this drive at boot time only if it is present? It would be handy to have an fdisk entry for this drive, so I can just type mount /jgdata instead of needing a device name.
© Ask Ubuntu or respective owner