LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-08-2006, 06:40 AM   #1
lucasmtong
LQ Newbie
 
Registered: Jan 2006
Posts: 7

Rep: Reputation: 0
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
 
Old 01-08-2006, 07:58 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
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.
 
Old 01-08-2006, 09:16 AM   #3
generic_genus
Member
 
Registered: Oct 2005
Distribution: Gentoo Unstable
Posts: 51

Rep: Reputation: 15
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

Last edited by generic_genus; 01-08-2006 at 09:18 AM.
 
Old 01-08-2006, 08:10 PM   #4
lucasmtong
LQ Newbie
 
Registered: Jan 2006
Posts: 7

Original Poster
Rep: Reputation: 0
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
 
Old 01-09-2006, 03:44 AM   #5
generic_genus
Member
 
Registered: Oct 2005
Distribution: Gentoo Unstable
Posts: 51

Rep: Reputation: 15
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.
 
Old 01-09-2006, 05:52 AM   #6
lucasmtong
LQ Newbie
 
Registered: Jan 2006
Posts: 7

Original Poster
Rep: Reputation: 0
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.
 
Old 01-09-2006, 06:35 AM   #7
generic_genus
Member
 
Registered: Oct 2005
Distribution: Gentoo Unstable
Posts: 51

Rep: Reputation: 15
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.

Last edited by generic_genus; 01-09-2006 at 06:40 AM.
 
Old 01-10-2006, 12:56 AM   #8
lucasmtong
LQ Newbie
 
Registered: Jan 2006
Posts: 7

Original Poster
Rep: Reputation: 0
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
 
Old 01-10-2006, 05:48 AM   #9
generic_genus
Member
 
Registered: Oct 2005
Distribution: Gentoo Unstable
Posts: 51

Rep: Reputation: 15
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.
 
Old 01-10-2006, 07:41 AM   #10
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
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.

Last edited by stress_junkie; 01-10-2006 at 07:43 AM.
 
Old 01-10-2006, 08:01 AM   #11
generic_genus
Member
 
Registered: Oct 2005
Distribution: Gentoo Unstable
Posts: 51

Rep: Reputation: 15
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)
 
Old 01-10-2006, 08:03 AM   #12
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
The second one looks better to me than the first one.
 
Old 01-10-2006, 08:10 AM   #13
generic_genus
Member
 
Registered: Oct 2005
Distribution: Gentoo Unstable
Posts: 51

Rep: Reputation: 15
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.

Last edited by generic_genus; 01-10-2006 at 08:11 AM.
 
Old 01-11-2006, 12:38 AM   #14
lucasmtong
LQ Newbie
 
Registered: Jan 2006
Posts: 7

Original Poster
Rep: Reputation: 0
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
 
Old 01-11-2006, 05:05 AM   #15
generic_genus
Member
 
Registered: Oct 2005
Distribution: Gentoo Unstable
Posts: 51

Rep: Reputation: 15
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
 
  


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
Laptop DVD drive has died, will linux boot from an external drive? Stevetgn Linux - Newbie 2 05-14-2005 05:18 PM
Installed GRUB on 3rd hard drive, how do I boot 1st drive? jesusphreak Linux - Newbie 4 04-06-2005 09:34 AM
Installing SuSE on an external FireWire drive: YaST can't edit partitions on drive kivimaki Linux - Distributions 2 09-13-2004 08:52 PM
slackware 9.1 mounting problems (cd drive, cd writer drive, win partition (ntfs)) mr.gizm0 Slackware 8 05-11-2004 06:23 PM
Cannot Copy Files From Network FAT32/NTFS Drive to My Local Linux Drive michaelh Linux - Networking 3 10-29-2002 10:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:12 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