LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   what is wrong with this /etc/fstab entry? (https://www.linuxquestions.org/questions/linux-hardware-18/what-is-wrong-with-this-etc-fstab-entry-284530/)

d1l2w3 01-31-2005 12:39 PM

what is wrong with this /etc/fstab entry?
 
/dev/hdc /mnt/cdrom auto umask=0,user,iocharset=iso8859,codepage=850,noauto,ro,exec,users 0 0

This line in /etc/fstab is set at installation. I have not touched it.
In order to mount the cdrom, I have to type as root, mount /mnt/cdrom.
Then, I can not umount it. I have to reboot to access it again.
Nothing else is open and I am in '/' as root.


Why?

dlw

bulliver 01-31-2005 02:16 PM

Quote:

In order to mount the cdrom, I have to type as root, mount /mnt/cdrom.
This is because of the "noauto" option.

Quote:

Then, I can not umount it. I have to reboot to access it again.
What command, and what error do you get when you try this?

I am not sure the ramifications of having iocharset, codepage, and the other options you have there. In my fstab I have simply:
Code:

/dev/hdc      /mnt/cdrom      iso9660        noauto,ro          0 0
and it works as expected. If you want, comment out your line and try mine....you never know.

marlor 01-31-2005 02:17 PM

try something more simple

Code:

/dev/cdrom      /mnt/cdrom      iso9660    noauto,user,ro  0  0
and about unmounting
leave the 'cdrom' directory first and then unmount

in term(console) if you are in /mnt/cdrom
and you try:
Code:

umount /mnt/cdrom
it will not work, doesn't work with me atleast
first leave the directory
do a
Code:

cd ..
to end up in /mnt
and then try to umount

hope i helps

good luck

d1l2w3 01-31-2005 02:42 PM

I added your line and get the same results.
Click on 'home icon', click on 'mnt', click on 'cdrom' and there is nothing but a blank screen where there should be folders.

Change to su then
mount /mnt/cdrom
The folder icons show up correctly.

Then I can not get out of /mnt/cdrom
I close everything and the folders that appeared with mount /mnt/cdrom are still there even with the cd out. I can insert a different cd and the old cd's folders are still listed.

I have to reboot to get rid of them.

bulliver 01-31-2005 02:54 PM

Quote:

Click on 'home icon', click on 'mnt', click on 'cdrom' and there is nothing but a blank screen where there should be folders.

Change to su then
mount /mnt/cdrom
The folder icons show up correctly.
Again, this is because of "noauto", but because a cd is removable media you _do_ want to leave it there.
Quote:

Then I can not get out of /mnt/cdrom
What do you mean by this? What are you using to unmount the disk. You need to do this manually you know...you can't just yank the cd out (in fact, you shouldn't be able to).

After you close any filebrowsers and cd away from /mnt/cdrom what happens when you run "umount /mnt/cdrom"?

We need some sort of error message to diagnose this further...

d1l2w3 01-31-2005 04:07 PM

[don@localhost don]$ su
Password:
[root@localhost don]# umount /mnt/cdrom
[root@localhost don]# mount /mnt/cdrom
[root@localhost don]# cd /mnt/cdrom
[root@localhost cdrom]# ls
distfiles/ isolinux/ snapshots/ x86-packagelist-2004.3.txt
docs/ livecd.squashfs* stages/ x86-release-notes.txt
[root@localhost cdrom]# cd /
[root@localhost /]# umount /mnt/cdrom
[root@localhost /]#
I apologize for not being clear.
All works as 'root' in a konsole.
It's when i'm on as a 'user' that it will not work properly in konquerer.
In konquerer is where I have to reboot to get /mnt/cdrom to change.
When I look at whats on a cd in konquerer I can not get the folders to change after taking that cd out and inserting another without rebooting. The same folders are shown as if the other cd is still there.

There is no error message. It simply will not change.
I can take a cd out as well as insert a cd even though it is mounted via a konsole. as root.

bulliver 01-31-2005 04:23 PM

Ok, kde problem then. Just to be absolutely clear: Are you navigating away from /mnt/cdrom in konqueror before you unmount it? If you leave the browser open to /mnt/cdrom then unmount it manually (using konsole) and mount a different disk then this would explain the freezeup.

Or is it that as soon as you navigate to /mnt/cdrom in konqueror it freezes up?

Quote:

I can take a cd out as well as insert a cd even though it is mounted via a konsole. as root.
That shouldn't be. Your cd-rom drive should refuse to open unless it is properly unmounted. I don't know what to tell you about this...

d1l2w3 01-31-2005 04:51 PM

Without a console open.
When I open konquerer, click on 'mnt', 'cdrom' no folders show up even though a cd is in the cdplayer. I close konquerer. (cd not mounted)
Open a console, change to su, mount /mnt/cdrom then 'ls' there are files.
close console, open konquerer (cd mounted)
The files now show in /mnt/cdrom. close konquerer, unmount cd in console, close console.
Open konquerer, /mnt/cdrom, the files still show and I can not get rid of them without rebooting.

Yes, I can open and close the cd at will whether mounted or unmounted.

In the past I've been able to open and close /mnt/cdrom in konquerer without having to use a console to mount the cd. This is my prefrence since I am the only user.

bulliver 01-31-2005 05:09 PM

Ok thanks for that. I understand perfectly now... this sounds like a bug in konqueror
or maybe just kde, as it seems to be cacheing the contents of /mnt/cdrom and not updating when it changes.

I have no idea what to do here, but if you post the version # of kde (and konq) I can help you google for bugs :)

d1l2w3 01-31-2005 05:18 PM

Both kde and konquerer are 3.2.3

Thanks for the help.
dlw

Electro 01-31-2005 11:15 PM

You can use
/dev/hdc /mnt/cdrom auto umask=0,user,iocharset=iso8859,codepage=850,noauto,ro,exec,users 0 0

The user and users are conflicting with each other. user means only a certain user can mount which is root. users means anybody can mount it. If you take out user, anybody should be able to mount because of the users option. I suggest changing codepage to 437, but neither iocharset and codepage should be included for CD-ROM/DVD-ROM drives. The iocharset and codepage is used during writing to a vfat, msdos, or fat partition. I suggest adding unhide just in case if you want to install some games like Unreal Tournament or other programs.

You have to unmount before ejecting. It should be locking the drive after you mount it, so pushing the eject button on the drive should not work. Also typing eject should automatically unmount the drive.

In any OS, ejecting the CD and not putting a disc in. Then closing it. This will force the OS to flush its contents. Though Linux does not have this problem, but Windows and DOS does.

You can run hdparm -f /dev/hdc as root or su.


All times are GMT -5. The time now is 06:12 PM.