Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 13 Nov 1996 10:34:10 +0100
From:      Lars Koeller <lkoeller@odie.physik2.uni-rostock.de>
To:        af@biomath.jussieu.fr
Cc:        jxh@cs.wustl.edu (James Hu), freebsd-questions@freebsd.org, Lars_Koeller@odie.physik2.uni-rostock.de
Subject:   Re: amd and CDROM 
Message-ID:  <199611130934.KAA13211@odie.physik2.uni-rostock.de>
In-Reply-To: af's message of Tue, 12 Nov 1996 23:39:32 %2B0100. <199611122239.XAA07116@tom.biomath.jussieu.fr> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <199611122239.XAA07116@tom.biomath.jussieu.fr>,
af@biomath.jussieu.fr writes:

>James Hu wrote / a ecrit:
>> Hello!
>> 
>> I am trying to get my CDROM drive to auto-mount and auto-unmount via
>> amd.  What I would like is to be able to ``cd /cdrom'', and have it
>> automatically mounted for me.  Then when I cd out of it via ``cd /''
>> the CDROM automatically unmounts, so that I can press eject.
>> 
>> However, my attempts have produced utter failures.  Clearly, I do not
>> understand the format of the amd map file and the amd command line
>> options, or how they interact.
>> 
>> What I have tried is to create an entry in fstab for the CDROM:
>> /dev/cd0a       /cdrom  cd9660  noauto,ro       0 0
>> 
>> Then, I wanted to create an entry an amd.map entry which corresponds to
>> /cdrom.  I tried something like:
>> cdrom           type:=program;mount:="/sbin/mount mount /cdrom";unmount:="/s
    >bin/umount umount /cdrom"
>> 
>> and attempted with calls to amd which looked like:
>> amd / amd.cdrom.map
>> 
>> but this seems to lock up the machine.  Has anyone tried something
>> similar and with better results than what I have been able to produce?
>> 
>
>I would never claim to have a good  understanding  of  how  amd  works
>(sometimes I wonder if anyone but its author has) but I'm pretty  sure
>that starting amd with / as a map mount point is a bad idea. Amd takes
>control over any directory specified as parameter and wants to resolve
>any  access below that point through the associated map. In your case,
>you're  telling amd how to "resolve" the cdrom dir under /, but you're
>not giving it any rule for the other dirs. They  become  inaccessible.
>
>I'm afraid starting at / would never succeed whatever your efforts  to
>specify a correct map would be,  since  amd  itself  needs  to  access
>files,   and   those   file   are   somewhere   below  /  of   course.
>
>As  a  starter,  I'd  make  /cdrom  a  soft  link  to  something  like
>/amd/cdrom,  and  start  amd  with  "/amd"  instead  of "/"  as  first
>parameter.  You also need to add a rule for everything but cdrom under
>/amd that just makes it a link to the local filesystem. That goes with
>a  "*" as  key,  but  unfortunately  the machine I have amd maps on is
>currently down, so I can't be more specific. Check the example for the
>"hosts" map in amd's  documentation,  that  will  give  you  an  idea.
>
>Good  luck  with  amd  -- you need it... and if you get replies from a
>true amd guru take his word over mine (and give me his e-mail  address
>;-)
>

Hi! I've a similar Problem, but here's the problem:

      Since several weeks I try to bring up the amd with  a simple map. (No
   help in the Handbook/FAQ or Mail-Archive!):

/defaults	opts:=ro,soft,intr,grpid,nosuid,timeo=50
troll_cd	type:=nfs;rhost:=troll;rfs:=/cdrom;type:=nfs
odie_cd		type:=link;fs:=/cdrom
odie_fd0	type:=ufs;opts:=rw;dev:=/dev/fd0
odie_fd	1	type:=ufs;opts:=rw;dev:=/dev/fd1
dos_fd0		type:=program;\
		mount:="/sbin/mount mount -t msdos /dev/fd0 ${fs}";\
		unmount:="/sbin/umount /dev/fd0"

   I start amd in the following way as root:

amd -a /amd -l syslog /host /etc/amd.map

   when I exec a 'll /host/dos_fd0' an root, I get the following error:

amd[25024]/error: /host/dos_fd0: mount (afs_cont): Operation not permitted

   and amq shows

612 # amq
/             root     "root"                                      
odie:(pid24695)
/host         toplvl   /etc/amd.map                                /host
/host/dos_fd0 program  mount_msdos /dev/fd0 /amd/odie/host/dos_fd0 
/amd/odie/host/dos_fd0


       I also tried  to replace  the  working  troll_cd nfs mount  with the
   program type, to see if it's a error only for  the type:=program, but it
   didn't work too with the same error.

   All the ufs mounts or when doing them manually work well!

      What's wrong here? I think it coudn't be a problem of the permissions
   couse I'm root! I also tried mount_msdos instead of  mount -t msdos; the
   same error.

   It looks like a missing directory in /amd/... where to mount the fs into.

   Who can help?

   Thanks

   Lars




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199611130934.KAA13211>