|
|||||||
|
|
10. Making the memory stick accessible to usersWhat we have described so far, are simply the procedures of setting up the system and formatting memory sticks. We have to make the mounting of the USB filesystem more permanent, and we have to make mounting of such a device easier for non-root users. There are only a few things to be done. The procedure described below is for the more complex situation of a memory stick with a dual partition (Section 9). If the partition is a single ext2, the procedure should be simplified by leaving out the line referring to the vfat part and changing sda2 to sda1. Suppose that the mount points /mnt/memstick and /mnt/fatstick have been created. You do not have to use those words and they don't even have to be sub-directories of /mnt To make remembering easier, create the following symbolic links:
For smoother and easier mounting add the following lines to /etc/fstab : ( See NOTE at the end of Section 7.3 )
The middle line enables mounting either in ext2 or vfat. The last two lines make it possible for any user to mount the device by the command
It is possible to mount both partitions simultaneously. See Section 9. In the case of an ext2-formatted device it does not seem possible for a user (other than root) to mount in read-write mode. The solution is to create a directory on the memory stick owned by the particular user with complete permissions. Root should do that:
If the device is in the vfat format, this step is unnecessary. In conclusion, here is a small script I use to mount and unmount my (ext2) flash drive:
I call this from an FVWM menu by Exec exec xterm -geometry 43x2+1250+0 -e /home/nikos/bin/flashdrive which places it on a tiny x-term in one corner of the screen. The horizontal displacement of 1250 may have to be modified according to the horizontal resolution of your screen. | ||||||
|
|
|
Home :: Copyright :: Privacy :: Credits :: Get a free Linuxinfor Email Account Document on this page is part of "USB Flash Memory HOWTO". See Index Page for more info about Authorship and Copyright. 1999-2008 Linuxinfor.com. No rights reserved. |