Differences between revisions 15 and 16
Revision 15 as of 2008-02-19 07:45:17
Size: 3961
Editor: FranklinPiat
Comment: some cleanup
Revision 16 as of 2009-03-16 03:33:06
Size: 3963
Editor: anonymous
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
["Hardware"] > ["USB"] [[Hardware]] > [[USB]]
Line 33: Line 33:
1)output of /var/log/messages ([http://manpages.debian.net/man/1/su 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) 1)output of /var/log/messages ([[http://manpages.debian.net/man/1/su|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)
Line 39: Line 39:
4)your /etc/["fstab"] file. 4)your /etc/[[fstab]] file.

Hardware > USB


USB 2.0 Drive HOWTO for Debian Linux

This guide applies to USB / USB 2.0 storage devices including portable hard drives and external hard drives.

Step 1

Start your DesktopEnvironment.

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:

    sde1 

You 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'.

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

3)your Debian version (cat /etc/debian_version), kernel version (type uname -a) and window manager (DesktopEnvironment) and version.

4)your /etc/fstab file.

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 ?DesktopIcon.

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)