Subject: Automount local CD?
To: None <netbsd-help@netbsd.org>
From: Richard Horwood <rich@mondial.com.au>
List: netbsd-help
Date: 05/12/1999 16:07:03
I'm trying to mount a local CD-ROM with amd.  I can mount nfs shares fine
with it, but for some reason I can't work out the syntax for local 
filesystems.

I start amd with the following command:

amd -l syslog -x map,error,noinfo,stats /mnt /etc/amd/amd.master

The offending line in /etc/amd/amd.master looks like this:

cdrom   host==<myhost>;type:=cdfs;dev:=/dev/cd0a

<myhost> is really my local hostname.

When i change directory to /mnt/cdrom, I see this in the logs:

[...] <myhost> amd[3586]: NIS domain name is not set.  NIS ignored.
[...]
[...] <myhost> amd[3586]: /a/<myhost>/mnt/cdrom: mount: Read-only file system
[...] <myhost> amd[3586]: mount_cdfs: Read-only file system

All looks ok, except I can'd change to /mnt/cdrom!  If I try, I get the 
following messages

As a regular user:
rich@<myhost>:/mnt>cd cdrom
bash: cd: cdrom: Read-only file system
rich@<myhost>:/mnt>

As Root:
# pwd
/mnt
# cd cdrom
cd: can't cd to cdrom

And amd logs this:
[...] <myhost> amd[3586]: /a/pc-rich/mnt/cdrom: mount: Read-only file system
[...] <myhost> amd[3586]: mount_cdfs: Read-only file system

What am I missing?  The amd documentation I have unhelpfully does not list
available options for fstype 'cdfs' so I've guessed to get what I have so
far.  Is it permissions, do I have to specify a 'readonly' flag in the
options, or what?

Any reason amd manpage(s) didn't come with my system, btw?

-Richard.