Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with 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.
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.
When I plug in my USB mp3 player/memory stick, linux mounts its perfectly, but I can't read the files on the stick. My dmesg says:
Code:
hub.c: new USB device 00:03.0-3, assigned address 1
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 1
SCSI device sda: 251904 512-byte hdwr sectors (129 MB)
sda: Write Protect is off
sda: sda1
cdrom: This disc doesn't have any tracks I recognize!
What does it mean that the disc doesn't have any tracks it can recognise? The filesystem of the stick is FAT16 if my memory serves me well, and Linux can read FAT16 can it not?
and now I can see the files. What do I do to get linux to mount the stick automaticly? A line is entered into fstab when the stick is mounted, but it doesn't stay there.
1. Get autofs package.
2. Edit conffiles of autofs.
3. Restart autofs.
4. Make convenient symlinks.
1.
In debian, package containing autofs is called autofs; maybe something similar in FC.
Use your installation / package management tools to figure out.
2.
I have a /etc/auto.master with line
Code:
/var/autofs/misc /etc/auto.misc
The usage of this is similar to fstab. The /var/autofs/misc is an existing mountpoint where my autofs resides.
Other file /etc/auto.misc contains lines like
Code:
stick -fstype=vfat :/dev/sda1
3.
Now running "/etc/init.d/autofs start"
(and "/etc/init.d/autofs stop" before it, if it was already running)
should do the trick.
if you cd to directory /var/autofs/misc/stick/, the autofs should mount the /dev/sda1.
And if you move away from there and/or stop accessing the stick, it will unmount the device after the timeout.
# $Id: auto.master,v 1.2 1997/10/06 21:52:03 hpa Exp $
# Sample auto.master file
# Format of this file:
# mountpoint map options
# For details of the format look at autofs(8).
/misc /etc/auto.misc --timeout=60
and then in my /etc/autofs.misc, i have :
Code:
# $Id: auto.misc,v 1.2 1997/10/06 21:52:04 hpa Exp $
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# Details may be found in the autofs(5) manpage
cd -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom
# the following entries are samples to pique your imagination
#linux -ro,soft,intr ftp.example.org:/pub/linux
#boot -fstype=ext2 :/dev/hda1
#floppy -fstype=auto :/dev/fd0
#floppy -fstype=ext2 :/dev/fd0
#e2floppy -fstype=ext2 :/dev/fd0
#jaz -fstype=ext2 :/dev/sdc1
#removable -fstype=ext2 :/dev/hdd
stick -fstype=vfat :/dev/sda1
I restarted autofs, and it says [ OK ]
and i tried to cd to /misc/stick and it says there is no such dir, so I try and create /misc/stick and it says :
Code:
[root@cpc3-cwbn1-3-0-cust242 /]# mkdir /misc/stick
mkdir: cannot create directory `/misc/stick': No such file or directory
dmesg shows only kernel log, not userspace events that are logged.
In some distributions (atleast some versions of RH), all logs are collected to /var/log/messages, in some(eg. in debian) to /var/log/syslog. You can try to locate the correct log by running command like
Code:
logger "Hello there, where are you?"
and searching through the /var/log to see what file got a line containing those words.
Well, I'll admit now - I've never felt more stupid. Looking at the syslog (which happened to be in /var/log/messages) I saw the line /dev/sda1 invalid block device - device doesn't exist.
Which twigged me to think - "Hang on a moment.... the drive isn't plugged in" - And that was the root of the problem all along >.< I'd forgotten that the drive needed to be plugged in to be mounted.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.