![]() |
Allcam - World of Portables is external data storage & portable data storage specialist, every type of data storage for your office and personal use |
USB 2.0 Drive HOWTO for Linux
By George Reynolds on Jan 04, 2004
© 2004 George Reynolds / Allcam Mobile Products Limited, feel free to copy and publish on your website, but do keep content intact including copy right info and hyper links.
|
This guide applies to USB / USB 2.0 storage devices including portable hard drives and external hard drives.
These instructions are based on SUSE Linux 9.0 with KDE 3.1 Any other Linux versions may require slightly different configurations (see trouble shooting). |
Related topics
|
Step 1
Start KDE
Plug your drive into the USB port
Step 2
An icon like this should pop up on your desktop (possibly with a different sd letter):
sde1
You need to right click on it, and select mount. If successful, it should look like this:
sde1You can then click on the icon to view your files, just like any other linux folder.
Step 3
Thats' it!
Before UNPLUGGING, make sure you right click and select 'unmount' and the icon should loose the little green arrow. (Similar to the unplug function in Windows, I think)
If you have SUSE Linux 9.0 you will see a little green PCI card in your task bar. If you double click on this, goto Drives, then to your USB drive and click 'eject' (it will ask you for root password) you can eject the drive this way. This is much safer than umounting alone.
Troubleshooting
AFTER trying the steps below, email usbdrive@dodgybloke.co.uk with the following:
1)output of /var/log/messages (su to root, type 'tail -f /var/log/messages' without the quotes, then copy and paste the output when you plug and remove the drive)
2)output of 'lsmod' (su to root, type 'lsmod', copy and paste output to email)
3)your distribution, kernel (type uname -a) and window manager and version.
4)your /etc/fstab file (see below)
5)any other information you think is relevant.
I have tried to include everything you need as a beginner, but if you do not understand things like 'shell' or 'vi' or the concepts of 'fstab' and '/var/log/messages'please read the relevant manuals/docs first!
When you plug your drive in, the following should happen automatically:
1) Output from /var/log/messages
You should get something like this:
Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: IC25N040 Model: ATCS04-0 Rev: 0811
Type: Direct-Access ANSI SCSI revision: 02
with an accompanying SCSI drive letter e.g. 'sde'
If you don't get something like this, please follow the guide below.
2) Check your /etc/fstab (type vi /etc/fstab)
This bit isn't important for us:
dev/hdc6 / reiserfs defaults 1 1
(more stuff here)
/dev/cdrecorder /media/cdrecorder auto ro,noauto,user,exec 0 0
This is what is important:
/dev/sde1 /media/sde1 auto sync,noauto,user,exec 0 0 #HOTPLUG B3Fu.65vJnGtOb_E
/dev/sde2 /media/sde2 auto sync,noauto,user,exec 0 0 #HOTPLUG B3Fu.65vJnGtOb_E
/dev/sde3 /media/sde3 auto sync,noauto,user,exec 0 0 #HOTPLUG B3Fu.65vJnGtOb_E
In this example. I have three partitions on my USB drive (the three entries you see here).
They are written by the usb hotplug system, I didn't have to enter them manually. If you don't have anything like this (the drives could be sda, sdb, sdc etc etc) then you need to check the things below
Troubleshooting Steps
1) Make sure the drive is powered up- you should be able to hear it whirring and the light should be on.
If it isn't then check you are not trying to power it off a laptop USB port (doesn't always work) or a non-powered hub. (It probably woudn't work in windows if this is the problem)
2)If you have an entry in /etc/fstab but no icon on your desktop try:
>mount /media/sde1 (where sde1 is the entry in the /etc/fstab)
>cd /media/sde1
>ls
.....and you should see your files. You can then create a desktop icon (see 4)
3)If you have no /etc/fstab entry and no icon but you do have a positive /var/log/messages output , try this:
>mkdir /mnt/usbdrive
Then add the following to /etc/fstab (as root; replacing the drive letter for yours; You NEED to add the 1)
/dev/sde1 /mnt/usbdrive auto user,noauto 0 0
Then try 2
4) You can create a desktop shortcut yourself. Right click on desktop->create new->hard disc and under the device tag use the dev entry you created in /etc/fstab (in my example /dev/sde1)
* Copyright notes: You may publish this guide in your website or in printed form, but do keep content intact including hyperlinks and copyright notes