Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Mounting Audio CD's

  • 07-02-2003 7:49pm
    #1
    Registered Users, Registered Users 2 Posts: 23,212 ✭✭✭✭


    Hi All,

    I'm having a problem with Mandrake Linux 8.1. In short, I can't mount audio CD's.

    I installed it originally, had a few USB problems, recompiled my kernel (2.4.20) and fixed the USB problems. I can mount data CD's without problem, so it appears a filesystem problem as opposed to a hardware problem.

    Here's whats in my /etc/fstab:
    /dev/hdb1 / ext2 defaults 1 1
    none /dev/pts devpts mode=0620 0 0
    none /dev/shm tmpfs defaults 0 0
    /dev/hdc /mnt/cdrom iso9660 user,iocharset=iso8859-15,umask=0,exec,codepage=850,ro 0 0
    /dev/hdd /mnt/cdrom2 auto user,iocharset=iso8859-15,umask=0,exec,codepage=850,ro,noauto 0 0
    /dev/fd0 /mnt/floppy auto user,iocharset=iso8859-15,umask=0,sync,exec,codepage=850,noauto 0 0
    /dev/hda1 /mnt/windows vfat iocharset=iso8859-15,umask=0,codepage=850 0 0
    none /proc proc defaults 0 0
    /dev/hdb6 /usr ext2 defaults 1 2
    /dev/hdb5 swap swap defaults 0 0

    As a side note, I am unable to mount my Windows partition either (despite having VFAT filesystem compiled into the kernel).

    Any ideas? I thought the problem might be in the options I chose during compilation, but I have ensured that everything to do with CD-ROMs is selected.

    Thanks,

    TD.


Comments

  • Closed Accounts Posts: 6,718 ✭✭✭SkepticOne


    To play audio CDs you don't need to mount them, you just run a CD player program. CD ripping programs don't mount the CD either, they just access the device directly. (just make sure that the correct device is selected).

    Not sure about the VFAT issue. In root, type:

    mount /dev/hda1 /mnt/windows -t VFAT

    What errors are output?


  • Registered Users, Registered Users 2 Posts: 23,212 ✭✭✭✭Tom Dunne


    That actually worked! I can now see my windows partition, though I had to use lower case vfat. I was using KwikDisk, which reads /etc/fstab and attempts to mount a disk based on what's in there. I had tried every combination of the mount command, I didn't realise that was all I needed.

    As for the audio CD's, when I run KCD it tells me I may not have access to /dev/cdrom. Now /dev/cdrom doesn't exist. But before I recompiled my kernel, I was able to play audio CD's, so I doubt the recompile would have destroyed /dev/cdrom, would it?

    Would a softlink from /dev/cdrom to /dev/hdc do the trick? (/dev/hdc is my cdrom drive).


  • Closed Accounts Posts: 6,718 ✭✭✭SkepticOne


    Originally posted by tom dunne
    As for the audio CD's, when I run KCD it tells me I may not have access to /dev/cdrom. Now /dev/cdrom doesn't exist. But before I recompiled my kernel, I was able to play audio CD's, so I doubt the recompile would have destroyed /dev/cdrom, would it?

    Would a softlink from /dev/cdrom to /dev/hdc do the trick? (/dev/hdc is my cdrom drive).
    Yes. /dev/cdrom is normally a symbolic link to the actual cdrom device (/dev/hdc, /dev/hdd etc).

    Check whether there is such a link there already:

    ls -ls /dev/cdrom

    What is it pointing to?

    and also whether the permissions are such that the ordinary user can access it. Same needs to be the case for the device itself, /dev/hdc.


  • Registered Users, Registered Users 2 Posts: 23,212 ✭✭✭✭Tom Dunne


    No, /dev/cdrom is not there:

    ls -ls /dev/cdrom
    ls: /dev/cdrom: No such file or directory

    /dev/hdc has the following:

    ls -ls /dev/hdc
    0 brw-rw---- 1 root disk 22, 0 Aug 30 2001 /dev/hdc

    A question, though, if /dev/cdrom is not there, how come I can use data CD's without problem? It's only audio CD's that I can't.


  • Closed Accounts Posts: 6,718 ✭✭✭SkepticOne


    The symbolic link /dev/cdrom is purely for convenience. It is not required for mounting cdroms or playing audio cds except in the case where the program is hardwired to read from a device called /dev/cdrom. You can mount cdroms by mounting the appropriate device directly rather than via a symbolic link.

    The only advantage of the symbolic link /dev/cdrom is that it allows you to specify a "default" cd device. If you add a new cd drive, you can update your symbolic link to the new device and they will all read from whatever the link is now pointed to. However, you should not need to rely on the link - programs should have the facility to read from whatever device you specify.

    When you go mount /mnt/cdrom, the mount program is looking up /etc/fstab and reading this line:

    /dev/hdc /mnt/cdrom iso9660 user,iocharset=iso8859-15,umask=0,exec,codepage=850,ro 0 0

    It then finds that the device associated with /mnt/cdrom is /dev/hdc. If you did not have this line, you could still mount the drive with:

    mount /dev/hdc /mnt/cdrom -t iso9660

    If you create the symbolic link, then you can go:

    mount /dev/cdrom /mnt/cdrom -t iso9660

    but this is not strictly necessary.


  • Advertisement
  • Closed Accounts Posts: 741 ✭✭✭longword


    What Skeptic means to say is

    ln -s /dev/hdc /dev/cdrom

    BTW, you'll notice that non-root users can't write to your mounted Windows partition. If you want to open that up, add the option -o umask=000 to the end of the mount command line.


  • Registered Users, Registered Users 2 Posts: 23,212 ✭✭✭✭Tom Dunne


    Sorted - though it took a reboot after I created /dev/cdrom.

    Thanks for all your help.

    And longword - I prefer to keep it that way, I don't want to inadvertantley write something to the windows partition. (not that I actually knew it was set up that way:D )


  • Closed Accounts Posts: 741 ✭✭✭longword


    You can explicitly make it read-only with the mount option -o ro. Or you can make all of the files owned (and thus writeable) by a specific user with -o uid=500 or something like that. But I'm guessing you'll be quite happy to leave it as it is.


  • Registered Users, Registered Users 2 Posts: 3,308 ✭✭✭quozl


    your hdc drive (cdrom) belongs to root:disk. If you're logged in as an ordinary user you won't have access permissions to use the drive for stuff like cd-playing unless you've added yourself to the disk group. See if you can play cd's as root, and if you can then it's almsot certainly a permissions problem.
    Greg


  • Closed Accounts Posts: 741 ✭✭✭longword


    Originally posted by quozl
    your hdc drive (cdrom) belongs to root:disk. If you're logged in as an ordinary user you won't have access permissions to use the drive
    Some distributions (I'm thinking at least Red Hat here) change the ownership of a number of devices, such as /dev/dsp and /dev/cdrom, to grant access to whoever logs in on the console through the pam_console.so plugin. It's configured through /etc/security/console.perms


  • Advertisement
  • Closed Accounts Posts: 5,563 ✭✭✭Typedef


    Usually what I do is.

    ln -sf /dev/hdc /dev/cdrom

    chmod 777 /dev/cdrom


  • Registered Users, Registered Users 2 Posts: 23,212 ✭✭✭✭Tom Dunne


    Now that I had that sorted, I recompiled my kernel (a few more times) to get CD-Writing enabled.

    The fun began all over again as my devices went from /dev/hdc and /dev/hdd to /dev/scd0 and /dev/scd1. But I pointed /dev/cdrom to /dev/scd0 and /dev/cdrom2 to /dev/scd1 and I am back listening to Audio CD's after burning my first CD in Linux.

    I now can't see any reason I need to go back to Windowze.

    Thanks again for all your help.
    :D


  • Closed Accounts Posts: 102 ✭✭Something


    luser@typedefsbox~# rm -rf /dev/cdrom

    :)


  • Closed Accounts Posts: 5,563 ✭✭✭Typedef


    Are you still sulking because logic nuked your router Fuller?

    bad.

    Note: good luck rm -rfing a read-only filesystem.

    bleat bleat.

    dare to slack.


  • Registered Users, Registered Users 2 Posts: 10,846 ✭✭✭✭eth0_


    Originally posted by Typedef

    Note: good luck rm -rfing a read-only filesystem.

    lol, maybe he meant to eject the cd :)


  • Closed Accounts Posts: 6,718 ✭✭✭SkepticOne


    Originally posted by Typedef
    Note: good luck rm -rfing a read-only filesystem.
    It would be the device special file he would be deleting not the file system. It is possible to do this if the permissions are set wrong.


Advertisement