nofail in fstab still asks Press S to skip during boot

Asked by Chris Good

Hi,

Ubuntu 12.04.01 LTS

I have 2 external USB Drives which I use for backup.
I alternately have either 1 plugged in. I have used the nofail option in fstab to try to stop the boot process from asking:

The disk drive for /media/Passport1 is not ready yet or not present. Continue to wait or press S to Skip mounting...

But it still asks the question for the drive which is NOT plugged in.

man mount says :

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

Is this a bug?

/etc/fstab:
UUID=7ecd0957-9c46-4958-bf24-bb635271d4e5 / ext4 errors=remount-ro 0 1
UUID=7f698647-0a0c-48f1-994d-79d8ea3f4043 none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
UUID=2405d070-aacd-48b7-9bc5-7be9d09c2f42 /usr/local ext4 errors=remount-ro 0 2
UUID=2613cf1b-dc94-447f-91fb-575b0112686d /usr/tims ext4 errors=remount-ro 0 2
UUID=84295b7a-961c-4357-9790-2ce0acb1ae05 /data1 ext4 errors=remount-ro 0 2
UUID=95ddb6ca-0322-4da6-872b-9cfacdb53c57 /u ext4 errors=remount-ro 0 2
UUID=e2b812d7-63d0-485f-b28d-acbeb76b70de /spare ext4 errors=remount-ro 0 2
# 2 x WD My Passport 1TB USB3 :
LABEL=Passport1 /media/Passport1 ntfs defaults,windows_names,locale=en_US.utf8,nofail 0 0
LABEL=Passport2 /media/Passport2 ntfs defaults,windows_names,locale=en_US.utf8,nofail 0 0
# nfs
alansun:/ /alansun_root nfs defaults,ro,bg,vers=3 0 0
alansun:/usr/tims /alansun_usr_tims nfs defaults,ro,bg,vers=3 0 0
chcaix01:/u/i22/FACT/clientsubs/clients /u/i22/FACT/clientsubs/clients nfs defaults,rw,bg 0 0

I'm going to try the nobootwait & optional options also now...

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Solved by:
Chris Good
Solved:
Last query:
Last reply:
Revision history for this message
N1ck 7h0m4d4k15 (nicktux) said :
#1

Maybe this is not a problem . Because the drive is not present and fstab searches for the drive , then the message seems correct.

If you remove (or add a # symbol) at the begin of the entry of fstab the message will not appear.

Thanks

Revision history for this message
Chris Good (chris-good) said :
#2

Hi NikTh,

This is a problem because sometimes I want to have both Usb drives attached so I can copy between them.
I certainly do NOT want to have to edit fstab every time I connect or disconnect a USB drive.
It seems to me this is exactly what the nofail option is supposed to do.
If you disagree, please tell me what you think 'nofail' option is for?

Revision history for this message
N1ck 7h0m4d4k15 (nicktux) said :
#3

The 'nofail' option you try to use is correct . BUT for Linux FileSystems. I guess your external USB drives are FAT32 or NTFS so this option not applies.

Instead of fstab , maybe if you use udev rules , is better ?

Read here (Old but good) : http://ubuntuforums.org/showthread.php?t=168221

also

read here : https://bbs.archlinux.org/viewtopic.php?id=115262 (has a good example about udev , 6th post).

Thanks

Revision history for this message
Chris Good (chris-good) said :
#4

Hi NikTh,

I finally had time to test this.
My 12.04 'man mount' shows 'nofail' in section 'FILESYSTEM INDEPENDENT MOUNT OPTIONS' so I think it should apply to all file systems.

I solved this by using the 'nobootwait' option instead of nofail. I.e. /etc/fstab is now:

LABEL=Passport1 /media/Passport1 ntfs defaults,windows_names,locale=en_US.utf8,nobootwait 0 0
LABEL=Passport2 /media/Passport2 ntfs defaults,windows_names,locale=en_US.utf8,nobootwait 0 0

Now rebooting without one of the external USB drives plugged in, does not caused the boot process to ask:

    The disk drive for /media/Passport1 is not ready yet or not present. Continue to wait or press S to Skip mounting...

I'll now try using the udev rules to automatically mount/umount the external USB drives when they are plugged in or unplugged. Thanks for the links.

Revision history for this message
Ken Sharp (kennybobs) said :
#5

A recent apt-get upgrade has caused this bug on my system where it did not occur before.