Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-12-2008, 09:27 PM   #1
LQ Newbie
Registered: Nov 2008
Posts: 1

Rep: Reputation: 0
Smile How can i access my pendrive in linux, it is not showing on the desktop.


I have 2GB Pendrive, I am using linux os when i am plug in to the system my pendrive it is not showing, i don't know how to access my pendrive in linux please tell me anyone how to use pendrive in linux.

Old 11-12-2008, 09:41 PM   #2
Registered: Apr 2005
Location: Timaru, New Zealand
Distribution: Manjaro
Posts: 105

Rep: Reputation: 15
It usually helps if you give a bit more detail about what you are doing. Which Linux distribution you are using, for example, is a good start - then somebody will be likely to help you.
Old 11-12-2008, 09:51 PM   #3
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677Reputation: 677
Which distribution, and which desktop environment are you using.

What filesystem does the pendrive use.

If you look at "ls /dev/sd*" before and after inserting the drive you may discover what device the partition is assigned to.
A device node like /dev/sdb is the entire drive (the second one). A device node like /dev/sdb1 is the first partition on the second drive.

You can manually mount the drive, but you need to know the filesystem first. If it wasn't formatted or is corrupt, that could be the problem.

You can get information on a pendrive using the "udevinfo" and "fdisk" programs. Here is an example:

Using "sudo /sbin/fdisk -l" this part is for a pendrive:
Disk /dev/sdc: 256 MB, 256900608 bytes
16 heads, 32 sectors/track, 979 cylinders
Units = cylinders of 512 * 512 = 262144 bytes
Disk identifier: 0x059b7eed

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1         979      250574+   6  FAT16

udevinfo -q env -n /dev/sdc1
The ID_FS_TYPE line indicates that this pendrive uses the fat file system. So to mount it I would use the filetype "vfat".

Since my pendrive auto mounted, lets look at the mount options that were used:
/dev/sdc1 on /media/CRUZER128 type vfat (rw,nosuid,nodev,noatime,flush,uid=1000,utf8,shortname=lower)

So to manually mount the filesystem on the mount point /mnt/cruzer, I would use:
sudo mount -t vfat /dev/sdc1 /mnt/cruzer -o rw,nosuid,nodev,noatime,uid=jschiwal,utf8,shortname=lower

You would use your own username instead after "uid=". Other options to consider are "fmask=0117,dmask=007". This will allow you to read and write files and enter directories. The "noatime" will extend the life of pendrives by not updating the access time when a file is read.


One quick thing to check if you use the grub boot loader is that you don't use the "noacpi" boot option. This will prevent udev, hal and dbus from running. These services are used by KDE and Gnome for automounting to work. Without them you won't see a popup when you insert a disk.
In kde 3.5, you can right-click on the desktop and select "Configure Desktop". Then click on the "Behavior" icon on the left pane. Then click on the "Device Icons" tab above the right hand pane. Make sure that "Mounted Removable Media" and "Unmounted Removable Media" are both selected. Click on OK. Now hopefully you will see an icon for the pendrive, despite the fact that it isn't mounted. Right-click on the icon and select properties. Click on the Mounting tab. Make sure that "Mount automatically" is selected. If the filesystem is vfat, then uncheck "Access time updates" and select "Flushed IO" , "UTF-8 charset" and "Mount as user". Click OK. If the reason it wasn't automounting is because "Mount automatically" wasn't selected, this may fix the problem.

Last edited by jschiwal; 11-15-2008 at 01:51 AM.
Old 11-12-2008, 10:15 PM   #4
LQ Newbie
Registered: Nov 2008
Posts: 12

Rep: Reputation: 1
Manually Mount:

Open a console and either type su to switch to root, or if you have sudo setup type, "sudo dmesg" dmesg will list the dev name assigned to the usb address used by the drive. Just plug in the drive and type "sudo dmesg" or if you are root, just "dmesg". It will be in the last few lines of the log. In your console make a directory to mount the drive too, "mkdir /mnt/pendrive" Then type, "mount -t vfat /dev/sd** /mnt/pendrive" (Where ** is a,b,c,1,2,3 whichever letter and number is assigned.) Now you can open your file browser in whichever window environment you are in and goto /mnt/pendrive and see the files on the drive. The majority of pen drives out there are fat32 file systems which is why you type in the -t vfat option with the given mount command.

Desktop Environment Automount
Verify that the hal daemon is running. very simply open a console and type "ps -ef | grep hald"

If hal is not running or installed this is the reason that you don't see your drive.
If dmseg does not report the drive as being inserted than your drive could be bad.

Excellent apps for testing devices are those such as "lspci" and "lsusb" which will list all devices in your system whether a driver module is loaded or not. part of the pciutils package.


access, cant, linux, pendrive

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Desktop showing the contents of home folder on desktop in fedora 8 khalchian Linux - Newbie 2 08-18-2009 08:45 AM
Extremely slow pendrive upload access 3-4KB/s abhishekp Mandriva 1 05-18-2008 07:06 AM
lunix command to copy backup file from desktop to pendrive sainiurk Linux - Newbie 1 03-25-2008 05:11 AM
Partitions showing up on Desktop der_11 Ubuntu 2 06-09-2007 07:30 AM
How to install and configure grub on pendrive while os' are on the same pendrive? CeremCem DamnSmallLinux 0 11-07-2006 11:10 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:37 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration