LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   how can I safely unplug an usb device? (https://www.linuxquestions.org/questions/linux-hardware-18/how-can-i-safely-unplug-an-usb-device-273245/)

smau 01-03-2005 06:13 AM

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.

theYinYeti 01-03-2005 06:20 AM

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.

serafimg 03-10-2006 04:06 PM

I use SuSe 9.2 , how can I unmount my USB?

dx0r515t 03-10-2006 04:37 PM

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

serafimg 03-14-2006 03:30 AM

How can I make it executable (chmod +x) ? What is the fstab entry?
I am newbie, please explain...

__spc__ 03-14-2006 06:30 AM

/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.


All times are GMT -5. The time now is 10:23 PM.