📚 LinuxDocs
Topics:
All Pages8021X HOWTOACP ModemACPI HOWTOADSL Bandwidth Man..ATA RAID HOWTOATM Linux HOWTOAX25 HOWTOAccessibility Dev ..Accessibility HOWTOAdv Bash Scr HOWTOAdv Routing HOWTOAntares RAID sparc..Apache Compile HOWTOApache WebDAV LDAP..Assembly HOWTOAstronomy HOWTOAthlon Powersaving..Authentication Gat..Autodir HOWTOAviation HOWTOAvr Microcontrolle..BRIDGE STP HOWTOBTTVBackspaceDeleteBandwidth Limiting..Bangla HOWTOBash Prompt HOWTOBattery PoweredBelarusian HOWTOBelgian HOWTOBeowulf HOWTOBocaBogoMipsBootdisk HOWTOBridgeC++ dlopenC C++Beautifier HO..C editing with VIM..CDROM HOWTOCDServer HOWTOCable ModemCaudium HOWTOClone HOWTOCompaq Remote Insi..Compaq T1500 HOWTOConexant+Rockwell ..Cryptoloop HOWTODB2 HOWTODHCPDSL HOWTODVD Playback HOWTODebian Binary Pack..Debian JigdoDebian and Windows..Disk Encryption HO..Disk on Chip HOWTODocBook Demystific..DocBook InstallDocBook OpenJade S..Ecology HOWTOEmacspeak HOWTOEncourage Women Li..Encrypted Root Fil..Euro Char SupportEvent HOWTOFedora Multimedia ..Finnish HOWTOFirewall PiercingFlash Memory HOWTOFont HOWTOFramebuffer HOWTOGCC HOWTOGIS GRASSGlibc Install HOWTOHOWTO HOWTOHOWTO INDEXHP HOWTOHandspring VisorHard Disk UpgradeHardware HOWTOHighQuality Apps H..Home Electrical Co..IBM7248 HOWTOIO Perf HOWTOIP AliasIP Masquerade HOWTOIRCImplement Sys Call..Indic Fonts HOWTOInfrared HOWTOIngresII HOWTOInstall StrategiesInstallation HOWTOInstallfest HOWTOIntkeybItalian HOWTOJabber Server Farm..JavaStation HOWTOKerberos Infrastru..Kernel HOWTOKerneldKodak Digitalcam H..LDAP HOWTOLDP Reviewer HOWTOLILO crash rescue ..LVM HOWTOLeased LineLegoLinksys Blue Box R..Linux+Win95Linux+Win9x+Grub H..Linux+Windows HOWTOLinux Complete Bac..Linux Crash HOWTOLinux Gamers HOWTOLinux Modem SharingLinux Promise RAID..Linux i386 Boot Co..LinuxGL QuakeWorld..Lotus DominoR5MILO HOWTOMMBase Inst HOWTOMP3 CD BurningMail User HOWTOMajordomo MajorCoo..Man PageMasquerading Simpl..Medicine HOWTOMindTerm SSH HOWTOMobile IPv6 HOWTOMock MainframeModule HOWTOModulesMotorola Surfboard..Mozilla OptimizationMulti Distro DevNCURSES Programmin..NFS HOWTONFS Root Client mi..NIS HOWTONetMeeting HOWTONetwork boot HOWTONvidia OpenGL Conf..OLSR IPv6 HOWTOOnline Troubleshoo..Oracle 9i Fedora 3..PA RISC Linux Boot..PCTel MicroModem C..PHP Nuke HOWTOPPP HOWTOPagerPalmOS HOWTOPartitionPartition Mass Sto..Partition Mass Sto..Partition RescuePine ExchangePortSlavePost Installation ..Postfix Cyrus Web ..Pre Installation C..Print2WinPrinting HOWTOProcess AccountingProgram Library HO..Proxy ARP SubnetQmail ClamAV HOWTOQmail VMailMgr Cou..Querying libiptc H..RPM HOWTOReading List HOWTORedHat CD HOWTOReliance HOWTORemote BridgingRemote Serial Cons..SCSI 2.4 HOWTOSCSI Generic HOWTOSLIP PPP EmulatorSRM HOWTOSSL Certificates H..Scanner HOWTOScientific Computi..Scripting GUI TclTkSecure CVS PserverSecure Programs HO..Security HOWTOSecurity Quickstar..Security Quickstar..Serial Laplink HOWTOSerial Programming..Slovak HOWTOSmall MemorySmart Card HOWTOSoftware Proj Mgmt..Software Release P..Sound HOWTOSpam Filtering for..Speech Recognition..SquashFS HOWTOSybase ASA HOWTOSybase ASE HOWTOSybase PHP ApacheTCP Keepalive HOWTOTamil Linux HOWTOTimePrecision HOWTOTimeSys Linux Inst..Token RingTraffic Control HO..Traffic Control tc..UPS HOWTOUnix Hardware Buye..Unix and Internet ..UpgradeUsenet News HOWTOUser Authenticatio..VB6 to TclVMS to Linux HOWTOVPN HOWTOValgrind HOWTOVideoLAN HOWTOVim HOWTOVirtual WebWebcam HOWTOWikiText HOWTOWindows Newsreader..Wireless Link sys ..Wireless Sync HOWTOXDM XtermXDMCP HOWTOXFree Local multi ..XFree86 HOWTOXFree86 R200XFree86 Second MouseXFree86 Video Timi..XML RPC HOWTOXWindow Overview H..XWindow User HOWTOXinerama HOWTOXterminalsHtml singleI810 HOWTOLibdc1394 HOWTOOpenMosix HOWTOPhhttpd HOWTOPpp sshText

10. Making the memory stick accessible to users

What 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 .:: cl.enrollbusiness.com ::. /mnt

To make remembering easier, create the following symbolic links: [r/ReactNative Topics]

 
             # ln -s /dev/sda1 /dev/fatflash
             # ln -s /dev/sda2 /dev/flash 
   

For smoother and easier mounting add the following lines to [Code: Redis] /etc/fstab : ( See NOTE at the end of Section 7.3 )

             none          /proc/bus/usb usbfs       defaults       0 0 
             /dev/flash    /mnt/memstick ext2,vfat   rw,user,noauto 0 0 
             /dev/fatflash /mnt/fatstick vfat        rw,user,noauto 0 0 
   

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

             $ mount /dev/flash  [for ext2 or vfat] 
             $ mount /dev/fatflash  [for vfat] 
   

It is possible to mount both partitions simultaneously. See .:: www.link-man.org ::. .:: www.africangenesis-101.org ::. 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:

             # mount /dev/flash 
             # mkdir -m 777 /mnt/memstick/superdir 
             # chown charles:charles /mnt/memstick/superdir 
   

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:

             #!/bin/bash 
             EXCODE="keepit" 
             green='\033[0;32m' 
             yellow='\033[0;33m' 
             ## ___________________________ 
             ## Function to echo in colours 
             echo_in_color () 
             { 
                  message=$2 
                  message1=$4 
                  color=$1 
                  color1=$3 
                  echo -e -n $color 
		      echo -n $message 
                  echo -e -n $color1 " " 
                  echo  -n $message1 " " 
                  tput sgr0 
                  return 
             } 
             ## ___________________________ 
             clear 
             mount /dev/flash 
             echo_in_color $green "Flash drive mounted" 
             sleep 2 
             while [ $EXCODE != "flexit" ] 
                  do 
                     clear 
                     echo_in_color $yellow "Enter [flexit] to unmount and exit:" 
                     read EXCODE 
                  done 
             umount /dev/flash 
             exit 
   

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. .:: jalalive5com.federatedjournals.com ::.

Share or Research:

Share on FB Post to X LinkedIn 🤖 Ask AI about this