LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   CD Drive (https://www.linuxquestions.org/questions/linux-software-2/cd-drive-400828/)

lucasmtong 01-08-2006 06:40 AM

CD Drive
 
Hey all,

I recently installed a copy of what was formerly Mandrake 10 on my computer and I have been having issues with viewing the contents of the CD drive.

There is no problem installing packages off the OS CD which lead me to believe that is is mounted, I have checked fstab and its looks to be mounting it to ...mnt/cdrom however as I said before when I view the contents of mnt/cdrom there is nothing there. (I am also having the same problem with my USB HDD)

I am new at the whole Linux thing so i am not quite sure what files or logs to post. Any help would be greatly appreciated)

Regards,
lucasmtong

PS: This is the contents of fstab

/dev/hda1 / ext3 defaults 1 1
none /dev/pts devpts mode=0620 0 0
/dev/hda6 /home ext3 defaults 1 2
/dev/sda /mnt/USB auto noauto,owner,kuzu 0 0none
/dev/hdc /mnt/cdrom auto umask=0,user,iocharset=iso8859-15,codepage=850,ro,exec 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=ext2:vfat,--,umask=0,iocharset=iso8859-15,sync,codepage=850 0 0
none /mnt/hd supermount dev=/dev/hdb1,fs=ext2:vfat,--,umask=0,iocharset=iso8859-15,kudzu,codepage=850 0 0
none /proc proc defaults 0 0
/dev/hda5 swap swap defaults 0 0

trickykid 01-08-2006 07:58 AM

Use mount to see if it's actually mounted. And what type of cd's are you trying to view? If their media cd's, you don't view them, you play them. Only data cd's will show contents.

generic_genus 01-08-2006 09:16 AM

try using a mor minimal fstab file, I'd suggest

/dev/hda1 / ext3 defaults 1 1
/dev/hda6 /home ext3 defaults 1 2
/dev/hdb1 /mnt/hd auto defaults 1 3

/dev/sda /mnt/USB auto noauto,rw,users,exec,gid=100 0 0
/dev/hdc /mnt/cdrom iso9660 noauto,users,ro,exec,gid=100 0 0

/dev/fd0 /mnt/floppy auto noauto,users 0 0

none /dev/pts devpts mode=0620 0 0
none /proc proc defaults 0 0

This resembles my fstab and should work fine. I suggest once you have switched to this (backing up original), if it workks add the more advanced options (i.e. the iocharset and codepage). I have added the gid option as this ensures files mounted will be accesible by the users group.

Also you should check the permissions of /mnt/USB and /mnt/cdrom to check they are readable as a normal user, if run the following command as root:

chown <youruser>:users /mnt/USB /mnt/cdrom
chmod ug+wrx /mnt/USB /mnt/cdrom

lucasmtong 01-08-2006 08:10 PM

Thanks, that worked well, would you mind answering a few more questions?

I can now mount my CD drive and access it´s contents through both the standard and root user. However my second hard drive on my machine is now only mountable through the root user, hdb1. How would I go about setting permissions so the a standard user may mount and view its contents?(I have changed the permissions of the folder that is mounts to a). When i try to mount it I get a messages that reads ¨line 8 in fstab is bad¨ and that only the root may mount it.
Also when i try to mount my USB Drive i get a message informing me that line 11 in fstab is bad and that it can determine file system type and that there was none specified and I get this both in the root and normal account.

Cheers,
lucasmtong

generic_genus 01-09-2006 03:44 AM

To make your 2nd hdd mountable add "users" to the options (have a look at the usb for an example) and for good measure add gid=100. It should automatically be mounted at boot with the options I suggested, was it not doing this?

As for the usb problem I beleieve this is a typo by me, instead of /dev/sda it should be /dev/sda1.

lucasmtong 01-09-2006 05:52 AM

Hi, this is my current fstab file

/dev/hda1 / ext3 defaults 1 1
none /dev/pts devpts mode=0620 0 0
/dev/hda6 /home ext3 defaults 1 2
/dev/sda1 /mnt/USB auto noauto,rw,users,exec,gid=100 0 0
/dev/hdc /mnt/cdrom iso9660 noauto,users,ro,exec,gid=100 0 0
/dev/fd0 /mnt/floppy auto noauto,users 0 0
/dev/hdb1 /mnt/hd auto,users,defaults 1 3,gid=100
none /proc proc defaults 0 0none
none /mnt/removable supermount dev=/dev/scsi/host3/bus0/target0/lun0/part1,fs=ext2:vfat,--,umask=0,iocharset=iso8859-15,kudzu,codepage=850 0 0

I have made the changes you suggested generic_genus and and I am able to mount both drives without a problem under the root user. However when i try to mount hdb1 I under my normal user I get an error saying that lines 7 and 8 of fstab are bad and mount: can't find /mnt/hd in /etc/fstab or /etc/mtab. When i try to mount the USB drive I get the same error, except time time it appears to be mounted (when i right click in the GUI the option to mount has turned to unmount). When i select unmount i get the same error as well as it telling me that the device is busy.

generic_genus 01-09-2006 06:35 AM

The line for hdb1 has gid in the wrong place. The third column is for mount options (i.e. what gid is) and the last two columns are for backup and whether the drive should be checked. In the example below I set these both to "off" (read up on these and general fsatb layout at at http://www.tuxfiles.org/linuxhelp/fstab.html ).

/dev/hdb1 /mnt/hd auto,users,defaults,gid=100 0 0

Also the line with /proc should not have that "none" at the end, delete that and all should be good :)

No idea why this works correctly for root as the syntax is wrong, but hey it doesn't matter if it works in the end.

lucasmtong 01-10-2006 12:56 AM

I have gotten rid of the line errors but I still can not mount the drives under the normal user. When I try to mount hdb1 I get an error saying ¨mount: only root can mount /dev/hdb1 on /mnt/hd" and when i try to mount the USB drive i get an error ¨mount: special device /dev/sda1 does not exist¨.

Fstab as follows:

/dev/hda1 / ext3 defaults 1 1
none /dev/pts devpts mode=0620 0 0
/dev/hda6 /home ext3 defaults 1 2
/dev/sda1 /mnt/USB auto noauto,rw,users,exec,gid=100 0 0
/dev/hdc /mnt/cdrom iso9660 noauto,users,ro,exec,gid=100 0 0
/dev/fd0 /mnt/floppy auto noauto,users 0 0
/dev/hdb1 /mnt/hd auto,users,exec,gid=100 defaults 0 0
/dev/proc /proc proc defaults 0 0

-----Automaticly uses supermount when i turn my USB drive on----------------
none /mnt/removable supermount dev=/dev/scsi/host4/bus0/target0/lun0/part1,fs=ext2:vfat,--,umask=0,iocharset=iso8859-15,kudzu,codepage=850 0

In the line I see ´vfat´ my drive is NTFS, could this automatic mounting as vfat be the problem?

Thankyou,
lucasmtong

generic_genus 01-10-2006 05:48 AM

There still an error in the hdb1 line, you have:

/dev/hdb1 /mnt/hd auto,users,exec,gid=100 defaults 0 0

the defaults should not be on it's own, it should read (note the comma)

/dev/hdb1 /mnt/hd auto,users,exec,gid=100,defaults 0 0

Though I doesn't need to be there at all, just delete it.

stress_junkie 01-10-2006 07:41 AM

It also looks like the line for the proc fs has been changed and is incorrect. The line in the fstab that reads as

/dev/proc /proc proc defaults 0 0

should be

proc /proc proc defaults 0 0

or possibly

none /proc proc defaults 0 0

The first suggestion is the way it is in my fstab. The second suggestion is the way it was originally in your fstab and is a guess by me.

generic_genus 01-10-2006 08:01 AM

good catch there, glad someone had their eyes open :). Though I believe as it is fine (as its "critical for boot"), though change it just in case. (the second one is how it is in my fstab so pick whichever you want)

stress_junkie 01-10-2006 08:03 AM

The second one looks better to me than the first one. :)

generic_genus 01-10-2006 08:10 AM

I missed the ntfs question there. The dashed line made me think it was a signature. Anyways yes your right, try adding ntfs to fs section:

fs=ext2:vfat:ntfs

however I am not particularly familiar with supermount as I found gnome-volume-manager to much more flexible and easier to configure. As for /dev/sda1 not existing it takes a while for the drive to appear (5-10secs) so perhaps that is the problem as I thought it was previously working.

lucasmtong 01-11-2006 12:38 AM

I have tried the changes but I still can not asccess the drives under the normal user. When I try to mount hdb1 I get a permissions error that is the same as the one I mentioned in my last post. When I try to mount my UBB drive one of to things happens.

Under root: The first time it works and all goes smoothly. However other times I will get the error ¨special device /dev/sda1 does not exist

Under normal user: I get the error ¨special device /dev/sda1 does not exist¨

Could it be that the drive is not unmounting properly?

I have tried changing the folders and folder permissions that the drives mount to but still no luck.

fstab:

/dev/hda1 / ext3 defaults 1 1
none /dev/pts devpts mode=0620 0 0
/dev/hda6 /home ext3 defaults 1 2
/dev/hdb1 /mnt/Qfireball auto,users,rw,gid=100 defaults 0
/dev/sda1 /mnt/USBHDD auto noauto,rw,users,exec,gid=100 0 0
/dev/hdc /mnt/cdrom iso9660 noauto,users,ro,exec,gid=100 0 0
/dev/fd0 /mnt/floppy auto noauto,users 0 0
none /proc proc defaults 0 0

Kind regards,
lucasmtong

generic_genus 01-11-2006 05:05 AM

the hdb1 line is still wrong, the defaults part should not be there delete it and there should also be an extra 0 on the line so the correct version is:

/dev/hdb1 /mnt/Qfireball auto,users,rw,gid=100 0 0

As for why sda1 is disappearing it may be something to do with hotplug but to be honest I'm not entirely sure


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