LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   USB Drives, Icons & Setup (https://www.linuxquestions.org/questions/linux-newbie-8/usb-drives-icons-and-setup-358796/)

GibsonDL 08-31-2005 08:05 AM

USB Drives, Icons & Setup
 
I'm using Mandrake Linux 10.1 on a Compaq Deskpro PC which has two USB ports. I recently plugged in a 64MB 'flashdrive' into the USB port, and was delighted to find that Linux not only found the disk drive automatically, but also mounted the disk and showed it as an icon (both under Gnome and KDE) with the correct name. Files put on the USB drive by Windows 2000 could be read, and I was able to write new files to the drive. When I'd completed this I dismounted the drive using the "umount" command before removing the drive from the USB port, and the drive icon disappeared from the KDE (and Gnome) screen.

My problem arose when I later re-inserted the drive into the USB port. Whilst the drive lights flashed, the icons did not reappear and the device had to be mounted manually. Whilst this is OK, it lacks the convenience of what happened beforehand. How can the original situation be restored such that it happens each time the drive is inserted? How should I remove the memory stick from the USB port - simply pull it out, or is some form of "umount" or equivalent command required (as for Windows) beforehand?

I noticed that the device appears as a SCSI drive. As I already have a SCSI disk 'sda1' on the system, the USB pen drive was seen as 'sdb1'. I don't know if this has any bearing on the problems I'm experiencing.

I subsequently went on to connect a USB-based memory card reader to the same USB port. Under Windows this appears a 4 drives, and under Linux I expected a similar result. However, no drives were detected at all, even though one slot contained a compact-flash card! Are there problems with detecting such devices in Linux? My hope was to be able to archive the JPEG files on the card from my camera onto the hard disk before processing them using the GIMP.

I hope you can cast some light on these problems!

nixcraft 08-31-2005 08:32 AM

SCSI devices such as /dev/sda use to represent USB pen/stick and equivalent partitions are used. So this is normal.

Yup use umount command to unmount it (before that issue sync command):

Code:

sync
umount /dev/sdb1

For more info see USB Flash Memory HOWTO http://www.tldp.org/HOWTO/Flash-Memory-HOWTO/ and small quick howto to mount/umount/format flash memory/pen drive http://www.cyberciti.biz/nixcraft/vi...ash-stick.html


Hope this helps!

GibsonDL 09-02-2005 07:25 AM

Thank you for your response, and the various references which I've now read. I was also not aware of the 'sync' command and will use this in future.

Since my original posting I've noticed that if the pen drive is attached at boot-up, the drive is correctly detected, an icon displayed on KDE (and presumably also GNOME), and /etc/fstab has been updated. If you dismount the device after using it, the icon disappears as you would expect. However, my problem arises if then re-insert the pen drive as the drive icon does not reappear and the mounting has to be done manually. Is there an option in KDE or elsewhere whereby this remounting on replugging can be automatically performed?


All times are GMT -5. The time now is 09:20 PM.