PDA

View Full Version : Knoppix hard-disk intall and ZIP drive??



Ish Rattan
05-25-2004, 03:39 PM
System is hard-disk install from Knoppix-3.4

I have a 100Mb ZIP disk-drive in the computer. Is there a way to mount
and use it?

Since lilo.conf line contains hdd=scsi, I thought that

# mount /dev/sda4 /mnt/test

will work but it says
mount: /dev/sda4 is not a valid block device
(I get similar message when trying to mount /dev/hdd4..)

Any ideas?
-ishwar

p.lavarre
05-26-2004, 09:29 PM
Does hdd=ide-scsi work better than hdd=scsi?

Have you tried omitting the hdd option altogether?

Also please post: cat /proc/scsi/scsi

Also please post: uname -r

Ish Rattan
05-27-2004, 02:59 PM
hdd=ide-scsi (instead of hdd=scsi)
and
omitting hdd
have no effect

here is the output of uname -r
2.6.5

and output of cat /proc/scsi/scsi
Attached devices:
Host scsi0 Channel: 00 Id: 00 Lun: 00
Vendor PLEXTOR Model: CD-R PREMIUM Rev: 1.02
Type: CD-ROM ANSI SCSI revision: 02

Host scsi1 Channel: 00 Id:00 Lun:00
Vendor: IOMEGA Model: ZIP 100 Rev: 0.3H
Type: Direct-Access ANSI SCSI revision: ffffffff

-ishwar

p.lavarre
05-27-2004, 04:37 PM
> 2.6.5

Thank you for this necessary context.

> Host scsi1 Channel: 00 Id:00 Lun:00
> Vendor: IOMEGA Model: ZIP 100 Rev: 0.3H
> Type: Direct-Access ANSI SCSI revision: ffffffff

Very good sign. That says your host can read enough bytes from the Zip drive to see that the name of its firmware is "IOMEGA" "ZIP 100" "0.3H" .

The game now is discovering what name your host gave to the device, and then trying to read bytes from an inserted Zip disk.

Myself, I'd next proceed to try to use my own:

http://members.aol.com/plscsi/linux/

I'd ask what is the result of: sudo plscsi -w

Also what is the result of: sudo plscsi /dev/sd[abcd]

However, I am already aware of the proper caution, I quote:

----- http://members.aol.com/plscsi/
...
Learning to use a tool like PLScsi will probably remind you of the need to backup often. If you won't enjoy that lesson, then please don't pick up the tool. Potential side effects include kernel panics, destroyed discs, destroyed devices, and even imperceptibly subtle forms of data corruption. Storage devices differ from modems first by being designed to record your mistakes permanently, and second by defining some commands or sequences of commands to mean self-destruct.

We have not yet heard of anyone hurt by trying `plscsi -w`, which lists all devices to which your O.S. has given one of the well-known SCSI device names. We do recommend first trying `plscsi -w` only while no drives are sleeping, spinning up, or spinning down.
...
-----

Ish Rattan
05-27-2004, 09:14 PM
Downloaded plscsi.tar.gz and tried..

sudo plsci -w output
export PLSCSI=/dev/sg0 // B PLEXTOR CD-R PREMIMUM 1.02
export PLSCSI=/dev/sg1 // @ IOMEGA ZIP 100 03.H

sudo plscsi /dev/sda output
// sgioOpen.Open: No such device or address
// plscsi.sclOpenNext: "/dev/sda" not opened
// -x001 = -1 = plscsi.main exit int

similar output for sudo plscsi /dev/sd[bcd]

Will upgrading to other kernel-vesion work?

-ishwar

p.lavarre
05-27-2004, 09:36 PM
1)

Kernel 2.4 may work better than 2.6, yes. But on the issue of connecting with an ATAPI Iomega Zip drive, I don't yet have any reason to believe a later 2.6 will work better than your 2.6.5.

2)

I see you say plscsi found your drive.

Now you can prove your disk is readable with a command like:

plscsi /dev/sg1 -i x200 -x "28 00 00:00:00:00 00 00:01 00" -t "" | hexdump -C

3)

I wonder if you understand, I meant for you to enter exactly: sudo plscsi /dev/sd[abcd]
That's bash shorthand for saying: sudo plscsi /dev/sda /dev/sdb /dev/sdc /dev/sdd

I think I see you say you can reach your Zip via: sudo plscsi /dev/sg1
but not via: sudo plscsi /dev/sd[abcd]

To my newbie eye, that's strange.

I wonder what you see at: lsmod | grep -i ide

I wonder if a bootline cheatcode that would help is: hdd=ide-cd

Ish Rattan
05-27-2004, 10:59 PM
1)

Kernel 2.4 may work better than 2.6, yes. But on the issue of connecting with an ATAPI Iomega Zip drive, I don't yet have any reason to believe a later 2.6 will work better than your 2.6.5.

-> I see the same behavior inder 2.4.26 kernel

2)

I see you say plscsi found your drive.

Now you can prove your disk is readable with a command like:

plscsi /dev/sg1 -i x200 -x "28 00 00:00:00:00 00 00:01 00" -t "" | hexdump -C

-> The above command produces output
Usage: plscsi

3)

I wonder if you understand, I meant for you to enter exactly: sudo plscsi /dev/sd[abcd]
That's bash shorthand for saying: sudo plscsi /dev/sda /dev/sdb /dev/sdc /dev/sdd

-> I tried the output is same (12 line concatenated to stdout)

I think I see you say you can reach your Zip via: sudo plscsi /dev/sg1
but not via: sudo plscsi /dev/sd[abcd]

-> Correct.

To my newbie eye, that's strange.

I wonder what you see at: lsmod | grep -i ide

-> output of the above command
ide_cd 39680 0
ide_scsi 17688 0

I wonder if a bootline cheatcode that would help is: hdd=ide-cd

-> Makes the entry for IOMEGA ZIP disparrear from plscsi -w output
lsmod | grep -i ide produces
ide_floppy 19840 0
ide_cd 39680 0
ide_scsi 17688 0

The problem does not seem to budge. Either I should pull the zip drive out or
go back to Mandrake distribution (I am trying to switch away from Mandrake)..

-ishwar

p.lavarre
05-27-2004, 11:15 PM
> Either I should pull the zip drive out or
> go back to Mandrake distribution
> (I am trying to switch away from Mandrake)..

As yet myself I use Knoppix only to boot from CD. I haven't yet tried to talk to a PATAPI device other than my DVD/ CD.

> Either I should pull the zip drive out

Me, I like the USB Flash drives sold by Iomega & its competitors.

> The problem does not seem to budge.

I'm too new & ignorant to move directly to the right answer. The people who really know what's going on hang out near:

http://marc.theaimsgroup.com/?l=linux-scsi

> -> Makes the entry for IOMEGA ZIP disparrear from plscsi -w output

`plscsi -w` is a short way of saying: plscsi /dev/sg[0-9]*

Naturally I ask, does knoppix26 hdd=ide-cd make the ZIP entry suddenly appear in the
plscsi /dev/hd[abcd]

> lsmod | grep -i ide produces
> ide_floppy 19840 0
> ide_cd 39680 0
> ide_scsi 17688 0

Trying to make ide-cd and ide-scsi coexist may be difficult. You might want to fight towards having just one or the other. You might try: knoppix26 hdc=ide-cd hdd=ide-cd

Ish Rattan
05-28-2004, 01:16 AM
> Either I should pull the zip drive out or

>> -> Makes the entry for IOMEGA ZIP disparrear from plscsi -w output

>`plscsi -w` is a short way of saying: plscsi /dev/sg[0-9]*

>Naturally I ask, does knoppix26 hdd=ide-cd make the ZIP entry suddenly >appear in the
>plscsi /dev/hd[abcd]

>> lsmod | grep -i ide produces
>> ide_floppy 19840 0
>> ide_cd 39680 0
>> ide_scsi 17688 0

>Trying to make ide-cd and ide-scsi coexist may be difficult. You might >want to fight towards having just one or the other. You might try: >knoppix26 hdc=ide-cd hdd=ide-cd

What happens to cd burning if hdc=ide-cd? Is there a utility that will
burn CDs without ide-scsi emulation??

Thanks for all the effort that you put it.

-ishwar

p.lavarre
05-28-2004, 01:39 AM
> What happens to cd burning if hdc=ide-cd?

Real problem, yes, but a different problem, maybe more solvable than ide-scsi in 2.6.

> Is there a utility that will
> burn CDs without ide-scsi emulation??

ioctl SG_IO mostly works since 2.6 in ide-cd without ide-scsi. Teaching the apps to know that new fact is a work in progress. plscsi -w, for example, as yet doesn't tell you that you can try ioctl SG_IO with /dev/hd[abcd], but though in fact that does work if you try, e.g.: plscsi /dev/hd[abcd]

> Thanks for all the effort that you put it.

Thanks for helping me learn. When you feel you & I have taught each other all we know, you might want to launch a new thread, to encourage someone else to contribute.

I haven't yet heard if boot: knoppix26 hdc=ide-cd hdd=ide-cd
made your PATAPI Zip appear in: plscsi /dev/hd[abcd]

Ish Rattan
05-28-2004, 05:08 PM
>Thanks for helping me learn. When you feel you & I have taught each other all we know, you >might want to launch a new thread, to encourage someone else to contribute.
>
>I haven't yet heard if boot: knoppix26 hdc=ide-cd hdd=ide-cd
>made your PATAPI Zip appear in: plscsi /dev/hd[abcd]

Just before I give up, here is the last 50 lines of /var/log/syslog (with hdc=scsi hdd=scsi and
and attempt at mount /dev/sda4 /mnt/test):
---
May 28 11:51:33 tigaon kernel: SCSI device sda: 196608 512-byte hdwr sectors (101 MB)
May 28 11:51:33 tigaon kernel: sda: Write Protect is off
May 28 11:51:33 tigaon kernel: sda: Mode Sense: 45 00 00 08
May 28 11:51:33 tigaon kernel: SCSI device sda: drive cache: write back
May 28 11:51:33 tigaon kernel: SCSI device sda: 196608 512-byte hdwr sectors (101 MB)
May 28 11:51:33 tigaon kernel: sda: Write Protect is off
May 28 11:51:33 tigaon kernel: sda: Mode Sense: 45 00 00 08
May 28 11:51:33 tigaon kernel: SCSI device sda: drive cache: write back
May 28 11:52:03 tigaon kernel: sda:hdd: DMA interrupt recovery
May 28 11:52:03 tigaon kernel: hdd: lost interrupt
May 28 11:52:03 tigaon kernel: ide-scsi: The scsi wants to send us more data than expected - discarding data
May 28 11:52:03 tigaon kernel: hdd: DMA disabled
May 28 11:52:03 tigaon kernel: hdd: ATAPI reset complete
May 28 11:52:23 tigaon kernel: scsi: Device offlined - not ready after error recovery: host 1 channel 0 id 0 lun 0
May 28 11:52:23 tigaon kernel: SCSI error : <1 0 0 0> return code = 0x6000000
May 28 11:52:23 tigaon kernel: end_request: I/O error, dev sda, sector 0
May 28 11:52:23 tigaon kernel: Buffer I/O error on device sda, logical block 0
May 28 11:52:23 tigaon kernel: scsi1 (0:0): rejecting I/O to offline device
May 28 11:52:23 tigaon kernel: Buffer I/O error on device sda, logical block 0
May 28 11:52:23 tigaon kernel: ldm_validate_partition_table(): Disk read failed.
May 28 11:52:23 tigaon kernel: scsi1 (0:0): rejecting I/O to offline device
May 28 11:52:23 tigaon kernel: Buffer I/O error on device sda, logical block 0
May 28 11:52:23 tigaon kernel: unable to read partition table
---

Does it say anything extra?

-ishwar

p.lavarre
05-28-2004, 11:04 PM
Yes, this is great stuff.

I'm confident, if we dig long enough, we can discover how to patch the kernel to workaround specifically the evil:

kernel: sda: Mode Sense: 45 00 00 08
kernel: SCSI device sda: drive cache: write back
kernel: sda:hdd: DMA interrupt recovery
kernel: hdd: lost interrupt
kernel: ide-scsi: The scsi wants to send us more data than expected - discarding data
kernel: hdd: DMA disabled
kernel: hdd: ATAPI reset complete
kernel: scsi: Device offlined - not ready after error recovery: host 1 channel 0 id 0 lun 0
kernel: SCSI error : <1 0 0 0> return code = 0x6000000

How hard do you want to work?

Are you willing to learn how to substitute an sd_mod.ko you build yourself for what Knoppix delivered to you?

If yes, then ...

Maybe first we should find this "sda: Mode Sense: 45 00 00 08" message in the kernel source.

http://lxr.linux.no/search?v=2.6.5&string=Mode+Sense
suggests:

http://lxr.linux.no/source/drivers/scsi/sd.c?v=2.6.5#L1154
printk(KERN_DEBUG "%s: Mode Sense: %02x %02x %02x %02x\n",
diskname, buffer[0], buffer[1], buffer[2], buffe

Looks like that messages prints after the failure of the third try in sd.sd_read_write_protect_flag i.e. a notoriously incompatible area of linux-scsi.

The linux-scsi source code is consciously written in a style that makes the plain hex difficult to infer. We need to discover how to turn SCSI tracing on, so we can see the CDB, status, etc.