Debian This forum is for the discussion of Debian Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-06-2005, 12:51 AM
|
#1
|
Member
Registered: Oct 2005
Posts: 67
Rep:
|
How to mount a USB flash drive?
I got a 64MB Lexar USB flash drive. I want to mount it on my pc. I use Debian 3.1 with 2.4 kernel.
When I look in /etc/fstab I get:
--------------------
# /etc/fstab: static file system information.
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hdb3 / reiserfs notail 0 1
/dev/hdd /media/cdrom0 iso9660 ro,user,noauto 0 0
/dev/hdc /media/cdrom1 iso9660 ro,user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
----------------------
|
|
|
11-06-2005, 01:10 AM
|
#2
|
Member
Registered: Feb 2004
Location: Washington, USA
Distribution: Debian
Posts: 265
Rep:
|
Use the command dmesg | more and verify that your system "sees" it. They usually show up as /dev/sda so you might look for a reference to Lexar and /dev/sda paired up in dmesg.
|
|
|
11-06-2005, 01:21 AM
|
#3
|
Member
Registered: Oct 2005
Posts: 67
Original Poster
Rep:
|
When I dmesg | more I get a whole lot of messages about the hardware devices....but at the bottom of the messages I can see these:
hub.c: new USB device 00:1f.2-2, assigned address 2
usb.c: USB device 2 (vend/prod 0x5dc/0x80) is not claimed by any active driver.
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
scsi1 : SCSI emulation for USB Mass Storage devices
Vendor: LEXAR Model: JUMPDRIVE Rev: 1.11
Type: Direct-Access ANSI SCSI revision: 02
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
USB Mass Storage support registered. <<<<<<------IS IT ALREADY MOUNTED?????
I can see the Lexar Jumpdrive listing but how to mount it?
|
|
|
11-06-2005, 01:28 AM
|
#4
|
Member
Registered: Feb 2004
Location: Washington, USA
Distribution: Debian
Posts: 265
Rep:
|
View the contents of /etc/mtab to see if it's already mounted. Probably not mounted though.
Flash drives usually come formatted with at least one partition. You can use fdisk /dev/sda to verify if it has partitions already. To mount it, you'll need somewhere to mount it too so mkdir /mnt/sda1 where sda1 can be whatever you want.
Then mount /dev/sda1 /mnt/sda1
|
|
|
11-06-2005, 01:31 AM
|
#5
|
Member
Registered: Jan 2005
Location: Tasmania
Distribution: Xen Debian Lenny/Sid
Posts: 578
Rep:
|
Open a terminal or console, su to root, and:
# ls -l /var/tail/messages
Then plug in your USB drive.
You should see (after a slight delay) some messages like this:
Nov 6 18:19:41 venice kernel: usb 1-2: new full speed USB device using uhci_hcd and address 3
Nov 6 18:19:41 venice kernel: scsi3 : SCSI emulation for USB Mass Storage devices
Nov 6 18:19:44 venice usb.agent[22682]: usb-storage: already loaded
Nov 6 18:19:46 venice kernel: Vendor: Generic Model: USB SD Reader Rev: 2.00
Nov 6 18:19:46 venice kernel: Type: Direct-Access ANSI SCSI revision: 00
Nov 6 18:19:46 venice kernel: SCSI device sda: 31360 512-byte hdwr sectors (16 MB)
Nov 6 18:19:46 venice kernel: sda: Write Protect is off
Nov 6 18:19:46 venice kernel: SCSI device sda: 31360 512-byte hdwr sectors (16 MB)
Nov 6 18:19:46 venice kernel: sda: Write Protect is off
Nov 6 18:19:46 venice kernel: /dev/scsi/host3/bus0/target0/lun0: p1
Nov 6 18:19:46 venice kernel: Attached scsi removable disk sda at scsi3, channel 0, id 0, lun 0
Nov 6 18:19:47 venice scsi.agent[22727]: sd_mod: loaded successfully (for disk)
So, you can see here that the flash drive is sda.
Assuming you only have one partition on the drive (most likely)
you will be interested in partition #1.
Make somewhere to mount it:
# mkdir /media/USBflash
Mount it manually:
# mount /dev/sda1 /media/USBflash
All things being equal, the partition type will be automatically
detected, and the contents of the partition will be available at /media/USBflash.
I suspect that you'll find the flash is a fat(16) partition formatted
as vfat (long filenames).
So to be able to write to the flash drive as a user (rather than root)
you will need to add a umask to the mount option:
# mount -o umask=002 /dev/sda1 /media/USBflash
To unmount it (make sure you wait for it!!!!)
# umount /media/USBflash
to make this as easy as "$ mount /media/USBflash"
# echo " /dev/sda1 /media/USBflash vfat user,umask=002 0 0" >> /etc/fstab
|
|
|
11-09-2005, 07:05 PM
|
#6
|
Member
Registered: Oct 2005
Posts: 67
Original Poster
Rep:
|
Sorry mates I am bit a late in posting....it worked...and thank you for your help...
|
|
|
All times are GMT -5. The time now is 01:09 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|