After upgrading Ubuntu from 8.04 to 10.04, my Ubuntu did not recognize USB flash disk (UFD) automatically any more, for some unknown reasons.
I had to mount it manually by using mount and umount commands . It’s no big deal to me but my sisters found it as an evidence of non-friendliness of Linux . Finally I came up with this simple script to mount/unmount the USB flash disks:
#!/bin/sh ## mount_unmount_usb.sh (email@example.com) VOLUME_DIR="/media/external" USB_DEVICE="/dev/sdb1" USB_PRESENT=`ls /dev/s* | grep $USB_DEVICE` USB_MOUNTED=`mount | grep $USB_DEVICE` if [ "$USB_PRESENT" != "" ] && [ "$USB_MOUNTED" = "" ] ; then mkdir -p $VOLUME_DIR gksu mount $USB_DEVICE $VOLUME_DIR gksu nautilus $VOLUME_DIR else gksu umount $VOLUME_DIR zenity --notification --text="USB already removed" fi
This script can be left on desktop to run (double click), or you can assign it to the ‘open script’ when an external device is found.
If you are using KDE (KUbuntu) instead of Gnome Desktop, the script might need to be modified slightly, like using kdialog instead of zenity. Your mileage may vary , though :-) .
Pingback: Kubernetes Minikube Windows | DucQuoc's Blog