LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-28-2003, 12:19 AM   #1
hobylinux
Member
 
Registered: Jul 2003
Location: Ohio, USA
Distribution: Mandrake 9.2
Posts: 145

Rep: Reputation: 15
cutting power to usb flash drives


quick question. my flash drive works fine (well, one of them), but i just have one question. when i unmount the drive, the light is still on, which i'm guessing means that the power is still going to it. is it safe to remove like this? is there any way to power it down in linux?

thanks.
 
Old 08-28-2003, 02:47 AM   #2
faheyd
Member
 
Registered: Jun 2003
Location: Northern California (NorCal)
Distribution: Ubuntu 7.04 and DSL/Puppy etc
Posts: 342

Rep: Reputation: 30
Does that light stay on in XP? If so, it might just be a status light meaning it's plugged in. Please go to the hardware vendor site and see if they can give you info on the function of that light and when is it a. on b. off c. blinking , etc.
Or post the vender and make/model and hope someone here has the same thing and can tell you.
 
Old 08-28-2003, 08:16 AM   #3
hobylinux
Member
 
Registered: Jul 2003
Location: Ohio, USA
Distribution: Mandrake 9.2
Posts: 145

Original Poster
Rep: Reputation: 15
its a sandisk cruzer. and no, the light does not stay on in xp. in xp, after clicking the button to safely remove hardware, the light goes off.
 
Old 08-31-2003, 12:35 PM   #4
tozgrec
LQ Newbie
 
Registered: Aug 2003
Location: Jormania
Distribution: Slackware
Posts: 2

Rep: Reputation: 0
this can be done by removing modules

There are 3 kernel-modules wich deals with this:
1) usb-core
2) usb-uhci or usb-ohci (depends on your hardware)
3) usb-storage

so, after unmounting USB device, you should use the following commands (as root)

#modprobe -r usb-storage
#modprobe -r usb-uhci
#modprobe -r usb-core

...and the USB's light will go off. (it works well for my own Xonix usb-storage).

In order to find if your PC uses usb-uhci / usb-ohci, you can ust the following comand, AFTER the mounting of usb device:

# lsmod

(this will show you you all running kernel modules)
 
Old 08-31-2003, 10:22 PM   #5
hobylinux
Member
 
Registered: Jul 2003
Location: Ohio, USA
Distribution: Mandrake 9.2
Posts: 145

Original Poster
Rep: Reputation: 15
hmmmm.....

that doesn't seem to work for me. i put in my sandisk cruzer, mounted it, and used lsmod. it showed usb-storage and usbcore running. i then unmounted the device and ran:

#modprobe -r (module)

for all the usb modules. however, the light didn't go off. then, i tried to remount the device in order to try it again. upon doing that, i was told that /dev/sda1 did not exist. however, i had just mounted the device a few seconds before. any thoughts?
 
Old 08-09-2007, 09:14 PM   #6
gregtrounson
LQ Newbie
 
Registered: Sep 2004
Distribution: RedHat/Fedora/Debian
Posts: 11

Rep: Reputation: 0
Quote:
Originally Posted by tozgrec
There are 3 kernel-modules wich deals with this:
1) usb-core
2) usb-uhci or usb-ohci (depends on your hardware)
3) usb-storage

so, after unmounting USB device, you should use the following commands (as root)

#modprobe -r usb-storage
#modprobe -r usb-uhci
#modprobe -r usb-core

...and the USB's light will go off. (it works well for my own Xonix usb-storage).

In order to find if your PC uses usb-uhci / usb-ohci, you can ust the following comand, AFTER the mounting of usb device:

# lsmod

(this will show you you all running kernel modules)
That's not going to work if you have other USB devices plugged in. I think what he wants is what Windows users see. When a drive is unmounted, power to that port alone is cut and the drives light goes out. A rather sensible safeguard to teach your users if you ask me: "If the little light is on, don't pull it out".
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
USB Flash Drive - can't cut power malone1234 Linux - Hardware 4 08-19-2005 06:32 AM
udev, USB Flash Drives, and usb-mount talkingwires Debian 13 11-07-2004 12:15 PM
How To Power Off USB Flash Disk? wpyh Linux - Hardware 3 06-20-2004 10:35 PM
USB Flash Drives Last Attacker Linux - Hardware 3 06-11-2004 03:36 PM
More trouble with certain usb flash drives... Jeeper Linux - Hardware 2 04-01-2004 12:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration