LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mount -a won't mount the optical disks. (https://www.linuxquestions.org/questions/linux-newbie-8/mount-a-wont-mount-the-optical-disks-849516/)

stf92 12-10-2010 12:36 PM

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.

w1k0 12-10-2010 01:18 PM

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.

stf92 12-10-2010 01:28 PM

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.

catkin 12-10-2010 01:32 PM

Quote:

Originally Posted by stf92 (Post 4187290)
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.

stf92 12-10-2010 01:36 PM

But the line beginning with /dev/hdc is also relevant, as 'mount /dev/hdc' being succesful proves.

catkin 12-10-2010 01:47 PM

Quote:

Originally Posted by stf92 (Post 4187299)
But the line beginning with /dev/hdc is also relevant, as 'mount /dev/hdc' being succesful proves.

Sorry -- missed those :redface:

Does the --verbose option give any clues?

stf92 12-10-2010 01:53 PM

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.

w1k0 12-10-2010 03:34 PM

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


PTrenholme 12-10-2010 04:15 PM

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.)

stf92 12-11-2010 12:31 AM

Thanksto both of you. I must postpone my answer because I'm going to bed now.

catkin 12-11-2010 06:13 AM

Quote:

Originally Posted by stf92 (Post 4187695)
Thanksto both of you. I must postpone my answer because I'm going to bed now.

Bah! Real Linux hackers don't sleep! :D

stf92 12-11-2010 10:02 AM

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.


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