FedoraThis forum is for the discussion of the Fedora Project.
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'm running Fedora Core 2 Test 1 with kernel 2.6.4 and am wondering how to mount my USB disk after I hot-plug it in and without having to reboot.
Currently, everytime I plug something into my USB port (disk or mouse), I have to reboot linux in order for it to recognise that there is a device on the USB port. This negates the point of USB devices and I would like to be able to hot-plug a device in and have Linux detect and mount it. Is that possible?
You can look at the Kernel automounter daemon, but I think it needs some setup to get it working. SuSE 9.1 certainly supports automounting out of the box (version 8.something didn't; at least, it didn't work for me).
You can also mount something manually by running the command
Code:
mount /mnt/usbdisk
(substitute the correct mount-point for your setup). You can do this as a regular user by adding the user option to the /etc/fstab file on the line containing /mnt/usbdisk. If you add the sync option to the same line, then you can also unplug the device without unmounting it without the risk of losing data (so long as the write light is off), at the cost of a slightly less efficient way of accessing the disk.
Thanks very much for the info. However, FC2 does not recognise that a device is even plugged in to the USB port, so mounting it doesn't work (comes back with an error saying no such mount point)
I'll take a look at the automount though.
Oh, if I put the /mnt/usbdisk line in the /etc/fstab file, does that mean that FC2 will load up the required files during bootup so that I can mount the disk whenever I plug it in? Or would that not do anything ie still require a reboot to recognise a usb device is plugged in?
right click the desktop, click 'create new' -> hard disk ->device tab
from the drop down box pick
/dev/sda1 (/mnt/usbmem)
this will put an access icon on your desktop, just like a cd or floppy. plug in the usb memory stick and double click the icon to mount it.
Originally posted by Alf829 hmm, where would that be located in the kernel configuration tree? I haven't seen any option about USB hotplugging when I built my kernel 2.6.4
Sorry; I've just checked. I think you actually need Support for Hotpluggable Devices under General Setup.
I can´t say about the 2.6.4 kernel but I´ve been able to get the following to work on the FC2 2.6.5 and 2.6.8 kernels, they both had UHCI and EHCI modules enabled out of the box. Install submount (http://submount.sourceforge.net/). There are two installations within the download, subfs-0.9 and submountd-0.9. Both are very easy to install. If you already have created the mount points where you want the USB to go then skip this next step, otherwise
Open a terminal window -> type su - and enter root password when prompted
-> typemkdir /mnt/USB or wherever you want and any name you want
-> type vim /etc/fstab hit i while in the fstab to enter Insert mode
-> go to the bottom and enter the following line, change the name of the mount point to match yours
/dev/sda1 /mnt/USB subfs fs=vfat,umask=000 0 0
Hit Esc and then type :wq this will write the changes to the fstab. Reboot the computer. When you log back in, insert your USB drive and open the /mnt/USB (or appropriate dir), you should see the contents and have rw capabilities also.
This will make the USB device ¨hot swappable¨, the only time I´ve run into a problem is when I remove it from one USB port, plug it in to another, and try to put it back in the original port. I´ve had to do an fuser /mnt/USB and kill the process number. After that it was fine.
i have followed the instructions
but i get tuned that ..mount: fs type subfs not supported by kernel
but i have the lastest fc2 kernel..???
how can i find out if i have these 2 mods install or not UHCI and EHCI..i have tried 2 locate them..
can any1 help me out plz
Quote:
Originally posted by BIACS I can´t say about the 2.6.4 kernel but I´ve been able to get the following to work on the FC2 2.6.5 and 2.6.8 kernels, they both had UHCI and EHCI modules enabled out of the box. Install submount (http://submount.sourceforge.net/). There are two installations within the download, subfs-0.9 and submountd-0.9. Both are very easy to install. If you already have created the mount points where you want the USB to go then skip this next step, otherwise
Open a terminal window -> type su - and enter root password when prompted
-> typemkdir /mnt/USB or wherever you want and any name you want
-> type vim /etc/fstab hit i while in the fstab to enter Insert mode
-> go to the bottom and enter the following line, change the name of the mount point to match yours
/dev/sda1 /mnt/USB subfs fs=vfat,umask=000 0 0
Hit Esc and then type :wq this will write the changes to the fstab. Reboot the computer. When you log back in, insert your USB drive and open the /mnt/USB (or appropriate dir), you should see the contents and have rw capabilities also.
This will make the USB device ¨hot swappable¨, the only time I´ve run into a problem is when I remove it from one USB port, plug it in to another, and try to put it back in the original port. I´ve had to do an fuser /mnt/USB and kill the process number. After that it was fine.
If you are receiving a message ... fs type subfs is not supported, then it sounds as if you need to re-install the submount package (from the sourceforge link)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.