This is an old revision of the document!
These instructions show how to configure your Eee to silently mount different SD cards and USB thumb drives in the location of your choice. They'll be mounted at startup if their already inserted or mounted when you insert them, but without the GUI detection dialog. The GUI will still show for any device you haven't specifically configured.
For example, you could have one SD card full of games that automatically mounts itself under /home/user/games and another used for photos that automatically mounts under /home/user/photos.
You can then swap between the cards as needed, however you need to unmount them manually from the command line before removing them to avoid corrupting your data. There will also be no tray icon for inserted and mounted devices.
The following instructions can be repeated any number of times to configure different devices to be mounted in different locations
/proc/bus/usb/devices into a real file in your home directorycat /proc/bus/usb/devices > /home/user/usb_devices.txt
/home/user/usb_devices.txt in an editorkwrite /home/user/usb_devices.txt &
I: line ends with Driver=usb-storage, a few lines above you will find the serial number of the card reader. Some devices will also have a product name you might recognise. It is this name that prevents some of them mount properly, preventing you to access them. Look for a line with Product=USB DISK 2.0 (note this is just an example, and your name may be different or not there at all).T: Bus=05 Lev=01 Prnt=01 Port=04 Cnt=02 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=0cf2 ProdID=6225 Rev= 1.00 S: Manufacturer=ENE S: Product=UB6225 S: SerialNumber=146030377350 C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=498mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
Note: You could also run this command from the terminal prompt:
grep -A 1 Product /proc/bus/usb/devices
This will show just the “Product” and “SerialNumber” lines of the above process.
/etc/udev/rules.d/50-xandros-udev.rules. You need to be root to do it:sudo kwrite /etc/udev/rules.d/50-xandros-udev.rules &
# usb, removable storage
sdcard1 (in both places)BUS=="usb", KERNEL=="sd*", SYSFS{serial}=="146030377350", NAME="sdcard1", OPTIONS+="last_rule", RUN+="/bin/mount /dev/sdcard1"
sdcard1 if required.mkdir /path/to/mount/point
eg:
mkdir /home/user/games
/etc/fstab. This, too, has to be done as root, so do:sudo kwrite /etc/fstab &
/dev/sdcard1 /home/user/games vfat rw,uid=user
/etc/mtab while the device is still plugged in and mounted (it will be if you didn't remove it since you started this procedure).sudo cat /etc/mtab
sudo umount /path/to/mount/point
then physically remove.
sync command beforehand as well (this should flush any delayed writes to all disks). I suggest creating a desktop icon that runs it.For instructions on how to set up an automatic umount see http://wiki.eeeuser.com/howto:properumountstorage [