[blfs-support] Configuring autofs

Dan McGhee beesnees at grm.net
Sat Dec 7 13:12:27 PST 2013

On 12/07/2013 10:33 AM, Dan McGhee wrote:
> On 12/07/2013 09:57 AM, William Harrington wrote:
>> On Dec 7, 2013, at 9:40 AM, Dan McGhee wrote:
>>> I've not been  successful in getting autofs to work.
>> There's a huge thread from earlier this year with autofs and LFS 7.2.
>> It may shed some light into helping you:
>> http://thread.gmane.org/gmane.linux.lfs.beyond.support/46321
>> Sincerely,
>> William Harrington
> That's one thing I forgot to do in my troubleshooting--check the list
> archives. Thanks, William.
> But, that thread was unresolved. At least, there was never a solution
> posted.
I'm really "red-faced" about that one. I don't know what happened 
earlier, but what I was looking at earlier following the link William 
quoted ended before the final resolution. I apologize to William for 
doing the work recommending that to me and also to akheizer and Cliff 
for discounting the great work they did.

Anyway, it was the "file:/etc/auto.usb" that fixed it for me.

But I still need to solve something. Here's my /etc/auto.usb
> # This is an automounter map and it has the following format
> # key [ -mount-options-separated-by-comma ] location
> # Details may be found in the autofs(5) manpage
> usb[!0-9] -fstype=auto :/dev/sd[a-z][1-9]
> memstick -fstype=auto :/dev/sdb1
Oh, BTW, /etc/auto.master creates the directory /mnt/removable for usb 

Right now my "stick" mounts at /mnt/removable/memstick when I insert it 
into a usb slot. I'm trying to account for having a number of usb 
devices in use and having them appear as /dev/sd??. I left the external 
disks alone while I was troubleshooting automount and wrote the specific 
entry for the stick. However, I'd like to change that to a "general" 
name too so that I don't have to worry about inserting it first all the 

I don't know if this file is the place to do that though. I could write 
a "persistent" udev rule for the drives and specifically list them, but 
that seems counter to the idea of the "--ghost" option in 
/etc/auto.master. I don't want to have to remember what each drive is. 
Ultimately, I'd like to get the different partitions of these drives 
mounted in /mnt/removable/$VOLUME_NAME. But I won't be able to do that 
until I get the different partitions to mount in the first place. I 
thought a regex would work.

The other thing too is that when I initially ran <automount -vfd> it 
complained about not finding /etc/nsswitch.conf. It was right. That file 
wasn't there. I did a not too exhaustive search, but couldn't find 
anywhere in the build or configuration instructions for anything, 
creating /etc/nsswitch.conf. Did I miss something somewhere? If I did, I 
want to go back to where I missed it and see if I missed anything else.


More information about the blfs-support mailing list