LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 06-12-2005, 08:54 AM   #1
mishunimi
LQ Newbie
 
Registered: Feb 2004
Location: Israel
Distribution: Kubuntu
Posts: 7

Rep: Reputation: 0
Unhappy how to fix /dev/cdrom circular link?


My Mandrake 10.1 works fine for quite a while now.
However, yesterday when I wanted to read a CD, I received
an error message about a missing device.
I looked into this and found these two symbolic links pointing
to each other:
/dev/hdb -> ide/host0/bus0/target1/lun0/cd
/dev/ide/host0/bus0/target1/lun0/cd -> ../../../../../hdb

I don't know what caused this. It used to work fine, but the last
time I used the CD drive was a couple of months ago.

/etc/fstab contains this line:
/dev/hdb /mnt/cdrom auto umask=0022,user,iocharset=iso8859-1,codepage=850,noauto,ro,exec 0 0

I'm guessing that I need to use mknod to recreate one of
these, but I don't know the major & minor numbers that I
need to use. I failed to find them on the web or on the Mandriva
web site.

What are the numbers to use here?
Or, alternatively, is there some tool in Mandrake 10.1
that will recreate the missing device file?

Thanks,
M.N.
 
Old 06-13-2005, 03:30 AM   #2
jonkristian
LQ Newbie
 
Registered: Feb 2005
Location: Norway
Distribution: Archlinux
Posts: 18

Rep: Reputation: 0
Try

ln -s /dev/hdb /mnt/cdrom
 
Old 06-13-2005, 06:42 AM   #3
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
No, don't! /dev/ and /mnt/ are two entirely different things!

I don't have linux at hand, but you can easily fix it.
Look at your hda device, IIRC it is:
/dev/ide/host0/bus0/target0/disk or something like that. hdb is the same except it is target1.

Yves.
 
Old 06-13-2005, 08:32 AM   #4
mishunimi
LQ Newbie
 
Registered: Feb 2004
Location: Israel
Distribution: Kubuntu
Posts: 7

Original Poster
Rep: Reputation: 0
Still unsure what to do

I looked at the other similar devices (I have 2 hard disks in there), and
theis is what they look like:

# ls -l /dev/ide/host0/bus0/target0/lun0
total 0
brw------- 1 root root 3, 0 Jan 1 1970 disc
brw------- 1 root root 3, 1 Jan 1 1970 part1
brw------- 1 root root 3, 2 Jan 1 1970 part2
brw------- 1 root root 3, 5 Jan 1 1970 part5
brw------- 1 root root 3, 6 Jan 1 1970 part6

# ls -l /dev/ide/host0/bus1/target0/lun0/
total 0
brw------- 1 root root 22, 0 Jan 1 1970 disc
brw------- 1 root root 22, 1 Jan 1 1970 part1
brw------- 1 root root 22, 2 Jan 1 1970 part2
brw------- 1 root root 22, 5 Jan 1 1970 part5
brw------- 1 root root 22, 6 Jan 1 1970 part6
brw------- 1 root root 22, 7 Jan 1 1970 part7

so, which numbers should I use?
3,0 ?
22,0 ?
something else?

I tried to use 3,0 and 22,0.
Neither of them enabled me to access the cdrom drive.
I tried other numbers too, without success.

Help!
 
Old 06-13-2005, 08:58 AM   #5
mishunimi
LQ Newbie
 
Registered: Feb 2004
Location: Israel
Distribution: Kubuntu
Posts: 7

Original Poster
Rep: Reputation: 0
Found the answer!

The hints above gave me more ideas what to search for.
I asked Google about Linux device numbers and found a HOWTO that
references a file /usr/src/linux/Documentation/ide.txt
I do not have the kernel source tree, but I did find a version of this file
on the web. It appears that the numbers for device hdb are 3,64
so the command I needed to fix this is "mknod cd b 3 64". The whole
fix is therefore:

$ su
# cd /dev/ide/host0/bus0/target1/lun0
# rm cd
# mknod cd b 3 64

To access the file system on the CD that is in the drive, I had to mount it:

$ mount /mnt/cdrom

Thanks for the replies!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
I get mount: /dev/cdrom: can't read superblock, How to fix? zLinuxz Linux - General 12 06-18-2008 02:42 AM
I cannot access EITHER CD drive! And there's no /dev/hdc or /dev/hdd or /dev/cdrom! Dmalic Linux - Hardware 13 11-18-2005 07:11 PM
ln: creating symbolic link `/dev/dvd' to `/dev/hdc': Permission denied qazwsx27 Fedora 3 06-14-2005 02:09 PM
/dev/cdrom link is dead Crashed_Again Linux - Hardware 7 02-14-2004 04:32 AM
symbolic link: /dev/sound to /proc/asound/dev otterit Linux - General 3 08-08-2002 05:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

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