Fedora Linux Support Community & Resources Center
  #1  
Old 30th August 2011, 12:04 PM
SuperSkippy Offline
Registered User
 
Join Date: Jan 2009
Posts: 72
linuxfedorafirefox
"unplugging" and "replugging" a USB device

I've got a server with a USB device which I'm having problems with. I'm not actually near the server and what I'd like is a way of removing the device and plugging it in again virtually using the command line.

Any ideas?
Reply With Quote
  #2  
Old 30th August 2011, 03:42 PM
3xp10r3rX13 Offline
Registered User
 
Join Date: Aug 2011
Posts: 9
linuxfirefox
Re: "unplugging" and "replugging" a USB device

You could just unmount it as any other partition, using the command line...you would have to force it though, because otherwise it would tell you, that the device is busy.

After you've unmounted it, just mount it again.

You do have access to your usb stick, using your pc, don't you?
Reply With Quote
  #3  
Old 30th August 2011, 03:50 PM
SuperSkippy Offline
Registered User
 
Join Date: Jan 2009
Posts: 72
linuxfirefox
Re: "unplugging" and "replugging" a USB device

It's not a USB drive, it's a mobile phone.

I'm more interested in the USB bit.
Reply With Quote
  #4  
Old 30th August 2011, 03:57 PM
3xp10r3rX13 Offline
Registered User
 
Join Date: Aug 2011
Posts: 9
linuxfirefox
Re: "unplugging" and "replugging" a USB device

Quote:
Originally Posted by SuperSkippy View Post
It's not a USB drive, it's a mobile phone.

I'm more interested in the USB bit.
So the server is on a mobile phone???
Reply With Quote
  #5  
Old 30th August 2011, 03:59 PM
SuperSkippy Offline
Registered User
 
Join Date: Jan 2009
Posts: 72
linuxfirefox
Re: "unplugging" and "replugging" a USB device

No the USB device is a mobile phone. It's plugged into a server. I use it to send text messages.
Reply With Quote
  #6  
Old 30th August 2011, 04:00 PM
3xp10r3rX13 Offline
Registered User
 
Join Date: Aug 2011
Posts: 9
linuxfirefox
Re: "unplugging" and "replugging" a USB device

I think I need to understand the wholde situation first:

You are using your mobile phone as an usb device and that's where the server is on?

right, and you are able to access the server?
Reply With Quote
  #7  
Old 30th August 2011, 04:07 PM
SuperSkippy Offline
Registered User
 
Join Date: Jan 2009
Posts: 72
linuxfirefox
Re: "unplugging" and "replugging" a USB device

*Sigh*.

It's one of these:

http://www.ebay.co.uk/itm/UNLOCKED-H...item3a685ac915

(or very similar)

It's plugged into one of these:

http://h10010.www1.hp.com/wwpc/us/en...5-3929672.html

The server is 15 miles away from my house. I am in my house.

But it's not really important what USB device it is. Want I want to know is if there is a way of simulating removing a USB device and plugging it back in remotely without actually having to go to the server.
Reply With Quote
  #8  
Old 30th August 2011, 04:13 PM
3xp10r3rX13 Offline
Registered User
 
Join Date: Aug 2011
Posts: 9
linuxfirefox
Re: "unplugging" and "replugging" a USB device

If you are able to access that server here are the things to do:

first of all you need to kill all the processes accessing your mobile phone. To kill them, you need to know, what processes are running.

open a console and type:
Code:
# lsof | grep /dev/xy
-> if you need to find out the name of your device type:
Code:
# fdisk -l
now it should give you the processes accessing your phone
you can either kill them manually (in the graphical interface)

or just kill them all with a command - to do so, you have to know the directory, where your phone is mounted to:
Code:
# fuser -km  /mount-point
after that, you can unmount it:
Code:
# umount /dev/xy
the device is now unmounted, but still connected to your server (via usb)
so you just mount it again

Code:
# mount -t (xxx) /dev/xy /mount-point
I hope this helped you and that I didn't get anything wrong about the situation

edit: just saw your post - so yes, there is...you just unmount it and mount it again
edit2: if your phone isn't dong anything, you can just unmount it right away...the fuser command might cause date loss, if you cancel out certain processes
edit3: nice server

Last edited by 3xp10r3rX13; 30th August 2011 at 04:17 PM.
Reply With Quote
Reply

Tags
device, replugging, unplugging, usb

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
"ls" and "cd" treat ".." differently inside symlinked directories bnorman Using Fedora 0 19th June 2008 04:49 PM
HOW TO MOUNT "C" "D" "E" LOCAL HARDDISK PARTITION ketan_hk Using Fedora 6 6th September 2007 01:10 AM
Metacity and "Xlib: extension "SHAPE" missing on display ":0.0". debu_sagii Using Fedora 0 29th August 2007 05:53 PM
Fglrx driver install - "direct rendering: No", Xlib: extension "XFree86-DRI" missing Squeaks Hardware & Laptops 9 21st October 2006 12:10 PM
Error:visibility arg must be one of "default", "hidden", "protected" or "internal" wangfeng Using Fedora 0 23rd May 2005 04:59 AM


Current GMT-time: 14:06 (Wednesday, 19-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat