Linux - NewbieThis 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
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.
I still really, really new to Linux, but was able to get RH9 installed on my home and laptop machines without too many issues. I frequently bring large files home from work on a USB FLASH memory drive (Lexar 64MB JumpDrive), and wanted to be able to use it in Linux as well (in hopes of oneday dropping windows entirely).
Using bits and pieces from posts on other similar topics from this website as well as a couple of man pages, I have figured out (using dmesg) that my FLASH drive is assigned as a SCSI device /dev/sda1, and I have figured out how to mount and unmount my USB Flash Drive by adding the following line to /etc/fstab
/dev/sda1 /mnt/flash vfat noauto,user 0 0
and the following line to /etc/auto.misc
flash -fstype=vfat :/dev/sda1
As I understant it, adding the line to /etc/fstab lets me say 'mount /dev/sda1' as either a user or as root. The 'noauto' feature simply implies that RH9 will not look for it on bootup.
I added the line to /etc/auto.misc following a cd-rom example so that when I mounted it, GNOME would add an icon to the desktop for that mount point. This seems to work.
What my question is then, is how can I make it automatically detect when I have inserted the USB device, and mount it by itself so that I don't have to go to a terminal and mount it manually? I assume this is possible, because what I want to do seems to work for cds (i.e. when I put data cds into the cd drive, the icon automatically pops up).
Thanks so much for the suggestion. It sounds like this is what I am looking for.
If I understood it correctly, typing '/sbin/hotplug usb' should set it up. I tried that and it doesn't seem to work like I thought it would. I will have to keep investigating.
Having just upgraded to the new kernel (2.6.16.20) I am trying to get the USB drives to mount under dropline gnome. What a pain! As far as I can tell, all the modules are compiled correctly in the kernel, and the HALD daemon starts at boot, but no way to mount any usb drives.
Now Slackware is a great distro, but this is so annoying.
I've read all the feeds on several fora, but there is nothing decisive. My biggest pain is that I am getting the dreaded /dev/sda is not a valid block device message.
fdisk will not find /dev/sda
can't mount /dev/sda
Sorry there is no dmesg post, but the linux box is off the net at the moment, but the bus is found by the kernel, itis justthe disc mounting that is not happeneing.
Having just upgraded to the new kernel (2.6.16.20) I am trying to get the USB drives to mount under dropline gnome. What a pain! As far as I can tell, all the modules are compiled correctly in the kernel, and the HALD daemon starts at boot, but no way to mount any usb drives.
Now Slackware is a great distro, but this is so annoying.
I've read all the feeds on several fora, but there is nothing decisive. My biggest pain is that I am getting the dreaded /dev/sda is not a valid block device message.
fdisk will not find /dev/sda
can't mount /dev/sda
Sorry there is no dmesg post, but the linux box is off the net at the moment, but the bus is found by the kernel, itis justthe disc mounting that is not happeneing.
In fstab I have
/dev/sda /mnt/usbdrive vfat rw, noauto, user 0 0
Any ideas, however vague would be great.
At least the G5 is working properly!
HAL requires that you don't have fstab entries for your usb drive. Remove these fstab entries (or comment them out) and it should mount just fine, provided your kernel is compiled properly.
You should post these questions in the dropline forums, or search there if you have any further concerns.
HAL requires that you don't have fstab entries for your usb drive. Remove these fstab entries (or comment them out) and it should mount just fine, provided your kernel is compiled properly.
You should post these questions in the dropline forums, or search there if you have any further concerns.
I was under the impression that HAL honors your fstab entries. With this in mind, I thought HAL would mount your devices like usb drives where fstab has that device listed. Or am I incorrect in my thoughts?
I was under the impression that HAL honors your fstab entries
I think it varies between distros. Monitor the kernel messages just before inserting a pendrive: "sudo tail -f /var/log/messages". There may be a message saying something like: HAL refuses to mount drive because it has an fstab entry. Part of it may be the desktop as well. HAL and the desktop environment communicate via the dbus. If hald, dbusd or udevd aren't running, automounting won't work. One thing that can keep these services from running is if you use the "noacpi" kernel boot option (in your /boot/grub/menu.lst kernel entry).
On SuSE an fstab entry will keep HAL from automounting the disk. An entry in fstab is taken as a desire to mount it yourself. Especially if you mount it under /mnt, because HAL only mounts drives under /media/.
Also, check the hidden /media/.hal_mtab file for a stale entry.
SuSE has a nice helper program called "halmount". Check if yours does as well. Entering /dev/sda1 or /media/<label> will mount the drive. Entering "halmount" by itself will print out information on devices that hal sees.
By the way, are you certain that the drive is /dev/sda1? That is usually the first partition on the first harddrive.
I just noticed that you are using /dv/sda instead of /dev/sda1. That may be a mistake.
Some pendrives are formatted like floppies and don't have a partition table, but most do.
Look at "udevinfo -q env -n /dev/sda" and "udevinfo -q env -n /dev/sda1". Which one mentions the filesystem on the pendrive.
Also look in your kernel messages. Does it mention a /dev/sda1 device? And yes, there shouldn't be commas between options.
And please, double check that /dev/sda is the pendrive device and not your hard drive.
First, comment out the /etc/fstab entry and see if automounting works. HAL definitely won't automount a drive on /mnt.
By the way, are you certain that the drive is /dev/sda1? That is usually the first partition on the first harddrive.
On my old laptop the hard drive is shown as hda[#], and usb or other devices are shown as sda[#]. Also, if DMA is not cooperating on my new laptop, its hard drive is shown as hda, but if I get the proper kernel configuration, then they are shown as sda. I suppose it depends on exactly what hardware and kernel config you have.
HA! Isnt that funny.... yeah... I just found this post when I was browsing through google looking for a hal related error. Didn't even think to look at the date. Oh well, I guess we brought an older post to the top.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.