LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   mounting cdrw read only in mandrake 7 (https://www.linuxquestions.org/questions/linux-newbie-8/mounting-cdrw-read-only-in-mandrake-7-a-39099/)

zeroability 12-22-2002 12:57 AM

mounting cdrw read only in mandrake 7
 
I am new to linux and this forum so go easy on me....
I am trying to mount my cdrw for read only access and the message is:

mount: /dev/cdrom is not a valid block device

it's not important because I have a dvd I can mount but it's the principle of the thing. I also was wondering if there is drag and drop support for kfm or any other file manager, kinda like Direct CD. I am proudly a FORMER windows user so I have a whole other perspective to learn. Thanks to anyone who at least reads this.

:study:

DavidPhillips 12-22-2002 01:11 AM

mounting rw is not an option, what commands are you using, what's in /etc/fstab

zeroability 12-22-2002 01:25 AM

fstab:

/dev/hda5 /boot ext2 defaults 1 2
/dev/hda6 / ext2 defaults 1 1
/dev/hda7 /home ext2 defaults 1 2
/dev/hdb5 swap swap defaults 0 0
/dev/fd0 /mnt/floppy auto sync, user, noauto, nosuid, nodev, unhide 0 0
none /proc proc defaults 0 0
none /dev/pts devpts mode=0620 0 0
/dev/cdrom /mnt/cdrom auto user, noauto, nosuid, exec, nodev, ro 0 0
/dev/cdrom2 /mnt/cdrom2 auto user, noauto, nosuid, exec, nodev, ro 0 0

DavidPhillips 12-22-2002 02:09 AM

what command are you using?

maybe the cdrw is not /dev/cdrom

maybe it's /dev/sr0 or something else

do you have ide-scsi set on the device in lilo.conf

zeroability 12-22-2002 01:11 PM

the command I am using in terminal is:

mount /mnt/cdrom

as far as the entry in lilo.conf I have an entry under
image=/boot/vmlinuz
that says

append="hdc=ide-scsi"
:study:

It's all greek to me lol

DavidPhillips 12-22-2002 02:03 PM

ok, the line in lilo.conf will make the cd a scsi device probably /dev/sr0

so you need to see what /dev/cdrom is linked to, it may be linked to /dev/hdc which will not work


try this

Code:

mount /dev/sr0 /mnt/cdrom
if that works then you can link /dev/cdrom to /dev/sr0

Code:

ln -sf /dev/sr0 /dev/cdrom
let us know if the mount command does not work

zeroability 12-23-2002 08:06 PM

I tried mounting /dev/sr0 and I got this error:

mount: the kernel does not recognize /dev/sr0 as a block device
(maybe 'insmod driver'?)

round and round we go lol
I appreciate you helping me though.

ty

MasterC 12-23-2002 08:28 PM

Could you kindly post the output of dmesg here, but try to snip it to just show us sections about your drive(s). If you are unsure, just go ahead with the full thing.

Somewhere in there it should tell you something about what device it'll be. And one more thing, what version of Mandrake are you using, I am wondering if you are using DevFS.

Cool

MasterC 12-23-2002 08:30 PM

Ah yes, how to get the output of dmesg:
open up a terminal, and type:
dmesg|less

This will make it scrollable, and that way you can scroll through and find the relevant sections.

That is a pipe ( | ) btw, it's just above the Enter key on my keyboard.

Cool

zeroability 12-23-2002 09:58 PM

dmesg says:

hdc: LG CD-RW CED-8080B, ATAPI CDROM Drive

???

lol

MasterC 12-23-2002 10:02 PM

ha ha ha, ok, can you post the whole thing? There is actually a section in there (usually) that describes the device and the scsi device that is being emulated. Here's my snippet:

Code:

SCSI subsystem driver Revision: 1.00
scsi0 : SCSI host adapter emulation for IDE ATAPI devices
  Vendor: TOSHIBA  Model: DVD-ROM SD-M1402  Rev: 1010
  Type:  CD-ROM                            ANSI SCSI revision: 02
  Vendor: SONY      Model: CD-RW  CRX210E1  Rev: 2YS1
  Type:  CD-ROM                            ANSI SCSI revision: 02
Attached scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0
Attached scsi CD-ROM sr1 at scsi0, channel 0, id 1, lun 0
sr0: scsi3-mmc drive: 40x/40x cd/rw xa/form2 cdda tray
Uniform CD-ROM driver Revision: 3.12
sr1: scsi3-mmc drive: 12x/40x writer cd/rw xa/form2 cdda tray

If that helps any ;)

Cool

zeroability 12-23-2002 11:04 PM

scsi : 0 hosts
scsi : detected total

and dats it

DavidPhillips 12-24-2002 02:41 AM

append="hdc=ide-scsi"

is not working

you will probably want to put it at the beginning of the lilo.conf file

in the mean time you can just use
Code:

mount /dev/hdc /mnt/cdrom

IHateJazz 12-24-2002 10:43 AM

question for David
 
Hi there,

I am having the same problem with mij Philips CDRW. Whenever I (try to)
mount a cd the whole system freezes and I have to reboot. I run RH 8.0. David, should I make a seperate question for my problem and put my dmesg output in there or can I contact you directly? Either way is fine with me.

By the way, sorry for interrupting,

Job

DavidPhillips 12-24-2002 11:03 AM

I don't think the distro matters a lot, although knowing that a particular distro put's a certain link to a device would help.

As far as freezing, I don't know

We need to know how your bios sees the drive, how many
what you can do is post part of your lilo.conf file like this

Code:


cat /etc/lilo.conf | grep append

append="hdd=ide-scsi"

and this
Code:

dmesg | grep CD

hdc: CREATIVE CD5230E, ATAPI CD/DVD-ROM drive
hdd: Hewlett-Packard CD-Writer Plus 9100b, ATAPI CD/DVD-ROM drive
hdc: ATAPI 52X CD-ROM drive, 128kB Cache, DMA
Uniform CD-ROM driver Revision: 3.12
  Vendor: HP        Model: CD-Writer+ 9100b  Rev: 1.07
  Type:  CD-ROM                            ANSI SCSI revision: 02
Attached scsi CD-ROM sr0 at scsi0, channel 0, id 0, lun 0


also let's see what this says
Code:

ls -l /dev/cdrom

lr-xr-xr-x    1 root    root          35 Dec 19 11:15 /dev/cdrom -> /dev/ide/host0/bus1/target0/lun0/cd



and also your /etc/fstab

Code:

cat /etc/fstab


/dev/hda3        swap            swap        defaults        0  0
/dev/hda2        /                ext3        defaults        1  1
/dev/hda1        /mnt/win_c      vfat        gid=99,uid=99,umask=0,user,noauto,rw  1  0
/dev/hdb1        /mnt/win_d      vfat        gid=99,uid=99,umask=0,user,noauto,rw  1  0
/dev/cdrom      /mnt/cdrom      iso9660    noauto,user,ro  0  0
/dev/cdrw        /mnt/cdrw        iso9660    noauto,user,ro  0  0
/dev/fd0        /mnt/floppy      auto        noauto,user,rw  0  0
none            /proc            proc        defaults        0  0



we can check to see if it's set up right, but as far as the freezing goes, it's hard to say

IHateJazz 12-24-2002 04:37 PM

David,

here we go with the output:

Quote:

Originally posted by DavidPhillips
I don't think the distro matters a lot, although knowing that a particular distro put's a certain link to a device would help.

As far as freezing, I don't know

We need to know how your bios sees the drive, how many
what you can do is post part of your lilo.conf file like this

Code:


cat /etc/lilo.conf | grep append

append="hdd=ide-scsi"

as I use a floppy to start up after previous bad experiences with dual boot on my mbr I donṫ run LILO. The SYSLINUX.CFG file on the floppy looks like this:

default linux
prompt 1
display boot.msg
timeout 100
label linux
kernel vmlinuz
append initrd=initrd.img hdd=ide-scsi root=/dev/hdc3

and this
[code]
dmesg | grep CD

[Job@localhost Job]$ dmesg | grep cd
sr0: scsi3-mmc drive: 40x/40x writer cd/rw xa/form2 cdda tray


also let's see what this says
[code]
ls -l /dev/cdrom
[Job@localhost Job]$ ls -l /dev/cdrom
lrwxrwxrwx 1 root root 9 dec 15 15:36 /dev/cdrom -> /dev/scd0

and also your /etc/fstab

[code]
cat /etc/fstab

[Job@localhost Job]$ cat /etc/fstab
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hdc5 swap swap defaults 0 0
/dev/scd0 /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0




we can check to see if it's set up right, but as far as the freezing goes, it's hard to say

Most of it is greek to me, tia for your help and merry christmas!

Job:o

blinux1 12-24-2002 06:14 PM

If you want to find the device name of the CDRW, go to /etc/sysconfig/hwconf. you can see the CDRW drive from there. then you can mount it with.

mount -t iso9660 /dev/**device /mnt/***mount point. The iso9660 is the filesystem type of CDs. I'm sorry if this isn't relevant to the current discussion; i haven't read all of it. hope it helps

zeroability 12-24-2002 09:48 PM

Ok I looked at a post that was submitted a while ago and had problems. It had basically told me to link /dev/scd0 to /dev/cdrw or /dev/cdrom1. Well I tried that last week and puked my links. Since I am not savy enough I just reinstalled (that would be reinstall number 50 in my linux experience). So what I did is said "What the heck" (yeah I acutally said that) and tried to do this:

mount /dev/scd0 /mnt/cdrom

Well guess what happened....
I heard the cdrw read the disk and POOF!
Right to the prompt with no error.
So.... I linked my cdrw to /dev/scd0 /dev/cdrw and my dvd to /dev/hdd /dev/dvd.
Then I had to verify....
And it blew up in my face. So I tried to specify a file system.
Still no go...
Then I remembered this isn't windows lol
I went into a handy dandy utility called linuxconf.
Under that utility there is an area called File Systems and yet another setting called Access Local Drive. This is where I get real proud of myself. I changed the device and mount settings for my drives there and it asks me (in submission to my awesome newbie powers :cool: ) if I want to create the mount files since they weren't there. Sure, why not. It will even autodetect the file system (I think) because the file system field says auto. Now it works like magic. I am extremely grateful to this site and will continue to come here as well as refer it to as many people as I can but unfortunately I can't convert the world... but I'll work on it.

Thanks again,

Nik

DavidPhillips 12-24-2002 11:38 PM

yea you can see your output of dmesg | grep CD

sr0: scsi3-mmc drive: 40x/40x writer cd/rw xa/form2 cdda tray


that tells you there that it's sr0 not scd0

zeroability 12-25-2002 12:54 AM

Hey yeah that's pretty cool. And it figures that I fix one thing and another hits me in the face. I can't get xcdroast or gtoaster to work. What info do I need to give you?

DavidPhillips 12-25-2002 07:36 AM

try running this

cdrecord -scanbus

this should show the cdrw

cdrecord -scanbus
Cdrecord 1.11a24 (i686-pc-linux-gnu) Copyright (C) 1995-2002 Jörg Schilling
Linux sg driver version: 3.1.24
Using libscg version 'schily-0.6'
scsibus0:
0,0,0 0) 'HP ' 'CD-Writer+ 9100b' '1.07' Removable CD-ROM
0,1,0 1) *
0,2,0 2) *
0,3,0 3) *
0,4,0 4) *
0,5,0 5) *
0,6,0 6) *
0,7,0 7) *



that's the first step since xcdroast only works with scsi drives, sr0 is scsi so you should see yours

with that working ok you should be able to record. What kind of errors do you get from xcdroast

DavidPhillips 12-25-2002 08:07 AM

if you are trying to run it as a normal user there are a few things to do first


you need a group that has access, and you will add approved users to that group

Code:

groupadd cdwrite
then you will need to add users

Code:

gpasswd -a david cdwrite
then you need to change some file permissions

Code:

cd /usr/bin/
chown root:cdwrite cdrecord cdda2wav mkisofs readcd
chmod 4710 cdrecord cdda2wav mkisofs readcd

cd /usr/lib/xcdroast*/bin

chown root:cdwrite xcdrwrap
chmod 2755 xcdrwrap


then you should run xcdroast as root
and go to the setup users section and setup users permissions, paths for isos, etc.. then you can run it as a normal user


the file in /usr/bin/xcdroast is going to bring up the root passwd, the actual xcdroast is in /usr/sbin/xcdroast

if you want to replace it run this


Code:

ln -sf /usr/sbin/xcdroast /usr/bin/xcdroast

IHateJazz 12-25-2002 04:43 PM

Hi David,

you were right, after changing fstab and my cd rom connection to sr0 my system doesnṫ freeze any more. The bad news, however, is that i get the following message after mounting my cdrw in teminal:

[root@localhost Job]# mount /dev/sr0 /mnt/cdrom
mount: special device /dev/sr0 does not exist

I feel like a special agent that doesn't officially exist!

thanks for your help,

Job

DavidPhillips 12-25-2002 10:01 PM

run this and see if you have this file

ls -la /dev/.devfsd
crw------- 1 root root 8, 0 Dec 31 1969 /dev/.devfsd


if you do then you are using devfs which may require you to use a different naming scheme

like this link

lr-xr-xr-x 1 root root 36 Dec 19 11:15 /dev/cdrw -> /dev/scsi/host0/bus0/target0/lun0/cd


the link you want to use may need to be created after boot in rc.local or some other file if you want, or you can use the devfs name in fstab,


this is the devfs name of a cdrw using ide-scsi
/dev/scsi/host0/bus0/target0/lun0/cd

IHateJazz 12-26-2002 03:00 AM

Hi David,

the result of the listing:
[Job@localhost Job]$ su
Password:
[root@localhost Job]# ls -la /dev/.devfsd
ls: /dev/.devfsd: Onbekend bestand of map
(last is dutch for unknown file or map)

so I am missing something somewhere?!

Job

DavidPhillips 12-26-2002 11:01 AM

Never seen anything like that

see if you have these folders

/dev/scsi/host0/bus0/target0/lun0/cd

IHateJazz 12-26-2002 04:10 PM

I have the /dev folder which is pretty usual. The rest is missing! Install scsi? How to do that?

Job

DavidPhillips 12-26-2002 04:19 PM

look in this file

/etc/sysconfig/hwconf

see if you can find the name of the cd writer is sr0 in there or something else

zeroability 12-26-2002 08:32 PM

I looked to see what was in /etc/sysconfig/hwconf on mine because I can't burn cd's in any other program except kisocd. I am trying to use gtoaster to burn data and audio cd's and I get i/o errors and such.

I am beginning to think it can't be done.

Here is part of the error messages I am getting. If you know of I way I can pipe it to cat I will do that and just copy and paste to the site:

cdrecord WARNING: Track size unknown. Data may not fit on disk.

cdrecord: input/output error, write_g1: scsi sendcmd:
retryable error
status: 0x2 (CHECK CONDITION)
write track data: error after 0 bytes

Child exited unexpectedly.

If anyone has any ideas let me know.

thanks

IHateJazz 12-27-2002 02:25 AM

David,

cd output of /etc/sysconfig/hwconf:

class: CDROM
bus: SCSI
detached: 0
device: scd0
driver: ignore
desc: "Philips CDRW4012P"
host: 0
id: 0
channel: 0
lun: 0

here we get back to scd0. What to use now? sr0 or scd0?

Job

ps rated you yesterday in affero under nickname firewalkwithme, ok youŕe welcome

DavidPhillips 12-27-2002 08:47 AM

looks like scd0 doesn't it

and that's when it locks up?

mount -t iso9660 /dev/scd0 /mnt/cdrom

zeroability 12-30-2002 08:24 AM

I still can't burn with cdrecord frontends. I copied a data cd with kisocd but I can't get xcdroast or gtoaster to work. cdrecord keeps dumping with i/o error. I am losing my patience with it lol
maybe it doesn't like my burner or something. It's detected by cdrecord -scanbus.

need help!!!

zeroability 12-30-2002 09:16 AM

Oh I had one other question.
An error I get with cdrecord had to do with unable to determine track size or something like that. I am trying to burn from audio disc in my dvd to the cdr. Is there a different way I should set permissions for dvd and cdrw to get it to work (i.e. groups, users, or setuid setgid)? And if so which dev should I use for cdrw (sr0, sg0, scd0)? It seems to be permission related to me but it could just be the windows user in me.

zeroability 12-31-2002 03:49 PM

Well it looks like I found the problem....
::sigh::
It would help greatly if I defined a filesystem on the new cdr so it can be read.


All times are GMT -5. The time now is 08:09 PM.