[blfs-support] Autofs problem on LFS7.2

akhiezer lfs65 at cruziero.com
Sun Mar 24 11:11:09 PDT 2013


> Date: Sun, 24 Mar 2013 07:49:30 -0400
> From: "Cliff McDiarmid" <cliffhanger at gardener.com>
> To: "akhiezer" <lfs65 at cruziero.com>,
>         "BLFS Support List"
> 	<blfs-support at linuxfromscratch.org>
> Subject: Re: [blfs-support] Autofs problem on LFS7.2
>
> > ----- Original Message -----
> > From: lfs65 at cruziero.com
> > Sent: 03/23/13 07:16 PM
> > To: BLFS Support List
> > Subject: Re: [blfs-support] Autofs problem on LFS7.2
>
> > Can you ensure you're running as root, for now at least, when trying the 
> > automount stuff; it's ok to do it from 'su - ...' in a shell; and don't run it 
> > via sudo, for now at least. This is to try to contain any permissions issues that 
> > might be causing fails when you try it as an ordinary user. See also note below 
> > about testing as root at console and outside of X/gui/DE.
> > 
> > 
> > Kernel: is autofs compiled in or as a module:
> $ grep -iEC1 'experimental|autofs' /boot/config*
> CONFIG_EXPERIMENTAL=y
> CONFIG_BROKEN_ON_SMP=y
> --
	.
	.
> CONFIG_QUOTACTL=y
> CONFIG_AUTOFS4_FS=y
> # CONFIG_FUSE_FS is not set
> $
> > 
> > 
> > Modules: is autofs loaded:
> $ lsmod | grep -i auto
> None
> $
> > 


OK: it's compiled into kernel and not as a module.
If things _still_ don't work after stuff below, then an option may be to compile 
as a module: but I think we'd not need to go that route.


> > 
> > Misc supporting files: is it setup ok:
> $ grep -i auto /proc/filesystems /etc/filesystems /etc/nsswitch.conf
> /proc/filesystems:nodev autofs
> grep: /etc/filesystems: No such file or directory
> $
> > 


Just to check: you _do_ have an /etc/nsswitch.conf file, yes (the grep 
above doesn't complain about it being missing)?
Can you, just for ref and dbl-chk, post the current /etc/nsswitch.conf contents - 
omit commented-out stuff and blank lines.
Can you add the following near to the end of the file - e.g. just above the 
'aliases:        files' line:

automount:	files

It doesn't matter whether you use a tab or spaces in the line.
It's not always strictly necessary to have this entry in nsswitch.conf: but at 
least for debugging, it helps nail-down where info is being looked for by 
automount.


> > 
> > What does automount think of itself (so to speak):
> $ /etc/rc.d/init.d/autofs status
> Usage: /etc/rc.d/init.d/autofs 
> {start|forcestart|stop|restart|forcerestart|reload}
> $
> > 


 - brainfrt at this end, sorry.


> > 
> > Logged error messages - just include the lines from the most recent day's 
> > testing:
> $ grep -i auto /var/log/{debug,messages,syslog}
> Mar 24 11:33:55 +00:00 cliffhanger  Starting automount:  OK 
> (this was from boot.log, don't have the others, but checked kern.log, daemon.log and sys.log)
> $
> > 


Can you stop/kill the currently-running automount process, and verify via ps or 
similar that there's no automount processes running, and then run automount 
manually and in debug mode at console via:

$ automount -v -f -d 
$

'-v'==verbose,
'-f'=='foreground & log to stderr instead of syslog', 
'-d'=='debug-level of info'.
You might want to omit the '-d' at first in case it gives too much info.
Just use ctrl-c when you want to quit out of it.
Without the above-noted addition to /etc/nsswitch.conf , you should see automount 
complain about 'syntax error in nsswitch config near [ syntax error ]'  .
Can you post the output of a run without the '-d', and then with the '-d', that 
shows what happens when you plug in the usbstick.


> > 
> > Autofs default config:
> $ grep -vE '^[[:space:]]*(#|$)' /etc/sysconfig/autofs*
> /etc/sysconfig/autofs:TIMEOUT=300
> /etc/sysconfig/autofs:BROWSE_MODE="no"
> /etc/sysconfig/autofs:USE_MISC_DEVICE="yes"
> /etc/sysconfig/autofs.conf:automount=/sbin/automount
> /etc/sysconfig/autofs.conf:localoptions=''
> /etc/sysconfig/autofs.conf:daemonoptions='--timeout 60'
> /etc/sysconfig/autofs.conf:piddir=/var/run
> /etc/sysconfig/autofs.conf:pidroot=autofs
> $
> > 
> > 
> > If we need to delve into modules config, get some basic info:
> $ find -P /etc -xdev \( -iname '*module*' -o -iname '*modprobe*' \) -ls
> 826040    4 -rw-r--r--   1 root     root         1507 Jan 28 20:55 /etc/pango/pango.modules
> 826064    4 -rw-r--r--   1 root     root         1765 Jan 31 10:19 /etc/gtk-2.0/gtk.immodules
> 825876    4 -rw-r--r--   1 root     root          559 Dec 28 21:47 /etc/sysconfig/modules
> 825917    4 drwxr-xr-x   2 root     root         4096 Dec 29 20:18 /etc/modprobe.d
> 826046    4 drwxr-xr-x   2 root     root         4096 Feb  1 20:54 /etc/pkcs11/modules
> 826085    4 -rw-r--r--   1 root     root          293 Feb  1 20:54 /etc/pkcs11/modules/gnome-keyring.module
> 825879    0 lrwxrwxrwx   1 root     root           17 Dec 28 21:47 /etc/rc.d/rcS.d/S05modules../init.d/modules
> 825861    4 -rwxr-xr--   1 root     root         2160 Dec 28 21:47 /etc/rc.d/init.d/modules
> $
> > 
> > 
> > Misc environment:
> > --
> > * fstab: already covered, so OK here for now.
> > * hal: already said you're not running it.
> > * udev: is udev running?
> YES
>
> > * gui/de: are you testing automount from within a gnome session, or kde, or 
> >  what: what, if any, desktop environment are you using?
> From Command prompt, have no gui at present.
>
> > * ldap: are you running/using it on the machine?
> No
> > * selinux: are you running it?
> No
>
> > * have you tried automount stuff when logged in at console directly as root, 
> >  without any layers of 'su -' or 'sudo' or similar, and not running any 
> >  X/gui/DE ?
> Almost always as root
>
> > (( Btw, in case you're - reasonably - wondering at what point to 'cut' this attempt 
> > at autofs: if it's no-go just now, an option is to back-burner it for a month or 
> > so (at least wrt detailed-debug input from this end - obv you can test things 
> > yrself as/when you want) pending a blfs-7.2-based build at this end on some new 
> > machines (as part of their burn-in testing) and I could do a quick by-the-book 
> > lfs/blfs build (they're fast machines) to try to replicate more exactly your 
> > environment - recall that here am running slightly bsd-ish lfs-based systems (as 
> > well as bsd-ish Slackware and, er, the bsd-ish OpenBSD).
>
> I am just grateful to get this sorted, it has never worked on four LFS builds as mentioned.
> Will only ever be using at the command prompt, as I understand KDE(future gui)uses udisk for automounting?
>
> MAC 
>


Have left the above chunk of notes in-place in case we need to go onto that.



rgds,

akh




--



More information about the blfs-support mailing list