Removable Storage II
Summary:
- Parallel Port Devices
ZIP
ORB
~ParPort-ATAPI - USB
- IEEE 1394
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
modprobe
modprobe
modprobe parport
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
imm
You can find out easily which one you need:
- Turn on the drive and insert a disk.
- Type
modprobe imm
modprobe ppa
- Try to mount the drive as 'root':
mount /dev/sd{x}4 -t vfat /mnt/disk
- If
mount
- 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
- Try to mount the drive as 'root':
mount /mnt/zip
- 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
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
pd
modprobe
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
mkdir /mnt/orb
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
parport
'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
pcd
Load the modules with
modprobe {module}
paride
Insert a CD and mount it:
mount /dev/pcda -t auto /mnt/cd
modprobe
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
USB
yes
service usb(d) status
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
modprobe name
- 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.
usbview
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 {start|stop|restart}"
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.
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.
Document data
- Lost account?
- Join the community, be part of the Club: it's free!
- Get the PWP Download Subscription!