Slackware This Forum is for the discussion of Slackware 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.
|
 |
|
06-27-2006, 12:04 AM
|
#1
|
Member
Registered: Jun 2006
Posts: 50
Rep:
|
Removable Flash Drive Problems
I've inserted a removable flash drive into my computer, and for some reason I can't seem to find it. Are there commands I need to enter in order to see/get my system to read my flashdrive?
|
|
|
06-27-2006, 12:30 AM
|
#2
|
Member
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753
Rep:
|
try the command , it will show all filesystems including hot-pluggable ones. if your flash drive is detected, it will be there. you will need to mount it to able to read it.
|
|
|
06-27-2006, 12:31 AM
|
#3
|
HCL Maintainer
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Gentoo on headless; Arch on everything that requires a GUI
Posts: 6,942
Rep: 
|
To see if your system picked it up, you should issue "dmesg | tail" after it's been plugged in.
|
|
|
06-27-2006, 03:10 AM
|
#4
|
Member
Registered: Jul 2003
Location: dhaka
Distribution: Slackware 11 (fixed), MEPIS
Posts: 241
Rep:
|
hello 
after adding the following lines in your /etc/fstab you should be able to mount flash drive from Storage Device in Konqueror.
/dev/sda1_______ /mnt/usb-flash______ vfat _______ noauto,user,owner,rw,umask=000 ____ 1__ 0
just change sda1 to only sda or sda2, and make sure you did "mkdir /mnt/usb-flash"
|
|
|
06-27-2006, 03:15 AM
|
#5
|
HCL Maintainer
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Gentoo on headless; Arch on everything that requires a GUI
Posts: 6,942
Rep: 
|
krussell,
You can only mount a partition, i.e. /dev/sda1 -- not a drive, i.e. /dev/sda.
The OP could also be running two SATA drives, like me, in which case his first USB removable storage drive would be /dev/sdc1.
Code:
mingdao@silas:~$ dmesg | tail
sdc: assuming drive cache: write through
SCSI device sdc: 512000 512-byte hdwr sectors (262 MB)
usb 1-6: reset high speed USB device using ehci_hcd and address 7
sdc: Write Protect is off
sdc: Mode Sense: 02 00 00 00
sdc: assuming drive cache: write through
sdc: sdc1
sd 2:0:0:0: Attached scsi removable disk sdc
sd 2:0:0:0: Attached scsi generic sg2 type 0
usb-storage: device scan complete
Let's not be too premature with our advice, eh?
|
|
|
06-27-2006, 05:32 AM
|
#6
|
Senior Member
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
|
tail defaults to 10 lines, I would add " -20":
Code:
dmesg | tail -20 # or
dmesg | tail -20 | less
Also, lsusb can provide useful info, starting w/ whether it was detected.
|
|
|
06-27-2006, 10:33 AM
|
#7
|
Member
Registered: Jun 2006
Posts: 50
Original Poster
Rep:
|
It seems like hotplug isn't detecting the device. Is this a sign that I should upgrade to kernel 2.6? (btw, I issued lsusb, and dmesg | tail)
PS- dmesg | tail had some note of new usb hardware detected, but after removing my drive and issuing the same command, the same notice appeared. Lsusb showed about 6 things, none of which sounded remotely close to a removable drive.
|
|
|
06-27-2006, 11:01 AM
|
#8
|
HCL Maintainer
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Gentoo on headless; Arch on everything that requires a GUI
Posts: 6,942
Rep: 
|
We can't see the output unless you give us a shell account, or post it here...
You might also want to add what version of Slackware, which kernel, etc.
|
|
|
06-27-2006, 11:13 AM
|
#9
|
Member
Registered: Jun 2006
Posts: 50
Original Poster
Rep:
|
Slackware 10.2, Kernel 2.4. Strangely enough, the device appeared after I gave it a second shot
output of lsusb:
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 004 Device 002: ID 046d:c03d Logitech, Inc.
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
Bus 001 Device 005: ID 0457:0151 Silicon Integrated Systems Corp.
output of dsmesg | tail
SCSI device sda: 2007040 512-byte hdwr sectors (1028 MB)
sda: Write Protect is off
sda: sda1
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 4
USB Mass Storage support registered.
usb.c: USB disconnect on device 00:02.2-2 address 4
hub.c: new USB device 00:02.2-2, assigned address 5
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 5
Now what do I do?
|
|
|
06-27-2006, 11:18 AM
|
#10
|
HCL Maintainer
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Gentoo on headless; Arch on everything that requires a GUI
Posts: 6,942
Rep: 
|
Wait for your system to finish scanning the device?
|
|
|
06-27-2006, 01:49 PM
|
#11
|
Member
Registered: Jun 2006
Posts: 50
Original Poster
Rep:
|
The drive finished scanning
How do I go about mounting it? As in, how do I know which directory to mount? (actually, if someone could explain mounting, that would be a big help) I've only mounted images with daemon tools using the virtual drives.
|
|
|
06-27-2006, 03:49 PM
|
#12
|
Senior Member
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Rep:
|
Quote:
Originally Posted by BlackSheep024
Slackware 10.2, Kernel 2.4. Strangely enough, the device appeared after I gave it a second shot
output of lsusb:
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 004 Device 002: ID 046d:c03d Logitech, Inc.
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
Bus 001 Device 005: ID 0457:0151 Silicon Integrated Systems Corp.
output of dsmesg | tail
SCSI device sda: 2007040 512-byte hdwr sectors (1028 MB)
sda: Write Protect is off
sda: sda1
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 4
USB Mass Storage support registered.
usb.c: USB disconnect on device 00:02.2-2 address 4
hub.c: new USB device 00:02.2-2, assigned address 5
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 5
Now what do I do?
|
There is the importtant part.
Now
Code:
# mkdir /mnt/usbkey
# mount -t vfat /dev/sda1 /mnt/usbkey
Do the above as root. And change the names to whatever you wish.
|
|
|
06-28-2006, 01:37 AM
|
#13
|
HCL Maintainer
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Gentoo on headless; Arch on everything that requires a GUI
Posts: 6,942
Rep: 
|
Quote:
Originally Posted by BlackSheep024
How do I go about mounting it? As in, how do I know which directory to mount? (actually, if someone could explain mounting, that would be a big help) I've only mounted images with daemon tools using the virtual drives.
|
It looked as if your system had not finished scanning your device. You should have gotten a final line similar to what I posted before:
Quote:
usb-storage: device scan complete
|
Did you not get this? It could take 30 seconds or more for your system to finish scanning, and it looked from your output as it there might be a problem. You should have issued "dmesg | tail" again until it either finished scanning the device or gave up; which I think would give you a disconnect line.
If it did finish scanning, you'd probably like to mount it, read it, and write it as a normal user. You should only use root for system administration tasks.
To learn more about mounting devices, you can issue in a terminal and read "man mount", and also "man fstab" -- because /etc/fstab is the file which contains information about your file systems. This file allows you to setup devices to be read automatically, without having to issue a longer command each time you want to mount a device.
Now that we know the USB flash drive you want to use will be /dev/sda1 we can recommend a line for your /etc/fstab file. The following will allow you to mount the device as a normal user, read and write to it, and unmount it. You may create the mount point wherever you desire. Below is my suggestion only:
Code:
/dev/sda1 /usb1 vfat noauto,users,rw,umask=1000 0 0
/dev/sdb1 /usb2 vfat noauto,users,rw,umask=1000 0 0
In this example there are two devices and two mount points. Just in case you have your flash drive plugged in, then decide to plug in your camera and get the photos off of it, for example. I've told it "noauto" which means it doesn't automatically mount the device, you have to actually issue a command I'll give later to mount it.
You can su (switch user) to root and create mount points like this:
Code:
mingdao@silas:~$ su
Password:
root@silas:/home/mingdao# mkdir /usb1
Since you've done this as root, that directory will be owned by root, and only root can mount and write to the device. To change that so a normal user on your system can mount, read, and write, issue these commands while still logged into the terminal as root:
Code:
chown mingdao.users /usb1
chmod 757 /usb1
What we've done is change owner (chown) from root in group root to mingdao in group users. Then we changed file access permissions (chmod) so that root and user mingdao can read, write, and execute files; while other users can read and execute, but not write. If you want every user on your system to also write to the the device, then "chmod 777 /usb1" is what you want.
Now to mount it. We've set it up so that normal users (not root) can mount and read/write to the device. There are several ways to mount it. You can open a terminal and issue "mount /usb1" for /dev/sda1 or "mount /usb2" for /dev/sdb2. To unmount it you cd out of it's directory (if you were there) and issue "umount /usb1" -- notice there is one 'n' in umount.
If you're running KDE, you can click on the System icon on your desktop, then Storage Media, then whichever device you choose > Removable Device (sda1) for example. To unmount it you navigate back to the Storage Media screen, right-click the same icon and choose Safely Remove.
If you're using Xfce, you can open the File Manager (xffm), click the arrow in front of Fstab to expand it's tree, then right-click on /usb1 and choose Mount. Then the only way I see to get it in the right hand window is to navigate by clicking folder icons and up arrow ^ icons until you get to / and then click it. To unmount it, close the folder on the right hand side and get back up the tree and then go to the left hand side, click /usb1 and choose Unmount.
|
|
|
06-28-2006, 03:00 AM
|
#14
|
Member
Registered: Mar 2006
Distribution: Slackware
Posts: 63
Rep:
|
Quote:
Originally Posted by BlackSheep024
I've inserted a removable flash drive into my computer, and for some reason I can't seem to find it. Are there commands I need to enter in order to see/get my system to read my flashdrive?
|
I'd suggest you to read the Flash Memory HOWTO
|
|
|
06-28-2006, 05:59 AM
|
#15
|
HCL Maintainer
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Gentoo on headless; Arch on everything that requires a GUI
Posts: 6,942
Rep: 
|
Quote:
Originally Posted by wchild
I'd suggest you to read the Flash Memory HOWTO
|
Which one is that ... link, please.
I found a few with Google <Linux> but most are out-of-date.
Typical of TLDP docs...
|
|
|
All times are GMT -5. The time now is 01:57 AM.
|
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
|
|