LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 07-28-2003, 02:28 PM   #1
neenee
Member
 
Registered: Feb 2003
Location: Netherlands
Distribution: debian (sid)
Posts: 693

Rep: Reputation: 30
Unhappy cdrw dvd-rom scsi emulation mess :(


hi everyone,

i have an ide cd writer + dvd rom drive.
i have the following compiled (m for module, * for in-kernel)

(*) include ide/atapi cdrom support
(m) scsi emulation support
(*) scsi support
(m) scsi cd-rom support
(*) enable vendor-specific extensions
(m) scsi generic support

i have set the modules i compiled to load in /etc/rc.d/rc.modules

since dmesg |grep hdc + hdd show me:

ide1: BM-DMA at 0xb808-0xb80f, BIOS settings: hdc:DMA, hdd:DMA
hdc: Pioneer DVD-ROM ATAPIModel DVD-106S 012, ATAPI CD/DVD-ROM drive
hdd: PLEXTOR CD-R PX-W1610A, ATAPI CD/DVD-ROM drive
hdc: attached ide-cdrom driver.
hdc: ATAPI 40X DVD-ROM drive, 256kB Cache, UDMA(33)
hdd: attached ide-cdrom driver.
hdd: ATAPI 40X CD-ROM CD-R/RW drive, 2048kB Cache, UDMA(33)

i have added 'append="hdd=ide-scsi" to /etc/lilo.conf and
ran lilo to have the changes added to the boot loader.

my fstab is a mess, i have deleted /dev/hdd, /dev/scd0 and
some others because i believed them to be symlinks, but i was
not sure.. so i might have messed up there.

the entries i have there now are the following:

/dev/dvd /mnt/cdrom iso9660 noauto,users,ro 0 0
/dev/hdd /mnt/cdrom2 iso9660 noauto,users,ro 0 0

(the rest of the lines do not concern the dvd-rom + cdrw)

when i run totem as root i can select both my dvd-rom and my
cdrw as devices, though as normal user it says in the console that
/dev/hdc can not be accessed - what's up with that?

cdrecord -scanbus gives me the following:

Cdrecord 2.00.3 (i686-pc-linux-gnu) Copyright (C) 1995-2002 Jörg Schilling
cdrecord: Permission denied. Cannot open '/dev/sg1'. Cannot open SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'.

i tried searching through these forums and others (also the gentoo
forums), and used google. i found no way to fix my problem, and
i've spent over six hours trying to do so.

any suggestions are greatly appreciated and should i provide more
info, do not hesitate to ask.

kind regards.
 
Old 07-28-2003, 03:33 PM   #2
quietguy47
Member
 
Registered: Mar 2003
Location: Everett
Distribution: Slackware
Posts: 805

Rep: Reputation: 35
edited
Your /etc/fstab should look similar to mine
/dev/dvdrom /mnt/dvdrom iso9660 noauto,owner,ro 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0
The line /dev/hdd /mnt/cdrom2 iso9660 noauto,users,ro 0 0 does not belong in your /etc/fstab file( replace it with the /dev/cdrom).
/dev/dvdrom should be linked to /dev/hdc and /dev/cdrom should be linked to /dev/hdd. ln -s /dev/hdc /dev/dvdrom and ln -s /dev/hdd /dev/cdrom.
Both will need mount points as well. mkdir /mnt/dvdrom and mkdir /mnt/cdrom.

Last edited by quietguy47; 07-28-2003 at 03:49 PM.
 
Old 07-28-2003, 04:14 PM   #3
neenee
Member
 
Registered: Feb 2003
Location: Netherlands
Distribution: debian (sid)
Posts: 693

Original Poster
Rep: Reputation: 30
i changed my settings to match yours, though
my cdrecord -scanbus output remains unchanged.
 
Old 07-28-2003, 04:16 PM   #4
quietguy47
Member
 
Registered: Mar 2003
Location: Everett
Distribution: Slackware
Posts: 805

Rep: Reputation: 35
Have you tried burning a cd?
Were you root?

Last edited by quietguy47; 07-28-2003 at 04:18 PM.
 
Old 07-28-2003, 04:23 PM   #5
neenee
Member
 
Registered: Feb 2003
Location: Netherlands
Distribution: debian (sid)
Posts: 693

Original Poster
Rep: Reputation: 30
i was root, and it keeps saying it can not
open /dev/sg1, etc, as stated above.
 
Old 07-28-2003, 04:33 PM   #6
quietguy47
Member
 
Registered: Mar 2003
Location: Everett
Distribution: Slackware
Posts: 805

Rep: Reputation: 35
This may be more helpful than me.
http://www.icon.co.za/~psheer/book/n...00000000000000
You may have to scroll up a bit. It's section 42.6.11 CD writers.
Also http://www.ibiblio.org/pub/Linux/doc...-Writing-HOWTO

Last edited by quietguy47; 07-28-2003 at 04:39 PM.
 
Old 07-28-2003, 05:55 PM   #7
neenee
Member
 
Registered: Feb 2003
Location: Netherlands
Distribution: debian (sid)
Posts: 693

Original Poster
Rep: Reputation: 30
after a lot of messing around i have the following set:

/dev/dvd /mnt/dvd iso9660 noauto,users,ro 0 0
/dev/sr0 /mnt/cdrom iso9660 noauto,users,ro 0 0

i can mount /mnt/dvd and /mnt/cdrom without problems,
but cdrecord -scanbus still gives the following:

cdrecord: Permission denied. Cannot open '/dev/sg0'. Cannot open SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'

all in all, thank you for your prompt replies, i will try more tomorrow.

nite.

Last edited by neenee; 07-29-2003 at 03:03 AM.
 
Old 07-28-2003, 06:45 PM   #8
quietguy47
Member
 
Registered: Mar 2003
Location: Everett
Distribution: Slackware
Posts: 805

Rep: Reputation: 35
Try booting the stock kernel and running cdrecord -scanbus.
 
Old 07-28-2003, 07:28 PM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 24,716

Rep: Reputation: 5593Reputation: 5593Reputation: 5593Reputation: 5593Reputation: 5593Reputation: 5593Reputation: 5593Reputation: 5593Reputation: 5593Reputation: 5593Reputation: 5593
Are the SCSI modules loading? check with lsmod

Its not an fstab problem.

Do you have a /dev/sg1? If you do what are its permissions.
 
Old 07-28-2003, 07:39 PM   #10
eltongeoff
Member
 
Registered: Mar 2003
Posts: 76

Rep: Reputation: 15
wut r /dev/dvd and /dev/sr0 pointing to? u should change them to cdrom1 and cdrom2 or dvd and cdrom. they should point to /dev/scd0 and /dev/scd1. do ls -l /dev/dvd and ls -l /dev/sr0 to find out wut they're pointing to. then use ln -s to create your links pointing to scd0 and scd1. if u deleted scd0 recreate it. it's not a link it's the scsi device.

also u have 2 drives, so that's hdc and hdd. in lilo, u want append="hdc=scsi hdd=scsi" ive seen hdc=ide-scsi on a lot of guides but wut i wrote above works for me. give both a try, may not even matter. then do cdrecord -scanbus after all this c if it works. hope it does.......

oh damn u deleted /dev/hdd too..... put that back.

Last edited by eltongeoff; 07-28-2003 at 07:41 PM.
 
Old 07-29-2003, 03:12 AM   #11
neenee
Member
 
Registered: Feb 2003
Location: Netherlands
Distribution: debian (sid)
Posts: 693

Original Poster
Rep: Reputation: 30
quietguy,

i will not use a stock kernel, i've worked hard
enough to make myself a custom one and it should work
fine as well.


michaelk,

here is my lsmod output relating to scsi/cdrom modules:

sg 28556 0
sr_mod 15928 0
ide-scsi 11440 0
scsi_mod 62292 3 [sg sr_mod ide-scsi]
ide-cd 34440 0
cdrom 32224 0 [sr_mod ide-cd]

yesterday i re-created /dev/sg*, they are now as follows:

crw-r--r-- 1 root root 21, 0 Jul 29 00:15 /dev/sg0
crw-r--r-- 1 root root 21, 1 Jul 29 00:15 /dev/sg1
crw-r--r-- 1 root root 21, 2 Jul 29 00:15 /dev/sg2
crw-r--r-- 1 root root 21, 3 Jul 29 00:15 /dev/sg3
crw-r--r-- 1 root root 21, 4 Jul 29 00:15 /dev/sg4
crw-r--r-- 1 root root 21, 5 Jul 29 00:15 /dev/sg5
crw-r--r-- 1 root root 21, 6 Jul 29 00:15 /dev/sg6
crw-r--r-- 1 root root 21, 7 Jul 29 00:15 /dev/sg7


eltongeoff,

i can mount both the dvd-rom drive and my cdrw drive. can
you please enlighten me to why i should change the symlinks
and my /etc/fstab to something which would not even
allow mounting? as far as i can see my fstab is proper, it's
'just' the matter of getting /dev/sg* to have the right
permissions.

thank you all for your input, i will try to find more possible
solutions today.
 
Old 07-29-2003, 03:25 AM   #12
neenee
Member
 
Registered: Feb 2003
Location: Netherlands
Distribution: debian (sid)
Posts: 693

Original Poster
Rep: Reputation: 30
ok.. i did a simple

chmod 660 /dev/sg*

and now cdercord -scanbus shows my cdrw drive.

though this is great, now i have another problem.

how do i enable dma for my cdrw drive?

i tried hdparm -i /dev/hdd, /dev/sr0 , but it tells me
that hdparm does not support those devices.

as far as i know i need dma, or else i will be forced to
hardly touch my pc when i am burning something to
prevent it from creating a coaster.


and ofcourse the problem which i found when trying
to run totem as normal user remains:

** (totem:12638): WARNING **: Couldn't read /proc/sys/dev/cdrom/info
libdvdnav: Using dvdnav version 1-beta12 from http://xine.sf.net
libdvdread: Using libdvdcss version 1.2.6 for DVD access
libdvdread: Could not open /dev/hdc with libdvdcss.
libdvdread: Can't open /dev/hdc for reading
libdvdnav: vm: faild to open/read the DVD

as root it works fine.

suggestions are very welcome.

Last edited by neenee; 07-29-2003 at 03:36 AM.
 
Old 07-29-2003, 04:29 AM   #13
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
A few suggestions here, then I'll get onto a response

I prefer to compile SCSI support INTO the kernel versus module, mainly because is there ANY point where you don't wanna use your burner as a burner, and have a problem making it work otherwise (as a scd device?), not likely. All those extra modules are unnecessary 'clutter' to me

Ok, so now how to use hdparm on a scsi emulated device. The device you are emulating.

Let's say your burner is /dev/hdc and you are emulating scsi on that device to make it /dev/scd1 then you will:
/sbin/hdparm -Tt /dev/hdc
Or whatever device/options you want. They will apply to the scsi device

Cool
 
Old 07-29-2003, 05:26 AM   #14
neenee
Member
 
Registered: Feb 2003
Location: Netherlands
Distribution: debian (sid)
Posts: 693

Original Poster
Rep: Reputation: 30
ok. thank you for your reply, but as i stated before,
when i try to use hdparm on /dev/hdd it says it is not
supported. i will recompile my kernel now to have
support for scsi + emulation instead of compiling them
as modules.

i will report back with any changes.

reporting back - i compiled all scsi + ide cd modules into
the kernel, but now cdrecord reports the following:

Cdrecord 2.00.3 (i686-pc-linux-gnu) Copyright (C) 1995-2002 Jörg Schilling
cdrecord: No such file or directory. Cannot open '/dev/pg*'. Cannot open SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'. Make sure you are root.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'.

so the mess is back. i'll try figuring out how to fix it :|


*update*


changed it back to modules instead of in-kernel stuff; now
cdrecord-scanbus works again and mounting works. the totem +
dma problems remain.

Last edited by neenee; 07-29-2003 at 06:54 AM.
 
  


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
Flash Card Reader, CDRW and SCSI Emulation Recovery1 Fedora 2 08-19-2004 10:24 PM
ide-scsi emulation problem/ cdrw not accesible RestInPieces Linux - General 2 08-12-2004 12:18 PM
scsi emulation with removeable zip and cdrw dibblethewrecke Linux - Hardware 1 05-21-2004 11:27 AM
Trouble with SCSI emulation for DVD/CDRW drive ohleary Linux - Hardware 5 11-18-2003 04:50 PM
Scsi Emulation.... Where is my cd-rom now? Half_Elf Linux - General 2 05-29-2002 01:14 AM

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

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