LinuxQuestions.org
Help answer threads with 0 replies.
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 01-03-2005, 07:13 AM   #1
smau
LQ Newbie
 
Registered: Mar 2004
Posts: 10

Rep: Reputation: 0
how can I safely unplug an usb device?


Hi,
coul you tell me how can I safely unplug an usb device?
I know that under windows there is a particular feature that you can run and after that you can safely unplud the usb device. Is there something similar under linux? (I'm using Fedora Core 3)
Thanks, Smau.
 
Old 01-03-2005, 07:20 AM   #2
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 63
The safest way to use USB devices is to NOT use supermount (or similar), and rather mount it when it will be used, and unmount it after use. When unmounted, a USB device can safely be unplugged.

Yves.
 
Old 03-10-2006, 05:06 PM   #3
serafimg
Member
 
Registered: Jan 2006
Distribution: Ubuntu 10.10 64-bit
Posts: 60

Rep: Reputation: 16
I use SuSe 9.2 , how can I unmount my USB?
 
Old 03-10-2006, 05:37 PM   #4
dx0r515t
Member
 
Registered: Jan 2005
Location: USA
Distribution: Slackware 10.2 & 11.0
Posts: 155

Rep: Reputation: 30
Quote:
Originally Posted by serafimg
I use SuSe 9.2 , how can I unmount my USB?
I wrote two simple bash scripts to mount and unmount a usb flash drive. Here is my mount script (called mount.sh)

Code:
#!/bin/bash
#Must be root to run this script
mount /mnt/usbstick
echo "mounted on /mnt/usbstick"
exit
Here is the simple script I use to un-mount my flash drive (called umount.sh)

Code:
#!/bin/bash
#unmounting a usb thumb drive, must be root
umount /mnt/usbstick
echo "unmounted."
exit
To run those scripts just copy and paste the script and save it as a .sh file. Once you have it saved don't forget to make it executable (chmod +x). Then you can run the script with ./(name of script) assuming the script is in your present directory.

Here is my fstab entry for /mnt/usbstick:

Code:
/dev/sda1        /mnt/usbstick    vfat       user,noauto,umask=0 0 0
 
Old 03-14-2006, 04:30 AM   #5
serafimg
Member
 
Registered: Jan 2006
Distribution: Ubuntu 10.10 64-bit
Posts: 60

Rep: Reputation: 16
How can I make it executable (chmod +x) ? What is the fstab entry?
I am newbie, please explain...
 
Old 03-14-2006, 07:30 AM   #6
__spc__
Member
 
Registered: Feb 2006
Location: Bridgend, Wales
Distribution: Kubuntu 10.04.25 (Feb 2011)
Posts: 172

Rep: Reputation: 30
/etc/fstab lists the devices to be mounted at boot time, where to mount them, the file system to be used, and other various parameters.

/etc/mtab provides the output of what was ACTUALLY mounted at boot.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 keyboard not detected until I unplug it ??? glenn69 Linux - Hardware 0 11-08-2005 12:13 PM
Why do I have to unplug my USB adapter to get it to work? JakeMH Linux - Wireless Networking 2 05-17-2005 05:25 PM
USB plug & unplug JrLz Slackware 6 12-09-2004 09:07 AM
USB mouse works only if i unplug then re-plug it allelopath Linux - Hardware 3 11-20-2004 01:48 PM
USB hot unplug ( hotplugctl ) earcam Linux - Hardware 0 08-14-2004 02:39 AM

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

All times are GMT -5. The time now is 05:36 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration