LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-10-2010, 12:36 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
mount -a won't mount the optical disks.


Hi:
Code:
bash-3.1$ cat /etc/fstab
/dev/hda2        swap             swap        defaults         0   0
/dev/hda3        /                ext2        defaults         1   1
/dev/hda1        /xp              vfat        defaults         1   0
/dev/hdb1        /sma             vfat        defaults         1   0

/dev/hdb2        /big             vfat        defaults         1   0
/dev/hdb5        /almacen         vfat        defaults         1   0

# /dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
/dev/hdc         /media/cdrom0    auto        noauto,owner,ro  0   0
/dev/hdd         /media/cdrom1    auto        noauto,owner,ro  0   0

devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
bash-3.1$
Code:
bash-3.1# mount -a       
mount: devpts already mounted or /dev/pts busy
bash-3.1#
This is all I get when issuing 'mount -a'. That is, it will never mount the optical disks I may have inserted in the drives. Why? Thanks.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 12-10-2010, 01:18 PM   #2
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Rep: Reputation: 234Reputation: 234Reputation: 234
Try to remove comment mark from that line in /etc/fstab:

Code:
# /dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0
and use mount /mnt/cdrom command to mount CD-ROM disk.
 
Old 12-10-2010, 01:28 PM   #3
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Thanks for your reply. My fault. I did not quite explain. As to mounting the CD-ROM, I always could do it and presently can. I do 'mount /media/cdrom0' and that works.
But 'mount -a' should do the job equally well according to mount's man page.

Last edited by stf92; 12-10-2010 at 01:33 PM.
 
Old 12-10-2010, 01:32 PM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by stf92 View Post
But 'mount -a' should do the job equally well according to mount's man page.
Not if the relevant line is commented out of fstab as w1k0 pointed out.
 
Old 12-10-2010, 01:36 PM   #5
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
But the line beginning with /dev/hdc is also relevant, as 'mount /dev/hdc' being succesful proves.
 
Old 12-10-2010, 01:47 PM   #6
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by stf92 View Post
But the line beginning with /dev/hdc is also relevant, as 'mount /dev/hdc' being succesful proves.
Sorry -- missed those

Does the --verbose option give any clues?
 
Old 12-10-2010, 01:53 PM   #7
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
It limits ifself to list the mounted devices. I think may be the guys at the slack LQ forum can have some experience. I did not touch anything since last instalation, and each new one has the same effect regarding mount.

I assume that is the cost of choosing Slack, and O.S. for experts [?], notwithstanding their slogans.

Last edited by stf92; 12-10-2010 at 01:56 PM.
 
Old 12-10-2010, 03:34 PM   #8
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Rep: Reputation: 234Reputation: 234Reputation: 234
In order to mount these media with mount -a command change in the following lines noauto switch to auto:

Code:
/dev/hdc         /media/cdrom0    auto        noauto,owner,ro  0   0
/dev/hdd         /media/cdrom1    auto        noauto,owner,ro  0   0
 
2 members found this post helpful.
Old 12-10-2010, 04:15 PM   #9
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
mount ignores all lines with "noauto" in the option portion except for a specific mount. The "auto" in the type field. (But, if you change it to "auto" as w1k0 suggested, your system will fail to boot unless you have disks in both your drives when you boot.)

Here's a little code to illustrate the way to use "noauto":
Code:
# grep -w cifs /etc/fstab # List the samba shares in fstab"
//192.168.0.4/Books     /home/Peter/TRENHOLME/Books     cifs noauto,uid=Peter,gid=Peter,credentials=/home/Peter/.smb_credentials,rw 0 0
//192.168.0.4/Documents /home/Peter/TRENHOLME/Documents cifs noauto,uid=Peter,gid=Peter,credentials=/home/Peter/.smb_credentials,rw 0 0
//192.168.0.4/FEBE      /home/Peter/TRENHOLME/FEBE      cifs noauto,uid=Peter,gid=Peter,credentials=/home/Peter/.smb_credentials,rw 0 0
//192.168.0.4/Public    /home/Peter/TRENHOLME/Public    cifs noauto,uid=Peter,gid=Peter,credentials=/home/Peter/.smb_credentials,rw 0 0
//192.168.0.4/S         /home/Peter/TRENHOLME/S         cifs noauto,uid=Peter,gid=Peter,credentials=/home/Peter/.smb_credentials,rw 0 0
//192.168.0.4/U         /home/Peter/TRENHOLME/U         cifs noauto,uid=Peter,gid=Peter,credentials=/home/Peter/.smb_credentials,rw 0 0
//192.168.0.4/Users     /home/Peter/TRENHOLME/Users     cifs noauto,uid=Peter,gid=Peter,credentials=/home/Peter/.smb_credentials,rw 0 0
# umount -al -t cifs #Unmount all of them
# mount | grep -w cifs # Show that they're all unmounted 
# mount -a  # Try to mount everything
nothing was mounted
# mount | grep -w cifs # Show that the shares are still not mounted
# for mp in $(ls -d /home/Peter/TRENHOLME/*);do mount $mp; done # Mount each one specifically
# mount | grep -w cifs  # Verify that they are now mounted
//192.168.0.4/Books on /home/Peter/TRENHOLME/Books type cifs (rw)
//192.168.0.4/Documents on /home/Peter/TRENHOLME/Documents type cifs (rw)
//192.168.0.4/FEBE on /home/Peter/TRENHOLME/FEBE type cifs (rw)
//192.168.0.4/Public on /home/Peter/TRENHOLME/Public type cifs (rw)
//192.168.0.4/S on /home/Peter/TRENHOLME/S type cifs (rw)
//192.168.0.4/U on /home/Peter/TRENHOLME/U type cifs (rw)
//192.168.0.4/Users on /home/Peter/TRENHOLME/Users type cifs (rw)
Note that the GNOME virtual file system should automatically mount your optical, removable, media when you insert it. (Fixed optical devices should, of course, be in fstab without the "noauto" option, but I suspect that you aren't using that type of disk.)

Last edited by PTrenholme; 12-10-2010 at 04:34 PM. Reason: cut/paste error
 
Old 12-11-2010, 12:31 AM   #10
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Thanksto both of you. I must postpone my answer because I'm going to bed now.
 
Old 12-11-2010, 06:13 AM   #11
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by stf92 View Post
Thanksto both of you. I must postpone my answer because I'm going to bed now.
Bah! Real Linux hackers don't sleep!
 
Old 12-11-2010, 10:02 AM   #12
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Thanks for the compliment.

I should have made special mention of PTrenholme. My apologize. I do it now. It's unbelievable: the manual is very specific about the options auto and noauto and I have missed them notwithstanding the fact I have read it several times (skimmed through it rather, it's 1384 lines long in my system). Happy to see how a simple 'mount -a' will mount all optical disks. And happy to see how my manuals match the fact, although I frequently wonder if the manual matches the software version.

Lets mark SOLVED, then, and thanks a lot.

Last edited by stf92; 12-11-2010 at 10:10 AM.
 
  


Reply



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
How to allow any user to mount disks with the mount command Windows to Linux Linux - Software 6 11-29-2010 06:21 PM
I need help getting new disks to mount shango Linux - Hardware 6 05-14-2007 11:52 AM
Can't mount _BLANK_ optical media grautu Slackware 7 04-14-2007 12:36 PM
can only mount one optical drive still cjae SUSE / openSUSE 2 03-29-2006 11:22 AM
Hald-subfs-mount Unmounts Usb Disks Directly After Mount dop SUSE / openSUSE 0 03-16-2006 10:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:26 PM.

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