Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have an eSATA harddrive connected to my laptop's dock. Unfortunately it doesn't automatically mount when Ubuntu boots, nor is editing fstab an option, given that the harddrive is not always present when the computer boots. When the disk is absent, Ubuntu will complain.

Is there a way to mount the disk if it's present at boot-time?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I think that you can safely add your drive to fstab, I think there's an option for partitions that are not always present, possibly 'nofail', though that has been known to cause problems, like read-only file-system, so proceed cautiously

More information:

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

specifically:

   ``optional'' which causes the entry to be ignored if
   the filesystem type is not known  at  boot  time

which I suspect could be combined with a filesystem type of auto and the bootwait option , in adition to nofail to cause the system to load the drive if present, and to fail and proceed if the drive is unavailable.

consider: man mountall and man fstab

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.