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

Notices


Reply
  Search this Thread
Old 01-11-2004, 06:15 AM   #1
legin
LQ Newbie
 
Registered: Aug 2003
Location: Adelaide, South Australia
Distribution: Ubuntu, Mint Linux 4.0, ZenWalk
Posts: 29

Rep: Reputation: 15
/dev/cdrom invalid block device.


Last night I tried several times to install Debian (Woody) on a couple of spare partitions.
All went well until just after the reboot. When it came to the time to install packages from the cd it wouldn't find the cd. I kept getting the message "/dev/cdrom is not a valid block device. I tried again with the 2.2 kernel and with the 2.4 kernel with the same result.
Has anyone any ideas?

Thanks in advance legin
 
Old 01-11-2004, 06:19 AM   #2
scott_R
Member
 
Registered: Jul 2003
Location: Brighton, Michigan, USA
Distribution: Lots of distros in the past, now Linux Mint
Posts: 748

Rep: Reputation: 31
I had this, still don't know why, but when I'd type /dev/cdrom, I got nothing. /dev/cdrom0, however, worked just fine...

Hope it helps.
 
Old 01-11-2004, 06:53 AM   #3
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
if the cdrom is loaded with ide-scsi, it would be /dev/scd0 instead of
/dev/cdrom.

if you run cdrecord --scanbus
at the terminal and your cdrom drive shows up there, that's what it is.
 
Old 01-11-2004, 10:16 AM   #4
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
should'nt /dev/cdrom be a symlink to a block device??
mine goes to /dev/hdc
 
Old 01-11-2004, 10:22 AM   #5
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
Quote:
Originally posted by 320mb
should'nt /dev/cdrom be a symlink to a block device??
mine goes to /dev/hdc

for instance if /dev/cdrom was symlinked to /dev/hdc, a cdrom or cdrw
drive, and was setup that way, then ide-scsi was used during boot,
so the drive could be used as a cdwriter, /dev/hdc and thus /dev/cdrom
would no longer be a valid block device.

that's my guess anyway.
 
Old 03-12-2004, 05:32 AM   #6
bcalder01
Member
 
Registered: Nov 2003
Location: Mexico
Distribution: Debian sarge (x86 & PPC), Ubuntu Breezy
Posts: 42

Rep: Reputation: 15
I have to reopen this thread, since I'm having the same trouble on my unstable (knoppix 3.2 installed to HD) system. I've tried kernel 2.4.22, 2.4.24 & 2.6 (as well as the suggestions in this thread), to no avail. Here's the relevant output from dmesg, it looks like /dev/sd0 should be valid, right?

=========================================
hdd: CD-224E, ATAPI CD/DVD-ROM drive
ide-cd: passing drive hdd to ide-scsi emulation.
hdd: attached ide-scsi driver.
SCSI subsystem driver Revision: 1.00
scsi0 : SCSI host adapter emulation for IDE ATAPI devices
Vendor: TEAC Model: CD-224E Rev: K.0B
Type: CD-ROM ANSI SCSI revision: 02
=========================================

Any & all suggestions would be appreciated!!
 
Old 03-12-2004, 07:11 AM   #7
bcalder01
Member
 
Registered: Nov 2003
Location: Mexico
Distribution: Debian sarge (x86 & PPC), Ubuntu Breezy
Posts: 42

Rep: Reputation: 15
OK, I booted my trusty, crusty old kernel via floppy & the cdrom attached fine. Here's dmesg from that boot:

========================================
Mar 12 12:54:06 gwlap kernel: SCSI subsystem driver Revision: 1.00
Mar 12 12:54:06 gwlap kernel: scsi0 : SCSI host adapter emulation for IDE ATAPI devices
Mar 12 12:54:06 gwlap kernel: Vendor: TEAC Model: CD-224E Rev: K.0B
Mar 12 12:54:06 gwlap kernel: Type: CD-ROM ANSI SCSI revision: 02
Mar 12 12:54:06 gwlap kernel: Attached scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0
Mar 12 12:54:06 gwlap kernel: sr0: scsi3-mmc drive: 24x/24x xa/form2 cdda tray
Mar 12 12:54:06 gwlap kernel: Uniform CD-ROM driver Revision: 3.12
========================================

Looks like what's missing in the first instance is the last three lines. sr0 is symlinked to sda1 in /dev.

??????

Last edited by bcalder01; 03-12-2004 at 07:13 AM.
 
Old 03-12-2004, 07:56 AM   #8
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
sda1 is a scsi hard drive

on my machine /dev/scd0 is the first scsi emulated hard drive.

see if any drives show up under
cdrecord --scanbus
as root

the 2 modules that need to be loaded are ide-scsi and sg

if cdrecord sees the drives, the modules are loaded.
 
Old 03-12-2004, 09:56 AM   #9
bcalder01
Member
 
Registered: Nov 2003
Location: Mexico
Distribution: Debian sarge (x86 & PPC), Ubuntu Breezy
Posts: 42

Rep: Reputation: 15
I'll apt-get cdrecord, but I know ide-scsi is loading, from reading dmesg, so I guess sg is not. Is there a way to make sg load, or to build/install it??

Last edited by bcalder01; 03-12-2004 at 09:57 AM.
 
Old 03-12-2004, 01:55 PM   #10
johnMG
Member
 
Registered: Jul 2003
Location: CT, USA
Distribution: Debian Sarge (server), Etch (work/home)
Posts: 601

Rep: Reputation: 32
Run modconf as root to get those modules to load.
 
Old 03-12-2004, 05:23 PM   #11
bcalder01
Member
 
Registered: Nov 2003
Location: Mexico
Distribution: Debian sarge (x86 & PPC), Ubuntu Breezy
Posts: 42

Rep: Reputation: 15
OK, I apt-getted cdrecord & here's the output of --scanbus:

========================================================
Linux sg driver version: 3.1.25
Using libscg version 'schily-0.8'.
scsibus0:
0,0,0 0) 'TEAC ' 'CD-224E ' 'K.0B' Removable CD-ROM
========================================================

So both of the necessary modules are loaded. What is this telling me that my cdrom drive is? in /dev, cdrom is a symlink to /dev/scd0. sr0 is a symlink to scd0 (not /dev/scd0).

Thanks for all the prompt responses.

Last edited by bcalder01; 03-12-2004 at 05:24 PM.
 
Old 03-12-2004, 08:59 PM   #12
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
what are you trying to do that's not working.
i thought you were trying to burn a cd.

having the symlink correct is for cd players and rippers mostly.

having the ide-scsi and sg are for cdrecord.

if you have your boot loader ignore the cdrom drive, so you can set it
up as ide-scsi for cdrecord, and it doesn't get set up right, you can't
do anything with the drive.

it looks like you are set up properly for both.
 
Old 03-13-2004, 04:32 AM   #13
bcalder01
Member
 
Registered: Nov 2003
Location: Mexico
Distribution: Debian sarge (x86 & PPC), Ubuntu Breezy
Posts: 42

Rep: Reputation: 15
I'm just trying to get my cd player to show up properly. It's not a burner, but cdreord was useful to know if the system would see it.

I'm stumped ... it is set up in fstab, on boot it's getting passed to the ide-scsi driver, sg is being utilized, but I keep getting the "not a valid block device" error. I've compiled my kernel with SCSI & SCSI generic support, I've tried using /dev/sda1, /dev/scd0, /dev/sr0. The only way I can get it to show up is to boot my original kernel, Knoppix installed to the hard disc.
 
Old 03-13-2004, 05:44 AM   #14
whansard
Senior Member
 
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304

Rep: Reputation: 65
you can try mounting a data disk as various devices to see what is up with the disk.

mkdir /mnt/cdrom
mount /dev/scd0 /mnt/cdrom
mount /dev/hdc /mnt/cdrom
mount /dev/hdd /mnt/cdrom
 
Old 03-15-2004, 08:18 AM   #15
bcalder01
Member
 
Registered: Nov 2003
Location: Mexico
Distribution: Debian sarge (x86 & PPC), Ubuntu Breezy
Posts: 42

Rep: Reputation: 15
* Tried those, still no joy.

root@gwlap:/# mount -t iso9660 /dev/hdd /cdrom
mount: wrong fs type, bad option, bad superblock on /dev/hdd,
or too many mounted file systems
(could this be the IDE device where you in fact use
ide-scsi so that sr0 or sda or so is needed?)

root@gwlap:/# mount -t iso9660 /dev/sr0 /cdrom
mount: /dev/sr0 is not a valid block device

root@gwlap:/# mount -t iso9660 /dev/sda /cdrom
mount: /dev/sda is not a valid block device

root@gwlap:/# mount -t iso9660 /dev/so /cdrom
mount: special device /dev/so does not exist

* I recompiled my 2.4.22 kernel without SCSI emulation, now HDD is being picked up by ide-cdrom.

Mar 14 10:17:23 gwlap kernel: Kernel command line: BOOT_IMAGE=2.4.22 ro root=306 hda=scsi hdb=scsi hdc=scsi hde=scsi apm=power-off nomce
Mar 14 10:17:23 gwlap kernel: ide_setup: hda=scsi
Mar 14 10:17:23 gwlap kernel: ide_setup: hdb=scsi
Mar 14 10:17:23 gwlap kernel: ide_setup: hdc=scsi
Mar 14 10:17:23 gwlap kernel: ide_setup: hde=scsi
Mar 14 10:17:23 gwlap kernel: hdd: attached ide-cdrom driver.
Mar 14 10:17:23 gwlap kernel: hdd: ATAPI 24X CD-ROM drive, 128kB Cache, DMA
Mar 14 10:17:23 gwlap kernel: Uniform CD-ROM driver Revision: 3.12

* But I don't know how or where to mount it!!

mount -t iso9660 /dev/hdd /cdrom
hdd:communication error: status=0x51 <<<<<<PANIC!!>>>>>>>

This may have been an audio CD, but I assume I need to change fstab to /dev/hdd /cdrom, correct??
 
  


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
CDROM mounting problem => /dev/cdrom is not a valid block device Vizy Linux - Hardware 8 11-04-2010 04:46 PM
/dev/cdrom is not a valid block device cannot mount eatmars Linux - Hardware 1 10-02-2005 07:50 AM
mount: /dev/cdrom is not a valid block device aikempshall Slackware 7 01-15-2005 02:36 AM
/dev/cdrom is not a valid block device ukrainet Linux - Newbie 1 12-27-2004 04:29 AM
/dev/cdrom is not a valid block device kryptotronic Debian 8 04-04-2004 05:11 PM

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

All times are GMT -5. The time now is 12:15 AM.

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