LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 05-12-2005, 04:50 AM   #1
SuSE_Lamer
Member
 
Registered: Nov 2004
Location: Hamburg/Germany
Distribution: Debian 10
Posts: 169

Rep: Reputation: 16
Several USB ports: explicit mounting or "hotplug"?


Hello everybody!

I have an old Acer notebook, where I want to install SuSE 9.1 Pro. I tried it already with Knoppix, and it runs (after I set the swap space large enough).

My problem is as follows: the notebook has an USB port, but it got broken. Therefore, it cannot be used anymore. I bought recently a PCMCIA card (Belkin F5U022) which is intended to serve as USB hub - it has 2 ports. Now, if I install the Linux, I must decide - do I use hotplug or direct mounting?

I have another laptop - IBM TP 600x. I use direct mounting for my built-in USB port, and hotplug for the USB port in the docking station. The real disadvantage of the hotplug is that it mounts the device under very long name in tne "/media" folder. First time it took me rather long time to find where my USB stick got mounted! :-)

On the other hand, I didn't manage to mount the USB port in the docking station via /etc/fstab file. I simply don't know which device must be used, since the docking station is not something fixed once and forever. And in this situation hotplug works fine. But the naming rules are ugly...

So, that's my situation. If I repeated any post from the past, I'm really sorry - didn't want to spam the forum. But I really need help and hints..

I will be glad to get any information!

Regards,
Andrey.
 
Old 05-12-2005, 06:47 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
OK - by "hotplug" I guess you are refferring to "automounting" as opposed to "manual mounting".

If you do not intend for your new hub to be there perminantly - presumably you have another card you'd like to use from time to time - then you should probably consider only mounting devices attached to the hub manually. You can usually write a script for this so you plug in the card and run the script for the device.

The device names are - oh hell, this is SuSE - usually sda1, sda2 etc for usb devices. I forget where SuSE sticks them.

As for the mountpoint - look for the mountpoint in your fstab file and change it to something you'd prefer. I use /mnt/hotplug1. You may want soemthing like /mnt/usb/hotplug or whatever. But whatever you do choose, don't forget to create the mountpoint.

You can always include an fstab entry for the removable hub - if nothing shows up in the device, nothing gets mounted The main reason for suggesting to manually mount usb devices is that it's easier to get your head around while you are learning.

But if you install linux - there is a good chance, it will "hotplug" usb by default - especially if you have the hub installed at the time.

I hope this makes sence to you...
 
Old 05-12-2005, 07:43 AM   #3
SuSE_Lamer
Member
 
Registered: Nov 2004
Location: Hamburg/Germany
Distribution: Debian 10
Posts: 169

Original Poster
Rep: Reputation: 16
"Automount" vs. "manual mount"

Quote:
Originally posted by Simon Bridge
OK - by "hotplug" I guess you are refferring to "automounting" as opposed to "manual mounting".

If you do not intend for your new hub to be there perminantly - presumably you have another card you'd like to use from time to time - then you should probably consider only mounting devices attached to the hub manually. You can usually write a script for this so you plug in the card and run the script for the device.

The device names are - oh hell, this is SuSE - usually sda1, sda2 etc for usb devices. I forget where SuSE sticks them.

As for the mountpoint - look for the mountpoint in your fstab file and change it to something you'd prefer. I use /mnt/hotplug1. You may want soemthing like /mnt/usb/hotplug or whatever. But whatever you do choose, don't forget to create the mountpoint.

You can always include an fstab entry for the removable hub - if nothing shows up in the device, nothing gets mounted The main reason for suggesting to manually mount usb devices is that it's easier to get your head around while you are learning.

But if you install linux - there is a good chance, it will "hotplug" usb by default - especially if you have the hub installed at the time.

I hope this makes sence to you...
Hello, Simon!

Thank you very-very much for your response and hints. The situation is as follows:
1) I'm going to have the PCMCIA card - the USB hub from Belkin - permanently plugged into one of the slots. So, it means, that the hub is actually always there;
2) I tried to mount my USB port in the docking station using entry in the "fstab"-file. I tried to mount sdb1, sda2 and some other combinationto the certain folder in the file system. When I insert the device (in the port of docking station) and say <mount /usb_dock>, it returns the error: <mounted device> is not a valid block device...
3) I inspected my fstab-file carefully - there is nothing saying that "hotplugged" devices must be mounted in the "/media" folder. I assign there certain folders for my FDD, CD-ROM and built-in USB port, and it works. But nothing about hotplug...

Perhaps, I'm wrong, but I think that SuSE can handle manual mount only for the built-in devices (like my built-in USB port). USB port in the docking station as well as my new PCMCIA-based hub (by the way, I tested it already - it works) are not permanently there. Therefore, no fixed device number can be assigned. In some tests I saw, that number of one (of two) file in my "/proc/bus/usb/001" folder is always changing when I plug in and pull out the device. It looks like a dynamical assigning of the device number.

Since I'm just a user of the Linux (OK, a kind of advanced user, but not even reaching the level of the junior administrator :-) ), I think that all this configuring can cost me a lot of time and efforts. That's why now I think, if it wouldn't be simpler to rely on the implemented "hotplug" support. The main problem for is to understand, which device must be mounted in which situation. For instance, how should I treat the PCMCIA-based USB hub? I know that my network card is assigned to the "eth0" interface. And what about hub?

I will search in the Internet for the hints about configuring the USB devices on the laptops. Maybe, I can find clear solution.

In any case, I would like to ask people to join the topic. I think, many people (who are not od the administrator level) face my problem and finally give up. If we try to gather a kind of on-line help for this problem, this would be very usefull and nice.

Regards,
Andrey.
 
Old 05-12-2005, 07:47 AM   #4
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
I don't have a solution, BUT... I once read about a kernel patch for hotplugging not based on the device name, but based on the internal device id instead, so for each real device (eg: your USB key) you choose a particular mount point, and thereafter, anytime you plug it, it mounts at the same location, whatever plug you actually used.

Now the problem is I don't remember the URL, nor the patch name... But maybe I gave you hope... at least

Yves.
 
Old 05-12-2005, 08:32 AM   #5
SuSE_Lamer
Member
 
Registered: Nov 2004
Location: Hamburg/Germany
Distribution: Debian 10
Posts: 169

Original Poster
Rep: Reputation: 16
Different devices - different approaches

Quote:
Originally posted by theYinYeti
I don't have a solution, BUT... I once read about a kernel patch for hotplugging not based on the device name, but based on the internal device id instead, so for each real device (eg: your USB key) you choose a particular mount point, and thereafter, anytime you plug it, it mounts at the same location, whatever plug you actually used.

Now the problem is I don't remember the URL, nor the patch name... But maybe I gave you hope... at least

Yves.
Thanks. My hope is back again! :-)

On my ThinkPad 600x I have a fixed mount point. But the problem is that I use mostly only one USB device - a memory stick. So, when I insert it in the built-in slot, I mount it per hand and access the information on the stick as a content of the folder. The usual way, isn't it?

But with this PCMCIA card.. And my USB port in the docking station... I want to understand, how will it work if I plug an USB mouse and a camera at the same time. Or even more devices... For instance, a friend of mine has an external CD writer in the USB box. Wher will it be mounted? With which permissions?

I'm trying to obtain information from the SuSE site. I hope, I will manage to understand how this stuff works...


Regards,
A.
 
Old 05-12-2005, 10:04 AM   #6
SuSE_Lamer
Member
 
Registered: Nov 2004
Location: Hamburg/Germany
Distribution: Debian 10
Posts: 169

Original Poster
Rep: Reputation: 16
Links

It's me again...

It looks like the "automount" implemented in the SuSE made the system more instable than earlier. Many people returned to the classical way of mounting.

For those who need help in this area, I recommend two links:
SuSE portal - very nice page, contains a lot of information;
Forums by SuSE Linux Support - a commnunity of Linux users.

I hope, this might be interesting for others.

Cheers,
A.
 
Old 05-12-2005, 10:17 AM   #7
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Have a look at this article while you're at it.
http://www.linux-mag.com/content/view/1117/2222/

I'm used a pci 2-slot hub and my camera of the time always used to get stuck in /dev/sda1 so I can use a script to mount it. As long as there is only one usb device added and removed this is fine. If I had a usb mouse also in, it would get /dev/usb/mouse interestingly ... however, when I had a camera and a PDA cradle hooked in, the pda was misidentified as a mass storage device! However, they got different devices.

Perhaps you should try lsusb and post the result...
 
Old 05-12-2005, 10:21 AM   #8
abisko00
Senior Member
 
Registered: Mar 2004
Location: Munich
Distribution: Ubuntu
Posts: 3,517

Rep: Reputation: 58
Quote:
It looks like the "automount" implemented in the SuSE made the system more instable than earlier. Many people returned to the classical way of mounting.
Definitely! In SUSE 9.1, I can only recommend to switch-off the use of submount/subfs. It is simply not reliable. To return to the 'classical' way of mounting, you need to set the paramter 'HOTPLUG_USE_SUBFS' to NO in /etc/sysconfig/hotplug.

In 9.2 however, submount has become more reliable, but it may still interfere with you requirements. There are several levels in the use of submount/hotplug (I think they can be tweaked in the same configuration file, however I am not sure).
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mounting "Jens of Sweden" mp3 player (USB) jaakkop Linux - Hardware 1 04-16-2005 04:17 PM
Writing to "/dev/usb/hiddev*" and to "/proc/bus/usb/00B/00S" throw an arror EI stpg Programming 0 07-14-2004 05:44 AM
USB drive keeps mounting as "read only" I need to write to it. Lossenelin Linux - Hardware 1 02-12-2004 06:49 PM
Module usage :Global symbol "$ref" requires explicit package name rajatgarg Programming 2 12-17-2003 01:55 AM
Hotplug usb agent "Cannot get config descriptor 0"? imk Linux - Networking 0 10-26-2003 12:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 05:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration