LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Having trouble with SCSI emulation (https://www.linuxquestions.org/questions/linux-newbie-8/having-trouble-with-scsi-emulation-514760/)

opto 12-29-2006 09:49 PM

Having trouble with SCSI emulation
 
I am having problems getting SCSI emulation working on Slackware 10.2 (Kernel Version 2.4.31). I had SCSI emulation working before, but I had to reinstall a few weeks ago and did not write down how got it to work.

I can mount media that is in my CD-RW using the following

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

I also try to use cdrecord I keep getting the following errors:

michael@toroidal:/dev$ cdrecord -scanbus
Cdrecord-Clone 2.01 (i686-pc-linux-gnu) Copyright (C) 1995-2004 Jörg Schilling
cdrecord: No such file or directory. Cannot open '/dev/pg*'. Cannot open SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'.


I'm thinking that SCSI emulation is not working so I modified my lilo and fstab files.

Here is a snippet of my lilo.conf:
Start LILO global section
boot = /dev/hda
message = /boot/boot_message.txt
prompt
timeout = 1200
# Override dangerous defaults that rewrite the partition table:
change-rules
reset
# Normal VGA console

...
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/hda2
append="hdc=ide-scsi"
label = Linux
read-only
append="apm=power-off"
# Linux bootable partition config ends


Here is a copy of my fstab file:

/dev/hda1 swap swap defaults 0 0
/dev/hda2 / reiserfs defaults 1 1
/dev/cdrom /mnt/cdrom iso9660 noauto,user,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,users 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0


Ran lilo and rebooted

After making the modification above I tried symlink
ln -s sr0 cdrw and got the following: ln: `cdrw': File exists

I tried the cdrecord -scanbus command (as user and /) again a still got the error above:
Cdrecord-Clone 2.01 (i686-pc-linux-gnu) Copyright (C) 1995-2004 Jörg Schilling
cdrecord: No such file or directory. Cannot open '/dev/pg*'. Cannot open SCSI driver.
cdrecord: For possible targets try 'cdrecord -scanbus'.
cdrecord: For possible transport specifiers try 'cdrecord dev=help'.


If want to mount a CD I still have to use hdc, so I'm assuming scsi emulation is still not working properly


Here is my dmesg:

Linux version 2.4.31 (root@tree) (gcc version 3.3.5) #6 Sun Jun 5 19:04:47 PDT 2005
BIOS-provided physical RAM map:
BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
BIOS-e820: 0000000000100000 - 000000000fec0000 (usable)
BIOS-e820: 000000000fec0000 - 000000000fef8000 (ACPI data)
BIOS-e820: 000000000fef8000 - 000000000ff00000 (ACPI NVS)
BIOS-e820: 00000000ffb80000 - 00000000ffc00000 (reserved)
BIOS-e820: 00000000fff00000 - 0000000100000000 (reserved)
254MB LOWMEM available.
On node 0 totalpages: 65216
zone(0): 4096 pages.
zone(1): 61120 pages.
zone(2): 0 pages.
Kernel command line: BOOT_IMAGE=Linux ro root=302 apm=power-off
Initializing CPU#0
Detected 1096.693 MHz processor.
Console: colour VGA+ 80x25
Calibrating delay loop... 2188.90 BogoMIPS
Memory: 254816k/260864k available (1832k kernel code, 5660k reserved, 607k data, 120k init, 0k highmem)
Dentry cache hash table entries: 32768 (order: 6, 262144 bytes)
Inode cache hash table entries: 16384 (order: 5, 131072 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 16384 (order: 4, 65536 bytes)
Page-cache hash table entries: 65536 (order: 6, 262144 bytes)
CPU: L1 I cache: 16K, L1 D cache: 16K
CPU: L2 cache: 128K
CPU: After generic, caps: 0383f9ff 00000000 00000000 00000000
CPU: Common caps: 0383f9ff 00000000 00000000 00000000
CPU: Intel Celeron (Coppermine) stepping 0a
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
mtrr: v1.40 (20010327) Richard Gooch (rgooch@atnf.csiro.au)
mtrr: detected mtrr type: Intel
PCI: PCI BIOS revision 2.10 entry at 0xfda95, last bus=1
PCI: Using configuration type 1
PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
Transparent bridge - Intel Corp. 82801AA PCI Bridge
PCI: Using IRQ router PIIX/ICH [8086/2410] at 00:1f.0
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
VFS: Disk quotas vdquot_6.5.1
Journalled Block Device driver loaded
pty: 512 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with HUB-6 MANY_PORTS MULTIPORT SHARE_IRQ SERIAL_PCI enabled
ttyS00 at 0x03f8 (irq = 4) is a 16550A
Real Time Clock Driver v1.10f
Floppy drive(s): fd0 is 1.44M
FDC 0 is a post-1991 82077
RAMDISK driver initialized: 16 RAM disks of 7777K size 1024 blocksize
loop: loaded (max 8 devices)
Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
ICH: IDE controller at PCI slot 00:1f.1
ICH: chipset revision 2
ICH: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0xffa0-0xffa7, BIOS settings: hda:DMA, hdb:pio
ide1: BM-DMA at 0xffa8-0xffaf, BIOS settings: hdc:DMA, hdd:pio
hda: WDC WD200BB-75CLB0, ATA DISK drive
blk: queue c03af460, I/O limit 4095Mb (mask 0xffffffff)
hdc: LG CD-RW CED-8080B, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: attached ide-disk driver.
hda: host protected area => 1
hda: 39102336 sectors (20020 MB) w/2048KiB Cache, CHS=2434/255/63, UDMA(66)
hdc: attached ide-cdrom driver.
hdc: ATAPI 32X CD-ROM CD-R/RW drive, 2048kB Cache, DMA
Uniform CD-ROM driver Revision: 3.12
Partition check:
hda: hda1 hda2
SCSI subsystem driver Revision: 1.00
kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2
kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2
kmod: failed to exec /sbin/modprobe -s -k scsi_hostadapter, errno = 2
md: linear personality registered as nr 1
md: raid0 personality registered as nr 2
md: raid1 personality registered as nr 3
md: raid5 personality registered as nr 4
raid5: measuring checksumming speed
8regs : 1815.200 MB/sec
32regs : 1044.400 MB/sec
pIII_sse : 2212.000 MB/sec
pII_mmx : 2482.800 MB/sec
p5_mmx : 2591.600 MB/sec
raid5: using function: pIII_sse (2212.000 MB/sec)
md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
LVM version 1.0.8(17/11/2003)
Initializing Cryptographic API
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 2048 buckets, 16Kbytes
TCP: Hash tables configured (established 16384 bind 32768)
Linux IP multicast router 0.06 plus PIM-SM
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
FAT: bogus logical sector size 0
UMSDOS: msdos_read_super failed, mount aborted.
FAT: bogus logical sector size 0
FAT: bogus logical sector size 0
reiserfs: found format "3.6" with standard journal
reiserfs: checking transaction log (device ide0(3,2)) ...
for (ide0(3,2))
ide0(3,2):Using r5 hash to sort names
VFS: Mounted root (reiserfs filesystem) readonly.
Freeing unused kernel memory: 120k freed
Adding Swap: 506008k swap-space (priority -1)
apm: BIOS version 1.2 Flags 0x03 (Driver version 1.16)
Linux agpgart interface v0.99 (c) Jeff Hartmann
agpgart: Maximum main memory to use for agp memory: 202M
agpgart: Detected an Intel i810 Chipset.
agpgart: AGP aperture is 64M @ 0xf8000000
ne2k-pci.c:v1.02 10/19/2000 D. Becker/P. Gortmaker
http://www.scyld.com/network/ne2k-pci.html
PCI: Found IRQ 10 for device 01:0b.0
PCI: Sharing IRQ 10 with 00:1f.2
PCI: Sharing IRQ 10 with 01:0a.1
eth0: RealTek RTL-8029 found at 0xdf80, IRQ 10, 00:C0:F0:5C:0C:E5.
scsi0 : SCSI host adapter emulation for IDE ATAPI devices
Linux Kernel Card Services 3.1.22
options: [pci] [cardbus] [pm]
isapnp: Scanning for PnP cards...
isapnp: No Plug & Play device found
Intel ISA PCIC probe: not found.
Databook TCIC-2 PCMCIA probe: not found.
ds: no socket drivers loaded!
parport0: PC-style at 0x378 [PCSPP,TRISTATE,EPP]
lp0: using parport0 (polling).
PCI: Found IRQ 11 for device 01:08.0
PCI: Sharing IRQ 11 with 00:01.0
PCI: Sharing IRQ 11 with 01:0a.2
paride: version 1.06 installed (parport)
pg: pg version 1.02, major 97
pg0: Autoprobe failed
pg: No ATAPI device detected
paride: version 1.06 installed (parport)
pg: pg version 1.02, major 97
pg0: Autoprobe failed
pg: No ATAPI device detected
paride: version 1.06 installed (parport)
pg: pg version 1.02, major 97
pg0: Autoprobe failed
pg: No ATAPI device detected
paride: version 1.06 installed (parport)
pg: pg version 1.02, major 97
pg0: Autoprobe failed
pg: No ATAPI device detected
hdc: command error: status=0x51 { DriveReady SeekComplete Error }
hdc: command error: error=0x50
end_request: I/O error, dev 16:00 (hdc), sector 64
isofs_read_super: bread failed, dev=16:00, iso_blknum=16, block=32
paride: version 1.06 installed (parport)
pg: pg version 1.02, major 97
pg0: Autoprobe failed
pg: No ATAPI device detected
paride: version 1.06 installed (parport)
pg: pg version 1.02, major 97
pg0: Autoprobe failed
pg: No ATAPI device detected
paride: version 1.06 installed (parport)
pg: pg version 1.02, major 97
pg0: Autoprobe failed
pg: No ATAPI device detected
paride: version 1.06 installed (parport)
pg: pg version 1.02, major 97
pg0: Autoprobe failed
pg: No ATAPI device detected
paride: version 1.06 installed (parport)
pg: pg version 1.02, major 97
pg0: Autoprobe failed
pg: No ATAPI device detected
paride: version 1.06 installed (parport)
pg: pg version 1.02, major 97
pg0: Autoprobe failed
pg: No ATAPI device detected
paride: version 1.06 installed (parport)
pg: pg version 1.02, major 97
pg0: Autoprobe failed
pg: No ATAPI device detected
paride: version 1.06 installed (parport)
pg: pg version 1.02, major 97
pg0: Autoprobe failed
pg: No ATAPI device detected
paride: version 1.06 installed (parport)
pg: pg version 1.02, major 97
pg0: Autoprobe failed
pg: No ATAPI device detected
paride: version 1.06 installed (parport)
pg: pg version 1.02, major 97
pg0: Autoprobe failed
pg: No ATAPI device detected
paride: version 1.06 installed (parport)
pg: pg version 1.02, major 97
pg0: Autoprobe failed
pg: No ATAPI device detected
paride: version 1.06 installed (parport)
pg: pg version 1.02, major 97
pg0: Autoprobe failed
pg: No ATAPI device detected

I searched on google and LQ.org I can't find any answers.

Does anybody know what steps I am missing?

Thanks

hoodooman 12-30-2006 11:18 AM

try (as root)changing the user group on the sg devices (the numeric ones) ,eg sg0 sg1 etc,to enable cdrom group to use them and then change permissions to enable read/write access to the cdrom group..making sure you are in the cdrom group of course.Also make sure your cdrom drive links to /dev/sr0.Im sure the info on how to do all this is to be found under linux howtos,at least it was under slackware 10.1.hope this gets you going.

opto 12-30-2006 10:17 PM

Thanks, I'll check it out.

In case anybody else are having the same problems, I'll post the solution as soon as I get it working.

opto 01-05-2007 04:09 PM

O.K. now, I have found my problem and everything works fine. Here is what went wrong.

A few weeks ago I had changed my lilo.conf file so my computer would shutdown automatically (instead of having to wait and hit the power button my PC). So my lilo.conf file was this:
image = /boot/vmlinuz
root = /dev/hda2
append="hdc=ide-scsi"
label = Linux
read-only
append="apm=power-off"
# Linux bootable partition config ends


When I ran lilo got a message something like this:
Double append on lines 39 and 42
It didn't say it was an error, it just mentioned that append was mentioned twice.

I rewrote my lilo.conf file to this:

image = /boot/vmlinuz
root = /dev/hda2
label = Linux
read-only
append="apm=power-off hdc=ide-scsi"
# Linux bootable partition config ends


Ran lilo, rebooted, and everything works fine. I hope this is helpful to somebody else in the future

Note: I also changed my permissions on sr0 device, I don't think that this was the problem though because I tried use cdrecord under root, and it still did not work before the change in my lilo.conf file. However, I guess it could've been the combination of the two.


All times are GMT -5. The time now is 03:25 AM.