What is the difference between /dev/sg0, /dev/scd0 /dev/hdd and /dev/cdrom ?

What is the difference between /dev/sg0, /dev/scd0 /dev/hdd and /dev/cdrom ?

Post by Nobod » Tue, 03 Dec 2002 07:12:56



Hi people.

I'm trying to debug a problem that I'm having with my CDROM player and
cdparanoia.  They crash talking to each other.

What is the difference between accessing the cdrom via /dev/sg0,
/dev/scd0, /dev/cdrom and /dev/hdd ?

/dev/cdrom is a link, right ?  It is a hard or soft link ?  How would I
point it to something else ?

cdparanoia needs to access the CDROM via a scsi interface.  In order for
that to work, one needs to turn OFF ATAPI CDROM support in the kernel and
turn on general scsi and CDROM scsi support.

Right now my /dev/cdrom device points to /dev/scd0.  Given that cdparanoia
needs a scsi interface, shouldn't this point to /dev/sg0 ?

Furthermore, grub load the following: hdd=ide-scsi.  That means that the
IDE ATAPI CDROM drive will be accessed using the scsi interface, right ?
Could I not point /dev/cdrom to /dev/hdd ?

Thanks,
Nobody

 
 
 

What is the difference between /dev/sg0, /dev/scd0 /dev/hdd and /dev/cdrom ?

Post by Uncle Theodor » Tue, 03 Dec 2002 07:34:36



> Hi people.

> I'm trying to debug a problem that I'm having with my CDROM player and
> cdparanoia.  They crash talking to each other.

Why should they be talking to each other?

Quote:> What is the difference between accessing the cdrom via /dev/sg0,
> /dev/scd0, /dev/cdrom and /dev/hdd ?

Different drivers. SCSI has different drivers, hdd is an IDE device abd
uses an IDE driver.

Quote:> /dev/cdrom is a link, right ?  It is a hard or soft link ?  How would I
> point it to something else ?

Soft.

cd /dev
ls -l cdrom

rm cdrom
ln -s scd0 cdrom

and it points to /dev/scd0 now.

Quote:> cdparanoia needs to access the CDROM via a scsi interface.  In order for
> that to work, one needs to turn OFF ATAPI CDROM support in the kernel
> and turn on general scsi and CDROM scsi support.

cd /boot
cat config | grep SCSI

Quote:> Right now my /dev/cdrom device points to /dev/scd0.  Given that
> cdparanoia needs a scsi interface, shouldn't this point to /dev/sg0 ?
> Furthermore, grub load the following: hdd=ide-scsi.  That means that the
> IDE ATAPI CDROM drive will be accessed using the scsi interface, right ?
> Could I not point /dev/cdrom to /dev/hdd ?

Sure, you can do that. I think, it's default

Have you tried

cdparanioa -vsQ

Well, on my system /dev/cdrom points to /dev/hdd, and the SCSI-emulated
CDRW in lilo.conf is /dev/hdc. Cdparanoia works perfectly with disk in
/dev/hdd. I understand what makes you think that cdparanoia needs SCSI
simulation, but my example demonstrates the contrary. Relink /dev/cdrom
to /dev/hdd and try again. In kscd set the device to be /dev/scd0. Of
course, I have 2 CD drives, though...

Good Luck,
UT

 
 
 

What is the difference between /dev/sg0, /dev/scd0 /dev/hdd and /dev/cdrom ?

Post by CL Gilber » Tue, 03 Dec 2002 07:49:32


Someone may correct me but here goes.

/dev is a hardware device

/dev/sg0
is scsi drive interface g channel 0
/dev/scd0
is scsi drive interface c virtual drive d channel 0
its virtual because of the partitioning. so the true drive c is cut into
logical portions one of which is d
/dev/hdd
is IDE drive D
/dev/cdrom
is the cdrom :D

i been on linux over  a year but I have yet to make it my primary.  as soon
as I give up games, I will do it...then I will learn better.

carl


Quote:> Hi people.

> I'm trying to debug a problem that I'm having with my CDROM player and
> cdparanoia.  They crash talking to each other.

> What is the difference between accessing the cdrom via /dev/sg0,
> /dev/scd0, /dev/cdrom and /dev/hdd ?

> /dev/cdrom is a link, right ?  It is a hard or soft link ?  How would I
> point it to something else ?

> cdparanoia needs to access the CDROM via a scsi interface.  In order for
> that to work, one needs to turn OFF ATAPI CDROM support in the kernel and
> turn on general scsi and CDROM scsi support.

> Right now my /dev/cdrom device points to /dev/scd0.  Given that cdparanoia
> needs a scsi interface, shouldn't this point to /dev/sg0 ?

> Furthermore, grub load the following: hdd=ide-scsi.  That means that the
> IDE ATAPI CDROM drive will be accessed using the scsi interface, right ?
> Could I not point /dev/cdrom to /dev/hdd ?

> Thanks,
> Nobody

 
 
 

What is the difference between /dev/sg0, /dev/scd0 /dev/hdd and /dev/cdrom ?

Post by Uncle Theodor » Tue, 03 Dec 2002 07:56:08



> Someone may correct me but here goes.

> /dev is a hardware device

> /dev/sg0
> is scsi drive interface g channel 0
> /dev/scd0
> is scsi drive interface c virtual drive d channel 0 its virtual because
> of the partitioning. so the true drive c is cut into logical portions
> one of which is d
> /dev/hdd
> is IDE drive D
> /dev/cdrom
> is the cdrom :D

> i been on linux over  a year but I have yet to make it my primary.  as
> soon as I give up games, I will do it...then I will learn better.

No offence, Carl, but do learn better, OK? hdd is the slave on the secondary
IDE channel, the letters "d" have ABSOLUTELY NOTHING to do with "drive
letters" :D or whatever that don't even exist in Linux.

Good Luck,
UT

 
 
 

What is the difference between /dev/sg0, /dev/scd0 /dev/hdd and /dev/cdrom ?

Post by Nobod » Tue, 03 Dec 2002 08:44:57


Comments below:



>> Hi people.

>> I'm trying to debug a problem that I'm having with my CDROM player and
>> cdparanoia.  They crash talking to each other.

> Why should they be talking to each other?

I should have said communicate.  I'm getting tons of errors and some
crashing running cdparanoia on my RH8 box.

Quote:>> What is the difference between accessing the cdrom via /dev/sg0,
>> /dev/scd0, /dev/cdrom and /dev/hdd ?

> Different drivers. SCSI has different drivers, hdd is an IDE device abd
> uses an IDE driver.

abd ?  What is that ?  I think you meant scd, right ?

Quote:>> /dev/cdrom is a link, right ?  It is a hard or soft link ?  How would I
>> point it to something else ?

> Soft.

OK

Quote:> cd /dev
> ls -l cdrom

> rm cdrom
> ln -s scd0 cdrom

> and it points to /dev/scd0 now.

OK

Quote:>> cdparanoia needs to access the CDROM via a scsi interface.  In order for
>> that to work, one needs to turn OFF ATAPI CDROM support in the kernel
>> and turn on general scsi and CDROM scsi support.

> cd /boot
> cat config | grep SCSI

OK

Quote:>> Right now my /dev/cdrom device points to /dev/scd0.  Given that
>> cdparanoia needs a scsi interface, shouldn't this point to /dev/sg0 ?

>> Furthermore, grub load the following: hdd=ide-scsi.  That means that the
>> IDE ATAPI CDROM drive will be accessed using the scsi interface, right ?
>> Could I not point /dev/cdrom to /dev/hdd ?

> Sure, you can do that. I think, it's default

No, it isn't default.  Mine point to scd0.

Quote:> Have you tried

> cdparanioa -vsQ

Not yet...

 > Well, on my system /dev/cdrom points to /dev/hdd, and the SCSI-emulated

Quote:> CDRW in lilo.conf is /dev/hdc. Cdparanoia works perfectly with disk in
> /dev/hdd. I understand what makes you think that cdparanoia needs SCSI
> simulation, but my example demonstrates the contrary.

The cdparanoia says that it needs a scsi interface to perform the various
read and error correcting stuff.  It won't run on an ATAPI interface.  I'm
guessing that your lilo.conf file has hdd=ide-scsi line in it.

Relink /dev/cdrom

Quote:> to /dev/hdd and try again.

I'll link it there.  It never was linked there.

In kscd set the device to be /dev/scd0. Of

Quote:> course, I have 2 CD drives, though...

Only one, right now.
Quote:> Good Luck,
> UT

 
 
 

What is the difference between /dev/sg0, /dev/scd0 /dev/hdd and /dev/cdrom ?

Post by Uncle Theodor » Tue, 03 Dec 2002 08:51:58



>> Different drivers. SCSI has different drivers, hdd is an IDE device abd
>> uses an IDE driver.

> abd ?  What is that ?  I think you meant scd, right ?

"abd" is Geordie for "and" (when you've got a stuffed nose). Sorry, a finger
slip.

BTW, do you have devfs running? You might wanna try booting without it
for once. It really only screwes things around...

Good Luck,
UT

 
 
 

What is the difference between /dev/sg0, /dev/scd0 /dev/hdd and /dev/cdrom ?

Post by Nobod » Tue, 03 Dec 2002 08:57:00


Changed /dev/cdrom to point to /dev/hdd. Same problem.

-P on the output means: "Unreported loss of streaming in atomic read
operation"


cdparanoia III release 9.8 (March 23, 2001)


http://www.xiph.org/paranoia/

Checking /dev/cdrom for cdrom...
        Testing /dev/cdrom for cooked ioctl() interface
                /dev/scd0 is not a cooked ioctl CDROM.
        Testing /dev/cdrom for SCSI interface
                generic device: /dev/sg0
                ioctl device: /dev/scd0

Found an accessible SCSI CDROM drive.
Looking at revision of the SG interface in use...
        SG interface version 3.1.24; OK.

CDROM model sensed sensed: CREATIVE CD2423E  NC102 1.02

Checking for SCSI emulation...
        Drive is ATAPI (using SCSI host adaptor emulation)

Checking for MMC style command set...
        Drive is MMC style
        DMA scatter/gather table entries: 256
        table entry size: 32768 bytes
        maximum theoretical transfer: 3566 sectors
        Setting default read size to 13 sectors (30576 bytes).

Verifying CDDA command set...
        Expected command set reads OK.

Table of contents (audio tracks only):
track        length               begin        copy pre ch
===========================================================
  1.    20227 [04:29.52]        0 [00:00.00]    no   no  2
  2.    16173 [03:35.48]    20227 [04:29.52]    no   no  2
  3.    11980 [02:39.55]    36400 [08:05.25]    no   no  2
  4.    14715 [03:16.15]    48380 [10:45.05]    no   no  2
  5.    10425 [02:19.00]    63095 [14:01.20]    no   no  2
  6.    22655 [05:02.05]    73520 [16:20.20]    no   no  2
  7.    13340 [02:57.65]    96175 [21:22.25]    no   no  2
  8.    18017 [04:00.17]   109515 [24:20.15]    no   no  2
  9.    19720 [04:22.70]   127532 [28:20.32]    no   no  2
 10.    16730 [03:43.05]   147252 [32:43.27]    no   no  2
 11.    22225 [04:56.25]   163982 [36:26.32]    no   no  2
 12.    15875 [03:31.50]   186207 [41:22.57]    no   no  2
 13.    22473 [04:59.48]   202082 [44:54.32]    no   no  2
 14.    25750 [05:43.25]   224555 [49:54.05]    no   no  2
 15.    20152 [04:28.52]   250305 [55:37.30]    no   no  2
TOTAL  270457 [60:06.07]    (audio only)

Ripping from sector       0 (track  1 [0:00.00])
          to sector  270456 (track 15 [4:28.51])

outputting to track01.cdda.wav

 (== PROGRESS == [+     +>                      | 005200 00 ] == :-P 0 ==)
SCSI transport error: timeout waiting to read packet

scsi_read error: sector=5343 length=13 retry=0
                 Sense key: 0 ASC: 0 ASCQ: 0
                 Transport error: Error reading command from device
                 System error: Success

 
 
 

What is the difference between /dev/sg0, /dev/scd0 /dev/hdd and /dev/cdrom ?

Post by Kosh Vade » Tue, 03 Dec 2002 09:12:38




From a different thread:

----
outputting to track05.cdda.wav

 (== PROGRESS == [          +       >           | 088758 00 ] == :-) .
==)
SCSI transport error: timeout waiting to read packet

scsi_read error: sector=88883 length=13 retry=0
                 Sense key: 0 ASC: 0 ASCQ: 0
                 Transport error: Error reading command from device
                 System error: Success
----

Quote:> Ripping from sector       0 (track  1 [0:00.00])
>           to sector  270456 (track 15 [4:28.51])

> outputting to track01.cdda.wav

>  (== PROGRESS == [+     +>                      | 005200 00 ] == :-P 0 ==)
> SCSI transport error: timeout waiting to read packet

> scsi_read error: sector=5343 length=13 retry=0
>                  Sense key: 0 ASC: 0 ASCQ: 0
>                  Transport error: Error reading command from device
>                  System error: Success

Are sure that CD-ROM drive is not at fault here?  Perhaps its optics are
dirty or something.  Is that not a possibility?

Chris

 
 
 

What is the difference between /dev/sg0, /dev/scd0 /dev/hdd and /dev/cdrom ?

Post by Nobod » Tue, 03 Dec 2002 09:16:10


What is devfs ?

Actually, it is working OK now.  It just ripped 10 tracks in no time flat,
all perfect without crashing.

I've got the BIOS set to read the secondary master as CDROM.  I wonder if
leaving it in Auto would be better ?

Thanks for the advice.

Nobody



>>> Different drivers. SCSI has different drivers, hdd is an IDE device abd
>>> uses an IDE driver.

>> abd ?  What is that ?  I think you meant scd, right ?

> "abd" is Geordie for "and" (when you've got a stuffed nose). Sorry, a finger
> slip.

> BTW, do you have devfs running? You might wanna try booting without it
> for once. It really only screwes things around...

> Good Luck,
> UT

 
 
 

What is the difference between /dev/sg0, /dev/scd0 /dev/hdd and /dev/cdrom ?

Post by Nobod » Tue, 03 Dec 2002 09:30:40


re:dirty optics:

a) cdparanoia is the king of reading bad cds.  cdda2wav will read cds
without crashing, but they are full of pops.

b) cdda2wav read on this same drive with no problems.

Nobody

 
 
 

What is the difference between /dev/sg0, /dev/scd0 /dev/hdd and /dev/cdrom ?

Post by Kosh Vade » Tue, 03 Dec 2002 09:42:17




Quote:> re:dirty optics:

> a) cdparanoia is the king of reading bad cds.

Yes.

Quote:> cdda2wav will read cds without crashing, but they are full of pops.

> b) cdda2wav read on this same drive with no problems.

Sorry, did you mention "cdda2wav" being able to read from CD's before?
I didn't see that...

Chris

 
 
 

What is the difference between /dev/sg0, /dev/scd0 /dev/hdd and /dev/cdrom ?

Post by Nobod » Tue, 03 Dec 2002 09:53:48


Subject says it all.

What is devfs ?

 
 
 

What is the difference between /dev/sg0, /dev/scd0 /dev/hdd and /dev/cdrom ?

Post by Kosh Vade » Tue, 03 Dec 2002 10:02:43




Quote:> What is devfs ?

devfs is a dynamic filesystem ("/dev") created and mounted by the kernel
that contains all the registered devices.

Does Red Hat 8.0 use this?  To check, do "ls -l /dev/.devfsd" is see if
it return with a file listing.  If not, your system is not using devfs.

Chris

 
 
 

What is the difference between /dev/sg0, /dev/scd0 /dev/hdd and /dev/cdrom ?

Post by Nobod » Tue, 03 Dec 2002 10:37:28



ls: /dev/.devfsd: No such file or directory

With cdparanoia crashed:

/dev/hdd:
 HDIO_GET_MULTCOUNT failed: Input/output error
 IO_support   =  0 (default 16-bit)
 unmaskirq    =  0 (off)
 using_dma    =  0 (off)
 keepsettings =  0 (off)
 readonly     =  0 (off)
 BLKRAGET failed: Input/output error
 HDIO_GETGEO failed: Invalid argument




>> What is devfs ?

> devfs is a dynamic filesystem ("/dev") created and mounted by the kernel
> that contains all the registered devices.

> Does Red Hat 8.0 use this?  To check, do "ls -l /dev/.devfsd" is see if
> it return with a file listing.  If not, your system is not using devfs.

> Chris