Mandriva

Removable Storage II

Summary:

  • Parallel Port Devices
    ZIP
    ORB
    ~ParPort-ATAPI
  • USB
  • IEEE 1394
Section index - KB index

Parallel Port Devices

The parallel port (COM) is another In/Out port on the legacy ISA bus and thus bound to be replaced by either USB or IEEE1394 (aka 'Firewire').

Data transfers via this port are almost as slow as transfers via the floppy controller (around 115KB/s sustained transfer rate). But since every IBM compatible PC has a parallel port, removable storage devices using it are still quite common. You might consider buying an external SCSI device and a supported SCSI to parallel port adapter which will make data transfers on SCSI equipped machines much less painful. Furthermore you will gain another auto-detected boot device, as parallel-port devices as such are not bootable and automatic detection might not work.

If you want to use more than one device on this port, you can do so by loading the

parport
module via '/etc/rc.d/rc.local' with
modprobe
. You just have to make sure that this module is loaded before the device specific modules are loaded (i.e. all their
modprobe
calls are listed below the
modprobe parport
command).
You can save yourself some sweat by having turned all these devices on during installation, Mandrake will then at least detect and configure some of them. If you are adding these devices to an installed system, have them turned on on boot time (with inserted media). Chances are 'kudzu', M's hardware detection mechanism, will detect and configure them then.

These are the devices I know of: the 100MB ZIP, the 250MB ZIP, the 2.2GB external ORB drive, and PP ATAPI CD-R(OM/W) and tape drives.

ZIP

ZIP support in GNU/Linux comes in two flavors: the

ppa
module for older ZIPs and the
imm
module for newer drives (ZIP Plus, newer ZIP 100 and all ZIP 250MB). Both will emulate the drive as a SCSI device (device file '/dev/sd{x}', most likely '/dev/sda').
You can find out easily which one you need:
  • Turn on the drive and insert a disk.
  • Type
    modprobe imm
    or
    modprobe ppa
    . This will load the module if you do not get an error message.
  • Try to mount the drive as 'root':
    mount /dev/sd{x}4 -t vfat /mnt/disk
  • If
    mount
    doesn't complain, you've got it.
Once you've detected the correct module, you can simplify matters by
  • loading the module automatically via '/etc/rc.d/rc.local':
    echo modprobe {module} >> /etc/rc.d/rc.local
  • creating a separate mount directory:
    mkdir /mnt/zip
  • letting 'supermount' do the mounting:
    echo /mnt/zip /mnt/zip supermount fs=auto,dev=/dev/sd{x}4 0 0 >> /etc/fstab
    {x} … has to be replaced by 'a' or 'b' aso.
  • Try to mount the drive as 'root':
    mount /mnt/zip
Note:
  • If your ZIP drive isn't turned on at boot time, the module won't load. If you want to use it later in the same session, you have to load the module manually with
    modprobe {module}
    .
  • The ZIP disk is treated as a SCSI disk i.e. the name of the device file depends on the existence of other SCSI hard disks. If there are no other hard disks which use SCSI, the device file is /dev/sda. If there is one SCSI hard disk, the device file name of the ZIP disk is '/dev/sdb', if there are two other SCSI HDs it is '/dev/sdc' etc.
  • Preformatted ZIP disks have their data on the fourth partition, 'sd{x}4' (Mac compatibility). If you format them with GNU/Linux extfs2, however, they will have their data on the first partition, 'sd{x}1', and you have to adjust the entry in '/etc/fstab' accordingly.
  • You can make a ZIP-printer chain (i.e. a cable from the port to the drive and from the drive to the printer) using the
    parport
    module.
    If either the ZIP or the printer stops working, add this line to '/etc/conf.modules':
options parport_pc io=0x278,0x378 irq=none,7

and reboot (or unload and reload the modules).

ORB

The ORB parallel port drive understands the ~OnSpec 90c26 protocol (aka '~ValuStore'). Required modules are

paride
,
on26
and
pd
, load them with
modprobe
. The device file is '/dev/pda'.
The disks are preformatted as extended FAT16 partitions ('/dev/pda5'). Since this device file isn't included, you will have to create it:

mknod /dev/pda5 b 45 5

Test:

mount /dev/pda5 -t auto /mnt/disk

If everything works fine, put the

modprobe
commands into '/etc/rc.d/rc.local', create a mount directory with
mkdir /mnt/orb
and let 'supermount' do the mounting:

echo /mnt/orb /mnt/orb supermount fs=auto,/dev/pda5 0 0 >> /etc/fstab

Note that the partition number might change to 'pda1' if you reformat the drive with GNU/Linux extfs2.

Parallel Port ATAPI CD-R(OM/W) And Tapes

These drives are handled by the

paride
module (ORB is one of them), a module for the communication protocol and a device-specific so-called high-level driver. Each high-level driver supports up to four devices. If you want to use more than one parallel port device, use the
parport
module.
'paride.txt' in '/usr/src/linux/Documentation' lists supported devices, their protocol modules and device drivers. Once the modules are loaded successfully, you can mount them (or use 'supermount') to access them like any other storage device.

Example:
You have a Freecom CD drive. According to 'paride.txt', the protocol module is

frpw
and the high-level driver
pcd
.
Load the modules with
modprobe {module}
beginning with
paride
(maybe trying to load just the high-level driver will automatically load the other two modules, try it).
Insert a CD and mount it:
mount /dev/pcda -t auto /mnt/cd
. If it works, add the
modprobe
commands to '/etc/rc.d/rc.local' and add a line to '/etc/fstab'.

section index

USB

The Universal Serial Bus is a serial bus for peripherals in the PC world with a transfer rate of max. 1.5MB/s (USB 1.1). USB suffers from some annoying limitations (slow transfer speed, centralized controller) and thus might only be useful with slow peripherals like mice or keyboards.
The USB committee has recently proposed a new version of the USB standard, 2.0, which will at least deal with the speed issue.

Mandrake will upon installation detect and configure most (if not all) USB mice, keyboards, printers and some external USB storage devices like Iomega USB ZIPs (check Linux-USB device overview for currently supported devices).
If you add external USB storage devices later, edit '/etc/sysconfig/usb' and set

STORAGE
(and
USB
if necessary) to
yes
. Make sure the services 'usb' and 'usbd' (in Mandrake 8.0) are installed and running (
service usb(d) status
). You will find that in Mandrake 8.0 'usbd' is 'dead' most of the time. So connect your USB device and run (as 'root')

service usbd start

This should make your newly connected device known to the system.

Mandrake Linux 8.1 no longer uses usbd (for obvious reasons), USB hardware usually will be detected automatically in most cases.

External USB storage devices are handled like SCSI devices, so everything I said about mounting parallel devices above also applies here, i.e. to mount a ZIP disk in a USB connected ZIP drive, you'd most likely use

mount /dev/sda4 -t vfat /mnt/zip

If you are dealing a lot with USB devices, you should consider installing 'usbview' from your Mandrake Linux 8.1 CD (gets installed under Configuration - Hardware). This provides a nice graphical overview on connected USB devices.

Trouble-shooting:

  • Type
    lsmod | grep usb
    and check to see 'usbcore', 'usb-storage' and one of the modules 'usb-uhci' or 'usb-ohci'. If one of these is missing load it by
    modprobe name
    where name has to be replaced with the name of the module. This will load the module if you do not get an error message.
  • hotplug was not running as a default. Given this is needed for recognition of the devices as they are plugged or unplugged. Start the hotplug service and ensure it is set to run at boot.
  • I found mention of some SMP boards requiring that the BIOS be set to MPS 1.1. I found that my Board was defaulting to MPS1.3. Set the Bios configuration to MPS 1.1.
  • Another document referred to some SMP boards requiring a NOAPIC boot in order for the USB to operate properly. Set the boot command to include the 'force NOAPIC' option.
To get a detailed list of your connected usb devices execute:
usbview

section index

IEEE 1394 (aka '~FireWire')

IEEE 1394 is a high-speed serial bus (max. 400MBit/s transfer rate), which uses a more intelligent peer-to-peer architecture. Since '~FireWire' is a licensed trademark by Apple Inc, Linux projects refer to it by its industrial standard name.
Implementation in Linux is labeled 'experimental' but Mandrake Linux releases 8.0 and 8.1 both come with a working 1394 implementation (except for PCMCIA-CS IEEE 1394 drivers on 8.1).
Like USB storage devices, IEEE 1394 devices are accessed via the SCSI subsystem.

To use a device, power it on and load the needed modules (as 'root'):

modprobe ohci1394<br> modprobe sbp2

On Mandrake Linux 8.1, this will automatically create an appropriate entry in '/proc/scsi/scsi' and a device file in '/dev' via which the device can be accessed (e.g. '/dev/scd0' if the connected device is a CD-R(W) drive).
On older releases you might have to manually add the new 'SCSI' device with

echo "scsi add-single-device 0 0 0 0" >/proc/scsi/scsi

(You might want to install and use the 'scsiadd' tool for this. It is supplied with Mandrake Linux 8.1).

Now the important part is to never physically disconnect a 1394 device unless its modules had been unloaded. So before you disconnect or turn off such a device, unload the modules (as 'root'):

modprobe -r sbp2<br> modprobe -r ohci1394<br> modprobe -r ieee1394

You can use this script to make things a bit easier: copy it into a textfile with the name to '1394', put it into '/etc/init.d' and make it executable.

~#~1.1 /bin/bash

case "$1" in

start)

echo "Starting ~FireWire"

/sbin/modprobe ohci1394

/sbin/modprobe sbp2

;;

stop)

echo -n "Stopping ~FireWire..."

/sbin/modprobe -r sbp2

/sbin/modprobe -r ohci1394

/sbin/modprobe -r ieee1394

echo "...you can remove device(s) now"

;;

restart)

echo "Restarting ~FireWire"

/sbin/modprobe -r sbp2

/sbin/modprobe -r ohci1394

/sbin/modprobe -r ieee1394

/sbin/modprobe ohci1394

/sbin/modprobe sbp2

;;

~*)

echo "Usage: $0 &#123;start|stop|restart&#125;"

exit 1

;;

esac

This reduces module handling to two commands (as 'root'):

service 1394 start

to load the modules after connecting the device, and

service 1394 stop

to remove the modules before the device gets disconnected.

Check the list of supported 1394 devices before inadvertently wasting time on an unsupported device.

section index

Related Resources:

'parport.txt' and 'paride.txt' in 'linux/Documentation'
External Parallel Port devices and Linux
Zip Drive Mini-HOWTO (old)
Linux ORB
The Linux USB Project
The Linux 1394 Project

Revision / Modified: Dec. 17, 2001
Author: Tom Berger

Legal: This page is covered by the GNU Free Documentation License. Standard disclaimers of warranty apply. Copyright LSTB and Mandrakesoft.

KB - Removable Storage II
Version 1.12 last modified by evgeny razgulaev on 21/11/2007 at 20:52

 


en

RSS

Creator: AdminWiki on 2004/03/22 09:44
(c) Mandriva 2007
18888888