Help - Search - Members - Calendar
Full Version: Zip-drive Under Le2005
Linuxhelp > Support > Hardware Support
satuser083
I've installed ziptool-1.4.0-2 on LE2005 but cannot mount the device. I've added the following line to /etc/fstat:

/dev/sda4 /mnt/zip100 vfat noauto,user 0 0

but when I try to mount via the Zip-icon I get the error-message

mount: special device /dev/sda4 does not exist

The zip's filesystem is FAT32. A tip would be much appreciated.
Jim
Usually disks are sda4 but not always, trying different numbers, or a different sd, you're probably best off just screwing around with the mount command first, then after you have it figured out put it the fstab file. You can look around in your /dev folder, but some distros have devices there weather they exists or not, so it might not be of any help.
DS2K3
The output of "dmesg" might shed some light on the device name.

D
satuser083
Jim, the drive is an external (parallel) device and there is no sda(n) in /etc, which probably explains the error-message. I've been told that a process (script?) called udev is responsible for creating the device-node; do you know anything about udev and could you hasard a guess as to why it fails to create an sda node?
satuser083
D:
I pasted the output of dmesg into an editor and searched on 'zip' (there was nothing), 'sda' (also nothing) and scsi - the only mention related to the CD-RW/DVD-ROM. Interestingly, I removed the line "/dev/sda4 /mnt/zip100 vfat noauto,user 0 0" from /etc/fstat and, following a restart, the zip-icon had disappeared from the desktop. I then replaced the line, restarted and the zip-icon had reappeared (I then checked dmesg); how on earth does the system know that it has to display the zip-icon just from this line, and yet does not allow the device to be mounted?? Somewhat confused unsure.gif
Jim
zip is the most likely canidate for sda4 so its just guessing that it is a zip.

For future reference, is you ever want to search through a block of text in the terminal there are two good ways to do it.

First is to just run dmsg | grep word that will return any lines from the output of dmsg that contain the word "word"

Second, you can run dmsg | less this will allow you sto scroll through it all, but if you press / and enter the word you want to search it will pull it up in context, you can use n to next through them.

Last, like you said you cat put it into a text file, but did you know how to do it without highlighting and pasting? dmsg > text.txt that will redirect all the output from dmsg into the file text.txt. The file must not exist to do that, if you do >> it will append to the end of an existing file.

Goodluck.
michaelk
Is the zip drive parallel port zip module loading? I do not think it is part of the ziptool package. Check the output of the console command lsmod. Look for imm or ppa (its probably the first). If not then try loading it:
modprobe imm

http://en.tldp.org/HOWTO/ZIP-Drive-4.html#ss4.4

The zip disk filesystem is on the 4th partition and it will have a SCSI device ID but it may not be sda. Check the output of dmesg after you load the module.
satuser083
Thanks Jim, have noted your advice.
I was advised to include the line "ide-scsi" in /etc/modprobe.preload (to enable udev to generate a device-node for the zip-drive). I did so, but this may be wrong (my fault!!) because I forgot to mention that my zip-drive is an EXTERNAL (parallel) device, not an internal (ide) one. Do you, or anyone else, know what the entry in /etc/modprobe.preload SHOULD be for the parallel-zip? Perhaps that would get the mount to work.
satuser083
Thanks, michaelk, tried lsmod and there was no imm nor ppa. Loaded imm with your "modprobe imm", searched the dmesg-output and found "imm: Version 2.05 (for Linux 2.4.0)", no "zip", "scsi" nor "parallel" (don't know how significant that is). Anyway, what do I have to do now to get the zip available after boot, following a manual mount?
Presumeably it's necessary to include the "modprobe imm" (or equivalent) in some boot-file or another? BTW, there is still no "sda(n)" in /etc.
michaelk
You need to load the scsi_mod, scsi_sd and imm modules via the modprobe command. Once they are loaded you should see a device created, It will be /dev/sda only if no other SCSI, USB, SATA or firewire device is connected.
satuser083
michaelk: modprobe csi_mod and imm worked (at least, no error message) but scsi_sd resulted in:
FATAL: Module scsi_sd not found
and no device (obviously?) appeared in /etc. AFAIK all the devices that you mentioned are connected in this machine (a Tosh Satellite Pro 4600) although none (of those strings) is present in the dmesg-output; I wouldn'k know where to start looking for any newly-generated device-node under these circumstances sad.gif
chrisw
Here is probably why you cant mount or access your zip drive:

I use to use a parellel port iomega zip drive.

The problem is withing a kernel source file that needs to be edited
and then the kernel needs to be re-compiled. I had to do this
after each kernel upgrade..

I do not know if this has been fixed or if it will ever be fixed...

I'll see if i can dig up the file that has to be edited
and you can look and see if it was fixed or not to get the
zip drives to work or not...

by the way...the mount point should be /dev/sda4 which
is what i used..the zip drive is seen as a scsi device...
and all you have to do once/if the file i locate is corrected
is load the imm module and then place the "modprobe imm"
which i think is correct in the /etc/rc.d/rc.local file i think...
satuser083
Thanks, chrisw, looking forward to hearing from you smile.gif
chrisw
All of this is based off of Redhat...which was what i was running at the time..

Ok, first you need to be sure the kernel source is installed for your particular
distribution of linux...

Second, do a search for the following file: scsi_error.c

Next, open the file up in a text editor of some type
and search for the following code starting at about line 464:
The last line listed at the bottom of this code snippet is
what needs to be commented out if its there, if the last
line is not there then everything is ok, and all you need to
do is be sure the proper module is loaded for your zip drive
which should be the "imm" module, which will then load some
addition modules for you..

The ==> means this is the line you need to look for..

Hopefully this helps out...

CODE
       /* Last chance to have valid sense data */
       if (!scsi_sense_valid(SCpnt))
               memcpy((void *) SCpnt->sense_buffer,
                      SCpnt->request_buffer,
                      sizeof(SCpnt->sense_buffer));

       if (scsi_result != &scsi_result0[0] && scsi_result != NULL)
               kfree(scsi_result);

       /*
        * When we eventually call scsi_finish, we really wish to complete
        * the original request, so let's restore the original data. (DB)
        */
       memcpy((void *) SCpnt->cmnd, (void *) SCpnt->data_cmnd,
              sizeof(SCpnt->data_cmnd));
       SCpnt->result = saved_result;
       SCpnt->request_buffer = SCpnt->buffer;
       SCpnt->request_bufflen = SCpnt->bufflen;
       SCpnt->use_sg = SCpnt->old_use_sg;
       SCpnt->cmd_len = SCpnt->old_cmd_len;
       SCpnt->sc_data_direction = SCpnt->sc_old_data_direction;
       SCpnt->underflow = SCpnt->old_underflow;
==>     memset(SCpnt->sense_buffer, 0, sizeof(SCpnt->sense_buffer));
michaelk
My fault.. it should be sd_mod not scsi_sd.
satuser083
michaelk: thanks for the info, I tried the complete sequence, with - strangely, because modprobe csi_mod worked last time - the following result:

[root@sthelens ~]# modprobe csi_mod
FATAL: Module csi_mod not found.
[root@sthelens ~]# modprobe sd_mod
[root@sthelens ~]# modprobe imm

I then checked /etc; sure enough, device-node sda4 had been inserted. However, when I tried to mount the zip, the system reacted with:

[root@sthelens ~]# mount -t vfat /dev/sda4 /mnt/zip100
mount: /dev/sda4 is not a valid block device

Nevertheless, we seem to be making some progress; thanks again smile.gif
michaelk
Yor forgot the s i.e. scsi_mod
chrisw
QUOTE
michaelk: thanks for the info, I tried the complete sequence, with - strangely, because modprobe csi_mod worked last time - the following result:

[root@sthelens ~]# modprobe csi_mod
FATAL: Module csi_mod not found.
[root@sthelens ~]# modprobe sd_mod
[root@sthelens ~]# modprobe imm

I then checked /etc; sure enough, device-node sda4 had been inserted. However, when I tried to mount the zip, the system reacted with:

[root@sthelens ~]# mount -t vfat /dev/sda4 /mnt/zip100
mount: /dev/sda4 is not a valid block device

Nevertheless, we seem to be making some progress; thanks again


You should just need to "modprobe imm" and it will automatically
install a few other modules for you...


QUOTE
[root@sthelens ~]# mount -t vfat /dev/sda4 /mnt/zip100
mount: /dev/sda4 is not a valid block device


The above result is an error in part of the post i mentioned
above more than likely.....

follow through with what i posted in my earlier post above and this will tell if a kernel
recompile is necessary or something else is the problem....
more likely its possibley a scsi_error.c file issue and that the line
mentioned needs to be commented out...because it fixes the
"/dev/sda4 is not a valid block device" error you are having

if the line in scsi_error.c is there and not commented out...
you WILL NOT be able to mount your zip drive properly
satuser083
michaelk: this is turning into a saga. I corrected the line, ran the sequence and... no error-message(s) but also no /etc/sda4. Very strange. Rebooted the system, just ran the second two (as the previous time), still no /etc/sda4. Rebooted, ran all three lines and still no /etc/sda4. Don't know what's going on here. unsure.gif

And, chrisw, there is no file "scsi_error.c" in my installation. I assume that is because the kernel-source is not installed. However, on the DVD there is a whole raft of kernel packages (which makes a selection somewhat difficult), and the one which I thought was the correct one cannot be installed because I get a "bad signatures" message. mad.gif
chrisw
yes you have to make sure you install the kernel-source package

do a rpm -q kernel to retrieve the kernel version: for example:

rpm -q kernel-2.4.12 <--- kernel version used for example purpose only

then on your cd find the kernel-source package that matches
the kernel version you have on your system....

that will install the kernel-source files which will include the scsi_error.c file
that you need to view and edit if possible....


if you cant get it to install from the dvd....try the update manager that
comes with your linux distro to install the kernel-source package....
for example...redhat uses up2date.

that might be the easiest way because it may install a few packages
that are necessary for kernel compilation....
michaelk
Devices are under the /dev and not /etc (or maybe just a typo?) directory i.e /dev/sda
Check the output of the console command dmesg after loading the modules. Are there any messages pertaining to the zip drive? Make sure the Zip drive is powered on prior to loading the imm module.

I've only used SCSI zip drives. I've seen the hreads on the error in the 2.4.20-13.9 kernel but have not a clue if it was ever fixed in the 2.6 kernel.
satuser083
chrisw: thanks. I'm just finding out which ones on the DVD to use; will be back.
satuser083
michaelk: yes, you were right with the typo. Thanks. Following module installation there is no /dev/sda(n) and no references to the zip in the dmesg-output; the zip is always powered up. It's just a bit strange that I managed to get it to work once - read files, deleted some, etc - but can't remember exactly how. unsure.gif
chrisw
What model ext zip drive are you using? an iomega?
satuser083
Yes, it's an Iomega, a Z100P2, with an ident FCC IO DDXZ100P2.
chrisw
what system are you running your linux on?

i looked up "Z100P2" on iomega.com and it
mentions that that model is for a mac.

Is that correct?
satuser083
The Z100P2 may also be suitable for a mac, but this device (i've had it at least 10 years) has worked perfectly on a number of PC's under Win95, Win98 and Win 2000 Pro, so I don't think that this is an issue. The current system is LE2005, running on a Tosh Satellite Pro 4600 laptop.

BTW, I've managed to install the source package and found the scsi_error.c file; however, the code snippet that you mentioned is not there. The following is the same logical section, I believe, because "kfree(scsi_result)" only occurs once in the entire script. However, I've been unable to find "scsi_setup_cmd_retry()", at least it is not defined within the same script, so I don't know whether the line that you mentioned (i.e. "memset(SCpnt->sense_buffer, 0, sizeof(SCpnt->sense_buffer))") is present there or not.

kfree(scsi_result);

/*
* when we eventually call scsi_finish, we really wish to complete
* the original request, so let's restore the original data. (db)
*/
scsi_setup_cmd_retry(scmd);
scmd->result = saved_result;
return rtn;
chrisw
have you tried another disk?

is that line that i told you to look for anywhere in the scsi_error.c file?

If it is not then you should be ok with that issue...

Beyond editing that file and just loading the imm modules,
I have not had any other type of issues with my zip drive

Have you tried loading the ppa module? instead of the imm module
satuser083
michaelk and chrisw: I hardly know whether or not to celebrate just yet, but it's quite possible that, between the two of you, the problem has been solved . I combined your inputs, as shown below, and I can now mount the zip. And after a reboot (and, of course, the three commands) it still worked. smile.gif

modprobe scsi_mod
modprobe sd_mod
modprobe ppa

But now I have another request. Issuing the commands is no problem for ME, but my wife (also on LE2005) would be most unhappy at having to do so. Ideally I'd like an entry (entries?) in some boot-file or another (like fstat.conf for my pcmcia-hdd) which does what these lines do; alternatively I could write a script, but this would presumeably mean knowing the root-password, which would complicate things. Could either of you assist me here?

Once again, many thanks.tongue.gif
chrisw
is there an rc.local file ?
you can put modprobe commands in there
assuming that le2005 which i looked up and it
was mandriva...which is formally known as mandrake-linux..
thus which they forked from redhat....
that there should be a /etc/rc.d/rc.local file somewhere

put those commands there and you should be good to go
satuser083
Yes, you're correct, LE2005 is from Mandriva (but I didn't know that it was a Redhat derivative; interesting!!), and there IS a /etc/rc.d/rc.local file, into which I put the commands, and, of course, following reboot it worked. Many thanks. smile.gif
Now, I still have one small (?) problem. If there is no disk in the drive during boot, it is not possible to mount the drive AFTER inserting a disk into it. And running the 3 commands in a root-konsole has no effect. Is there any way around this situation, which I can imagine happening regularly?
chrisw
what is the listed in your rc.local file?
satuser083
The contents of /etc/rc.d/rc.local are (the touch command was there before I added the other lines):

touch /var/lock/subsys/local
modprobe scsi_mod
modprobe sd_mod
modprobe ppa
michaelk
QUOTE
dev/sda4 /mnt/zip100 vfat noauto,user 0 0

I assume this is still correct.

The disk is not mounted due to the noauto option so not having a disk in the drive durng boot should not have an affect. What are the error messages if any? Are you unmounting the drive prior to removing the disk. With other zip drives the the disk is locked until it is unmounted.
chrisw
i dont think you can eject the zip disk when its mounted..because i couldnt when i was using
mine....it shouldnt mount if there is not a tape in drive at boot up.....

a possibility is to maybe copy the options in the fstab file that is used for the cdrom
because it automounts when you place a cd in the drive....

try that....i havent tried that option so im not exactlly sure it will work....
satuser083
michaelk: yes, that is the line in /etc/fstab. Also, the drive IS locked prior to an unmount.

Following a boot WITH a disk in (but subsequently removed), an attempt to mount the drive results in:

Called: mount /dev/sda4
mount: No medium found

but when a disk has been inserted a further mount is successful.

Following a boot WITHOUT a disk in, an attempt to mount the drive (with or without a disk in) results in:

Called: mount /dev/sda4
mount: special device /dev/sda4 does not exist

In the latter case, there is an entry /dev/sda (NOT sda4) but an attempt to manually mount the drive results in:

[root@sthelens ~]# mount /dev/sda -t vfat /mnt/zip100
mount: wrong fs type, bad option, bad superblock on /dev/sda,
or too many mounted file systems
chrisw
you cant mount on sda

the proper mount entry to use is sda4
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.