LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 06-08-2004, 10:58 PM   #1
zyzychyn
LQ Newbie
 
Registered: Aug 2003
Posts: 7

Rep: Reputation: 0
redhat 9 - CD-ROM drive won't mount: "Not a directory"


Hi, I'm having a rather perplexing problem with my CD drive. It's a Samsung CD-ROM drive -- not CD-RW or anything special. It works fine under Windows 98SE (dual-boot). The computer obviously recognizes it, because if I put in a bootable CD (i.e. Knoppix), it does attempt to boot. However, somewhere along the process (for both Knoppix and Gentoo LiveCD), when the CD attempts to mount itself, it gets lost. I can't mount CDs under RH9 either.

I'm on RH 9, kernel 2.4.20-8. For the following examples, SimCity 3000 is the CD I'm trying to mount -- since I'm pretty sure that should be standard and mount-able.

# file /dev/cdrom
/dev/cdrom: symbolic link to /dev/hdc
# file /dev/hdc
/dev/hdc: block special (22/0)
# file /mnt/cdrom
/mnt/cdrom: directory
# mount -t iso9660 /dev/cdrom /mnt/cdrom
mount: block device /dev/cdrom is write-protected, mounting read-only
mount: Not a directory
# mount -t iso9660 /dev/hdc /mnt/cdrom
mount: block device /dev/hdc is write-protected, mounting read-only
mount: Not a directory


the line in fstab:
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0

#mount /mnt/cdrom
mount: Not a directory

I know the CD drive is master on secondary IDE, so it SHOULD be hdc... I've tried hdb and hdd for the heck of it, no luck. I also tried /dev/scd0, nothing.

What's with "Not a directory"? /mnt/cdrom is definitely a directory. I tried making another directory and mounting there, but had the same problem.

There was one other thread where someone seemed to be having this problem, but they didn't get an answer.

Any suggestions? Thanks,
--Zyzychyn
 
Old 06-09-2004, 06:25 AM   #2
bluebirdz
LQ Newbie
 
Registered: May 2004
Posts: 9

Rep: Reputation: 1
Hi,

I'm a little confused by your special block device (22/0).
There must be a special block device (11/0), as I think.
This can be changed as root with:

Code:
mknod /dev/scd0 b 11 0
In addition change your entry in the fstab to following:

Quote:
/dev/cdrom /mnt/cdrom iso9660 noauto,user,exec,ro 0 0
This means that you're able to mount the cdrom as unpriviledged user.

Also check the permissions of the mount-point '/mnt/cdrom' and if necessary change it with

Code:
chmod 755 /mnt/cdrom
I hope this helps so far ...

bluebird
 
Old 06-09-2004, 11:14 AM   #3
zyzychyn
LQ Newbie
 
Registered: Aug 2003
Posts: 7

Original Poster
Rep: Reputation: 0
Question

Well, here's what happened when I tried that:

I made the changes to fstab, rebooted.
# mount /mnt/cdrom
mount: Not a directory

# mknod /dev/scd0 b 11 0
mknod: `/dev/scd0': File exists
# file /dev/scd0
/dev/scd0: block special (11/0)
# mount -t iso9660 /dev/scd0 /cdrom
mount: /dev/scd0 is not a valid block device

(The permissions of /mnt/cdrom are 0777, /cdrom is 0755)

(And, oh, because I can...)
# mount -/dev/cdrom /mnt/cdrom
/dev/cdrom: Input/output error
mount: block device /dev/cdrom is write-protected, mounting read-only
/dev/cdrom: Input/output error
mount: you must specify the filesystem type

# mount -t iso9660 /dev/cdrom /mnt/cdrom
mount: block device /dev/cdrom is write-protected, mounting read-only
mount: Not a directory

If I try to mount in a *real* terminal (not gnome-terminal), I get more error messages:

# mount /mnt/cdrom
hdc: command error: status=0x51 { DriveReady SeekComplete Error }
hdc: command error: error=0x50
end_request: I/O error, dev 16:00 (hdc), sector 96
ISOFS: unable to read i-node block
hdc: command error: status=0x51 { DriveReady SeekComplete Error }
hdc: command error: error=0x50
end_request: I/O error, dev 16:00 (hdc), sector 100
ISOFS: unable to read i-node block
mount: Not a directory


BTW,
# locate iso9660
returns nothing.

(Edit: Here's what dmesg has:)
# dmesg | grep hdc
ide1: BM-DMA at 0x1808-0x180f, BIOS settings: hdc:pio, hdd:pio
hdc: SAMSUNG CD-ROM SC-140, ATAPI CD/DVD-ROM drive
hdc: ATAPI 40X CD-ROM drive, 128kB Cache, DMA
hdc: command error: status=0x51 { DriveReady SeekComplete Error }
hdc: command error: error=0x50
end_request: I/O error, dev 16:00 (hdc), sector 96
... the last three lines repeat, but that might just be because of all the failed mounting attempts i've had.

?_?
-- zyzychyn

Last edited by zyzychyn; 06-09-2004 at 12:40 PM.
 
Old 06-09-2004, 05:27 PM   #4
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
Have you actually opened a file manager and looked in the /mnt/ directory? If /mnt/cdrom is not a directory, what is it? A symlink to something that is a directory? Does /mnt/cdrom even exist, or should you be mounting to /cdrom/ or /mnt/hdc/ or something else?

Quote:
# mount -t iso9660 /dev/cdrom /mnt/cdrom
mount: block device /dev/cdrom is write-protected, mounting read-only
seems to indicate that the device is getting mounted, but then some kind of error occurs.

Have you tried to actually cd to the CD and see if it can be listed with an ls? Is it possible that you had previously enabled automount, and the drive must be unmounted before you can change media and remount it?

And did you back up the original /etc/fstab before changing it? If so, could you post it? If not, could you post it anyway?
 
Old 06-09-2004, 07:33 PM   #5
zyzychyn
LQ Newbie
 
Registered: Aug 2003
Posts: 7

Original Poster
Rep: Reputation: 0
Yes, I have... I have tried mounting to the following places:
# file /mnt/cdrom
/mnt/cdrom: directory
# file /cdrom
/cdrom: directory

Um, yes, some kind of error occurs, see previous post ( "DriveReady SeekComplete Error" ???)

I don't recall enabling automount; is it possible it was enabled by default somewhere? How would I go about checking, and disabling it if necessary?

#### /etc/fstab ####
LABEL=/1 / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
LABEL=/home1 /home ext3 defaults 1 2
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
LABEL=/usr1 /usr ext3 defaults 1 2
/dev/hda5 swap swap defaults 0 0
/dev/fd0 /mnt/floppy auto noauto,user,kudzu,umask=000 0 0
/dev/hda1 /mnt vfat defaults,umask=000 0 0
//SHADE/C /mnt/shade/cdrive smbfs noauto,credentials=/etc/samba/cred,rw,gid=users,fmask=0777,dmask=0777 0 0
//SHADE/ashokshare /mnt/shade/shared_folder smbfs noauto,credentials=/etc/samba/cred,rw,gid=users 0 0
/dev/sda1 /mnt/usbdrive auto noauto,users,umask=000 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,user,exec,ro 0 0
################

I didn't keep a backup, but the difference was that instead of user,exec it said owner,kudzu

Also, I *am* able to play audio CD's -- I just seem unable to mount data CDs.

After a failed mounting attempt, if I go to the directory and ls, it is empty. (0 items)

-- zyzychyn
 
Old 06-10-2004, 04:07 AM   #6
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
Well, you're unable to mount the SimCity 3000 CD... have you tried others? You think that it's standard, but maybe it's not (there's not a whole lot about Maxis that's really "standard").

The fact that you can play audio CDs is irrelevant; Linux does not mount audio CDs, but instead plays them from raw device access.

Nothing looks wrong with your /etc/fstab, so I'm hunting down this error (Google search for "mount: Not a directory").

Found this note on the shunt v1.6.2 page:
Quote:
The Linux Situation:

If you need to run shunt and flyisofs on linux, it is not going to work fully at present without this kernel patch.

The problem with the linux iso9660 file system is that the current code uses the byte offset of the inode data as the inode number. Because the inode number is only 32-bits wide, the linux kernel cannot reach inode data that resides on disk beyond the 4GB boundary. This was fine for CDROMs, but DVDs are currently at least 4.7GB, and there are several common ISO 9660 file system images -- including the images created by flyisofs -- that require placing inode information near the end of the DVD. So, without a patch, you will get a mount: Not a directory error because the kernel cannot reach the inode data for the root inode.
So this indicates that maybe you're using an older kernel which is not patched to solve this problem, which lies specifically in the iso9660 fs.

One way to find out if this is the problem for you is to try mounting manually with the fs "auto" rather than "iso9660". Let the mount command do the work of mounting whatever fs it thinks this is. Another alternative is the "udf" fs.

And of course, there's this on the Mount error messages PAGE, but we've already covered that, right?
Quote:
mount: ... : Not a directory
The local path is not a directory. Check the spelling in your command, and run ls to check if local path is a directory or not.
I would also check /boot/grub/menu.lst (or grub.conf, whichever RH uses) and just make sure that it is not trying to load the ide-scsi module for this CD-ROM drive as if it was a CD-RW. Just to be on the safe side. All the information I've seen so far indicates that this is a bizarre error (unless you've really been mistyping or /mnt/cdrom is really not a directory), so we have to look for bizarre solutions.

Hope this helps.
 
Old 06-10-2004, 08:44 AM   #7
zyzychyn
LQ Newbie
 
Registered: Aug 2003
Posts: 7

Original Poster
Rep: Reputation: 0
OK, here's what I did (I switched CD's -- tried MS Office, SimCity, Knoppix...):

# mount -t auto /dev/hdc /cdrom
/dev/hdc: Input/output error
mount: block device /dev/hdc is write-protected, mounting read-only
/dev/hdc: Input/output error
mount: you must specify the filesystem type

# mount -t udf /dev/hdc /cdrom
mount: block device /dev/hdc is write-protected, mounting read-only
mount: wrong fs type, bad option, bad superblock on /dev/hdc,
or too many mounted file systems

In the real terminal (ctrl-alt-F1), the following error message repeats:
hdc: command error: status=0x51 { DriveReady SeekComplete Error }
hdc: command error: error=0x50
end_request: I/O error, dev 16:00 (hdc), sector [a number that changes each time]


Here's my grub.conf:
######### grub.conf ##########
default=1
timeout=10
splashimage=(hd0,5)/boot/grub/splash.xpm.gz
title Red Hat Linux (2.4.20-8)
root (hd0,5)
kernel /boot/vmlinuz-2.4.20-8 ro root=LABEL=/1
initrd /boot/initrd-2.4.20-8.img
title Windows 98SE
rootnoverify (hd0,0)
chainloader +1
###########################

It doesn't say anything aboud hdc, so... ???

lsmod returns the following (relevant?) lines
sr_mod 18136 0 (autoclean) (unused)
sd_mod 13516 0 (autoclean) (unused)
scsi_mod 107160 2 (autoclean) [sr_mod sd_mod]
ide-cd 35708 0 (autoclean)
cdrom 33728 0 (autoclean) [sr_mod ide-cd]

.......
-- zyzychyn
 
Old 06-11-2004, 11:21 AM   #8
zyzychyn
LQ Newbie
 
Registered: Aug 2003
Posts: 7

Original Poster
Rep: Reputation: 0
Sorry to double post -- just wanted to mention another thing. I never needed the CD drive except to play audio CD's until just now. I installed RH 7.3 off CD, so it was fine then. I upgraded to RH9 off CD as well, so it should've been fine.

Recently, I wanted to install Gentoo. It booted from the LiveCD, but when it tried to mount, it ran into problems. So I tried Knoppix, same thing. Weird thing was that Knoppix displayed
hda: [stuff about my hard drive]
hdc: SAMSUNG CD-ROM 140
Found CD-ROM at ... [tried /dev/scd0, etc...]
and then it hung up because it couldn't find the CD.

-- zyzychyn
 
Old 06-11-2004, 11:33 AM   #9
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
Have you done anything that might have knocked the internal cable loose (installed a new hard drive, or other hardware, physically moved the box)?

Do you have another drive you could temporarily replace this one with? Drives do go wonky, sometimes. It's really starting to look like a hardware issue.
 
  


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
Problems w/ Installation -- "Unable to detect and mount CD-ROM"? Sabriel Dyrim Ubuntu 1 09-20-2005 03:38 PM
cd-rom "drive error" with audio disk trempel Linux - Hardware 22 07-14-2005 02:41 AM
Fedora Core 1 SCSI CD-ROM Won't Mount (always get "is not a valid block device") jerrykuch Linux - Hardware 2 04-18-2004 01:02 PM
Installation problem - "no Red Hat CD found in CD-ROM drive" vbishtei Linux - General 1 01-11-2004 10:05 AM
CD ROM mount error: "no medium found"????? RonRussell Linux - Hardware 8 07-01-2002 12:34 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:09 PM.

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