LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
Search this Thread
Old 11-12-2008, 09:27 PM   #1
channakeshava
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.


Hi,

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.

channa
 
Old 11-12-2008, 09:41 PM   #2
phidor
Member
 
Registered: Apr 2005
Location: Timaru, New Zealand
Distribution: Linux Mint 9
Posts: 103

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
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
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:

Code:
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
ID_VENDOR=SanDisk
ID_MODEL=Cruzer_Mini
ID_REVISION=0.2
ID_SERIAL=SanDisk_Cruzer_Mini_20051535630A02E2F57B-0:0
ID_SERIAL_SHORT=20051535630A02E2F57B
ID_TYPE=disk
ID_INSTANCE=0:0
ID_BUS=usb
ID_PATH=pci-0000:00:1d.7-usb-0:3:1.0-scsi-0:0:0:0
ID_EDD=int13_dev81
ID_FS_USAGE=filesystem
ID_FS_TYPE=vfat
ID_FS_VERSION=FAT16
ID_FS_UUID=3B69-1AFD
ID_FS_UUID_ENC=3B69-1AFD
ID_FS_LABEL=CRUZER128
ID_FS_LABEL_ENC=CRUZER128
ID_FS_LABEL_SAFE=CRUZER128
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
feloniousj
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.
 
  


Reply

Tags
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


All times are GMT -5. The time now is 03:55 AM.

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