LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 07-09-2007, 05:40 PM   #1
rwcooper
Member
 
Registered: Mar 2006
Posts: 123

Rep: Reputation: 20
autofs doesn't mount my CD


Hi,

I'm working my way through the BLFS 6.2 book after having completed the LFS 6.2 installation. I'm at the point where I have installed autofs. I thought I should test it by inserting a CD into my CD-Rom drive. I don't see anything appearing under /media. I thought I might see something like /media/cdrom to which I could cd.

1) What should I expect to see when a CD is inserted into the drive?
2) Is there something other than inserting the CD into the drive I need to do?

Here is the output from several commands:

#/etc/rc.d/init.d/autofs status

Configured Mount Points:
/media file /etc/auto.misc
cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom

Active Automount Daemons:
/sbin/automount -p /var/run/autofs.media.pid --timeout 60 /media file /etc/aut
o.misc

Actively Automounted Directories:

#ls -l /dev/cdrom
lrwxrwxrwx 1 root root 3 2007-07-09 11:31 /dev/cdrom -> hdc

#ls -l /media
total 0

#ls -ld /media
drwxr-xr-x 2 root root 0 2007-07-09 11:31 /media

If I try mkdir /media/cdrom I'm told that I don't have permission to do that even though I am root.

I was expecting to see /media/cdrom, be able to cd to /media/cdrom and do an ls to see the files on the CD.

I'd appreciate any suggestions on how to go about solving my problem.

Thanks,
Randy
 
Old 07-09-2007, 07:16 PM   #2
kevkim55
Member
 
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353

Rep: Reputation: 32
See if you can mount it manually.

As root user, run the following command:

Quote:
mount -v /dev/hdc /mnt/cdrom
Ofcourse, /mnt/cdrom must exist for the above command to work.

Quote:
If I try mkdir /media/cdrom I'm told that I don't have permission to do that even though I am root.
If you autofs enabled, the automount daemon watches, creates and removes directories under /media as and when the mount points are accessed and will not let you create or delete directories/files as long as you have the automount daemon running.

Quote:
Active Automount Daemons:
/sbin/automount -p /var/run/autofs.media.pid --timeout 60 /media file /etc/aut
o.misc
That "--timeout 60" paramaeter tells the automount daemon to unmount the already mounted filesystems on /media after 60 secs of inactivity.

You can also have the cd mounted automatically every time a cd is inserted by including the following line in /etc/fstab:

Quote:
/dev/cdrom /mnt/cdrom auto defaults,ro,users 0 0

Try mounting manually and see if that works, post the results here.
 
Old 07-10-2007, 10:16 AM   #3
rwcooper
Member
 
Registered: Mar 2006
Posts: 123

Original Poster
Rep: Reputation: 20
Hi,

Thanks for the reply. I should have stated that mounting the CD manually as root works fine.

After posting my question I powered off my LFS system. This morning it occurred to me that perhaps I should be looking for /media/cd.

If I enter ls /media/cd, the CD is mounted and I see a listing of the files on the CD. I can cd to this directory and move around within the directory structure just fine.

Randy
 
Old 07-12-2007, 07:44 PM   #4
kevkim55
Member
 
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353

Rep: Reputation: 32
Quote:
If I enter ls /media/cd, the CD is mounted and I see a listing of the files on the CD. I can cd to this directory and move around within the directory structure just fine.
So, your prob is solved, eh ?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Performance: autofs versus mount registering Linux - Networking 2 04-20-2007 07:03 AM
using autofs to mount ext3 filesystem markcowley Linux - Software 5 07-17-2006 01:18 PM
autofs does not mount removable disk sohmc Linux - Software 0 08-27-2005 04:41 PM
how to mount fstab vs autofs rrich100 Red Hat 1 11-13-2003 11:46 PM
nfs mount with fstab vs autofs rrich100 Linux - Networking 2 11-13-2003 10:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 04:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration