Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
DVD and CD-RW Drives - How Do I Get Both?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
elliotte
n00b
n00b


Joined: 05 Sep 2003
Posts: 27

PostPosted: Sat Sep 27, 2003 3:07 am    Post subject: DVD and CD-RW Drives - How Do I Get Both? Reply with quote

I originally posted this as a response in another thread that seemed to be addressing this issue - but I did not get any response, so I'm posting it again as a new thread. (Here is the old one - https://forums.gentoo.org/viewtopic.php?t=80897&highlight= )
----------------
Thanks to [FU]bETA for the extra details. I have a DVD as my first drive and a CD/RW as my second

Code:
bash-2.05b# ls -l /dev/cd*
 lr-xr-xr-x    1 root     root   13 Sep 19 16:35 /dev/cdrom -> cdroms/cdrom0
 /dev/cdroms:
 total 0
 lr-xr-xr-x    1 root     root           33 Jan  1  1970 cdrom0 -> ../ide/host0/bus1/target0/lun0/cd
 lr-xr-xr-x    1 root     root           33 Jan  1  1970 cdrom1 -> ../ide/host0/bus1/target1/lun0/cd


I did a ln -s /dev/cdroms/cdrom1 /dev/dvd and then a mkdir /mnt/dvd
and then I added this to fstab

Code:
/dev/dvd                /mnt/dvd        iso9660         noauto,user,ro          0 0
 and changed the cdrom line to point to cdrom1 instead of cdrom0
 /dev/cdroms/cdrom1   /mnt/cdrom   iso9660      noauto,user,ro      0 0


and this to devfsd.conf

Code:
LOOKUP          ^dvd$            CFUNCTION GLOBAL mksymlink ${mntpnt}/cdroms/cdrom0 dvd
 REGISTER        ^cdroms/cdrom0$  CFUNCTION GLOBAL mksymlink ${devpath} dvd
 UNREGISTER      ^cdroms/cdrom0$  CFUNCTION GLOBAL unlink dvd
 
 # Create /dev/cdrom for the first cdrom drive
 LOOKUP          ^cdrom$          CFUNCTION GLOBAL mksymlink ${mntpnt}/cdroms/cdrom1 cdrom
 REGISTER        ^cdroms/cdrom1$  CFUNCTION GLOBAL mksymlink $devname cdrom
 UNREGISTER      ^cdroms/cdrom1$  CFUNCTION GLOBAL unlink cdrom


This had the handy effect of generating an error at boot time :

Code:
*mounting devfs at /dev
 *starting devfsd ...
 Started device management daemon v1.3.25 for /dev
 bad WHEN in config line: "LOOKUP          ^dvd$            CFUNCTION GLOBAL mksymlink ${mntpnt}/cdroms/cdrom0 dvd
 exiting


This has the unhappy effect of stopping the boot before the filesystems seem to get mounted and the next message says that the root volume is unreadable and the superblock is in error. (By the way, does anyone see a WHEN somewhere on that command line.)

I resolved this temporarily by just booting the bootable liveCD1 and editing out the DVD entries in devfsd.conf, but leaving the entries in fstab. Rebooted and everything comes up fine. I have to say that the error about superblocks is a great way to drive the blood pressure up. I'm new to Gentoo and Linux and after a couple of weeks reading postings and working through emerges, the idea of losing that entire partition was an unhappy thought!

Sorry for such a long preamble, now the questions:

1) How are you REALLY supposed mount a DVD/CD/RW drive as the first drive on your chain and a CD/RW drive as the second on the chain?

2) I'm puzzled that when I boot now I see the following:

Code:
bash-2.05b# ls -l /dev/cdrom
 lr-xr-xr-x    1 root     root           13 Sep 19 16:35 /dev/cdrom -> cdroms/cdrom0
 bash-2.05b# ls -l /dev/dvd
 lr-xr-xr-x    1 root     root           18 Sep 19 16:35 /dev/dvd -> /dev/cdroms/cdrom1


fstab has cdrom pointing to cdrom1 and dvd pointing to cdrom2 - but it looks like the boot process switched that around.

Ah! So many interesting mysteries to learn to along the way to building a system. I'd appreciate your help and advice in understanding and figuring this one out.
Back to top
View user's profile Send private message
ronmon
Veteran
Veteran


Joined: 15 Apr 2002
Posts: 1043
Location: Key West, FL

PostPosted: Sat Sep 27, 2003 5:49 am    Post subject: Reply with quote

Presuming that the DVD and CDRW are on the same IDE channel, /dev/cdroms/cdrom0 will be the master and cdrom1 will be the slave. If you are trying to force devfs to switch them you'll have a tough row to hoe. It looks like that's what is happening.
Back to top
View user's profile Send private message
Anime_Fan
Guru
Guru


Joined: 01 Jul 2003
Posts: 366
Location: Linköping, Sweden

PostPosted: Sat Sep 27, 2003 8:48 am    Post subject: Reply with quote

Code:
/dev/hdc  /mnt/dvd     iso9660      noauto,user,ro     0 0
/dev/hdd  /mnt/cdrom   iso9660      noauto,user,ro     0 0


How about that? If they truly are on an IDE channel, why mess around with /dev/ide/host0/bus1 (...)

At least, that's how I've always solved the issue.
Back to top
View user's profile Send private message
elliotte
n00b
n00b


Joined: 05 Sep 2003
Posts: 27

PostPosted: Tue Sep 30, 2003 1:48 am    Post subject: Relink DVD worked, but not for CDROM! Reply with quote

Thank you for the tip. I relinked /dev/dvd to /dev/hdc, and I also changed that in fstabs.

However, I can't seem to get that to work for the CDROM device. I changed the fstab entry to point it to /dev/hdd, and I also tried

rm /dev/cdrom
ln -s -f /dev/hdd /dev/cdrom

but somehow /dev/cdrom continues to point to /dev/cdroms/cdrom0, which is linked to /dev/hdc (the DVD drive on the master/boot for that IDE channel).

I thought rm -f /dev/cdrom would do it, I also tried deleting it via KDE. Obviously my inexperience with Linux is getting in the way. Why can't I break that old link and reassociate it with /dev/hdd?
Back to top
View user's profile Send private message
elliotte
n00b
n00b


Joined: 05 Sep 2003
Posts: 27

PostPosted: Tue Sep 30, 2003 10:43 pm    Post subject: /etc/devfsd.conf - the missing link Reply with quote

Okay, researching further in the forums I found this thread:
https://forums.gentoo.org/viewtopic.php?t=77684&highlight=dvd+player
which mentioned linking going on in /etc/devfsd.conf. So I looked and found that /dev/cdrom was linked in to cdroms/cdrom0 in this config file. I changed that and also added an entry for the DVD and now they both appear linked to the correct drives. But I think it will take a while for the proper use of both fstabs and devfsd to sink in. It seems like it is too easy to have entries in one config file interfere with entries in the other one.
Back to top
View user's profile Send private message
abonventre
Tux's lil' helper
Tux's lil' helper


Joined: 19 Jun 2003
Posts: 80
Location: Boston, MA

PostPosted: Wed Oct 01, 2003 4:11 am    Post subject: Reply with quote

So does this mean that you got your DVD and CD-RW working? I'm have the exact same problem with my machine so I'm waiting for a decent solution to come of this thread. If everything is working correctly now could you post exactly what you did? Thank you.
-A
Back to top
View user's profile Send private message
elliotte
n00b
n00b


Joined: 05 Sep 2003
Posts: 27

PostPosted: Thu Oct 02, 2003 6:26 pm    Post subject: DVD and CDRW both mounting - now for the RW challenge! Reply with quote

abonventure - I do have both devices now. However I cannot seem to write to the CD/RW device. So I am going to open another separate post to go after that problem (been reading lots of forum entries and I think I need some guidance).

Here are the config entries I finally ended up with and that are providing me access to both the DVD and CDRW drive (DVD is the master on the IDE channel and is bootable and the CDRW is the slave - both properly detects both drives and the manufacturer and model).

FSTAB
Code:
/dev/hdc   /mnt/dvd   iso9660      noauto,user,rw      0 0
/dev/hdd   /mnt/cdrw   iso9660      noauto,user,rw      0 0

Notice I changed the ro to rw - this was an experiment, I haven't found a good listing of all the option types for this entry.

devfsd.conf
Code:
# Create /dev/dvd for the FIRST cdrom drive
# (change 'cdroms/cdrom0' to suite your setup)
# NOTE: We add the fully qualified path here, else some apps
# have problems to resolve the true device (drip comes to mind)
LOOKUP           ^dvd$            CFUNCTION GLOBAL mksymlink ${mntpnt}/cdroms/cdrom0 dvd
REGISTER         ^cdroms/cdrom0$  CFUNCTION GLOBAL mksymlink ${devpath} dvd
UNREGISTER       ^cdroms/cdrom0$  CFUNCTION GLOBAL unlink dvd

# Create /dev/cdrom for the first cdrom drive
LOOKUP          ^cdrw$           CFUNCTION GLOBAL mksymlink ${mntpnt}/cdroms/cdrom1 cdrw
REGISTER        ^cdroms/cdrom1$  CFUNCTION GLOBAL mksymlink $devname cdrw
UNREGISTER      ^cdroms/cdrom1$  CFUNCTION GLOBAL unlink cdrw


I also made the directory mkdir /mnt/cdrw

I can mount both devices (mount -t auto /dev/cdrw /mnt/cdrw) and access them, just can't seem to write to them. As I said I'll pursue that in a separate posting.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum