Linux - Hardware This 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.
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
01-28-2013, 02:41 PM
|
#1
|
|
Member
Registered: Jan 2003
Location: Illinois (Chicago area)
Distribution: Red Hat (8.0), SuSE (10.x, 11.x, 12.2), Solaris (8-10), Tru64
Posts: 800
Rep:
|
Trouble mounting USB device in OpenSUSE 12.2
Or, perhaps I should say: trouble mounting a USB device where I want it mounted
Background: I've been happily mounting USB drives on OpenSUSE 11.x for a long time. After creating a udev rule and a suitable line in /etc/fstab, I can merely insert a USB drive and it shows up mounted in a predictable place, say, /media/cruzer or /media/attache.
Now: On OpenSUSE 12.2, the system automatically mounts the drive on some odd mount point that seems to be the serial number of the device: /media/79AA-12CD or something completely non-intuitive like that.
I tried copying over the udev rules from an 11.x system, modifying /etc/fstab, and having udev reread the rules. When I do this I get the USB mount behavior I'm looking for. BUT this only works for the duration of the current boot. And... when the system is rebooted, it hangs. Removing the lines for the USB devices in /etc/fstab solves the hanging problem.
Now the biggest difference between the two systems is, of course, 12.2 is using systemd. I suspect the problem I'm encountering is related to systemd though I can't quite tell why the system startup processes should be hanging (other than it's getting hung up on there not being anything accessible on the USB bus to mount). There are no obvious messages on the console that indicate that the system is waiting for something; it just sits there.
What is the mechanism for being able to have USB drives mounted on a nicely predictable mount point that I define and not one that uses some oddball hexadecimal string?
Any pointers to helpful READMEs and/or HOWTOs are most welcome.
TIA,
Rick
|
|
|
|
01-28-2013, 05:59 PM
|
#2
|
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Squeeze
Posts: 5,569
|
After taking a quick look at the OpenSuse Reference Manual, sections 12.7 and 12.8, I don't see any significant changes to the udev rule structure to account for your problems. You may want to compare your udev rule to the examples in the section 12.7. If you use the device-by-uuid example in both the udev rule and /etc/fstab, you should be able to fix your udev rule to mount persistently at the same mount point.
|
|
|
|
01-29-2013, 02:40 PM
|
#3
|
|
Member
Registered: Jan 2003
Location: Illinois (Chicago area)
Distribution: Red Hat (8.0), SuSE (10.x, 11.x, 12.2), Solaris (8-10), Tru64
Posts: 800
Original Poster
Rep:
|
Quote:
Originally Posted by bigrigdriver
You may want to compare your udev rule to the examples in the section 12.7. If you use the device-by-uuid example in both the udev rule and /etc/fstab, you should be able to fix your udev rule to mount persistently at the same mount point.
|
I suppose it's possible that there have been some minor syntax changes in the udev rules that have caused the current problem. I'll do some testing this evening to see what's happening on 12.2 and compare the results to what's working on the 11.x systems. Not having things mounted where I would like them is currently merely annoying (but it's making it a pain to implement some directory synchronization I've been trying to implement when files are transported between systems using the USB drive).
I'm still a little mystified by the fstab entries for the USB devices causing the boot to hang. If it was merely a timeout problem I could live with that (though I'd like to shorten the timeout). When I break out of the startup sequence while it's hanging, I get a message noting that I can issue "systemd default" (or something like that; I'm going from memory) but when I enter the root password and try that command the startup still hangs. So breaking out and editing the /etc/fstab to comment out the USB device entries is the only thing I've found that allows the startup to complete. Of course, when I do that the mounts don't work as desired. I guess I've got some more reading to do about systemd. I've only been using 12.2 for a couple of months or so and I'm still discovering new things.
|
|
|
|
01-29-2013, 11:57 PM
|
#4
|
|
Member
Registered: Jan 2003
Location: Illinois (Chicago area)
Distribution: Red Hat (8.0), SuSE (10.x, 11.x, 12.2), Solaris (8-10), Tru64
Posts: 800
Original Poster
Rep:
|
Quote:
Originally Posted by bigrigdriver
After taking a quick look at the OpenSuse Reference Manual, sections 12.7 and 12.8, I don't see any significant changes to the udev rule structure to account for your problems.
|
I'm not sure if you would consider it significant or not but the "NAME=" directive now seems to be invalid when used as I had been using it under 11.x. Removing that from the udev rules at least got the rules recognized and the symbolic links that are referred to in /etc/fstab created correctly.
But that wasn't enough to get USB devices mounted as I was hoping. I notice that the USB mount points in /etc/fstab must now use the "noauto" option where "auto" worked fine under 11.x. Without this change the boot process would still hang.
I created mount points under /media for the USB drives and rebooted. When a USB drive was inserted, the mount failed as the subdirectory under /media appears to have been cleaned out as part of the boot process. Recreating the mount point subdirectories under /mnt and modifying /etc/fstab to reflect the new mount points now has the USB drives mounting using names that are more human-readable. (Now I'm off to retrofit the 11.x systems so the USB drives are mounted in the same place on all systems.)
|
|
|
|
01-30-2013, 01:29 AM
|
#5
|
|
Guru
Registered: Aug 2005
Posts: 9,520
|
if you do not need it to mount to a specific custom named folder
just plug it in
and let it auto mount to /media/??????
Last edited by John VV; 01-30-2013 at 01:30 AM.
|
|
|
|
01-30-2013, 05:13 PM
|
#6
|
|
Guru
Registered: Mar 2008
Posts: 8,526
|
You can fix the mount by (device, common name, uuid or such) in Yast I think. I assume you had this/these devices attached when you installed the system.
|
|
|
|
01-31-2013, 11:59 AM
|
#8
|
|
Member
Registered: Jan 2003
Location: Illinois (Chicago area)
Distribution: Red Hat (8.0), SuSE (10.x, 11.x, 12.2), Solaris (8-10), Tru64
Posts: 800
Original Poster
Rep:
|
Quote:
Originally Posted by John VV
if you do not need it to mount to a specific custom named folder
just plug it in
and let it auto mount to /media/??????
|
Even if I could guarantee that the UUID would be the same across all systems where this USB drive might be plugged in -- and it probably is -- something like "79AA-12CD" isn't something I'm likely to remember. (Plus it's a more of a PITA to type than something like "cruzer" is.) Especially if I had two or more USB drives plugged in simultaneously (which isn't that uncommon, actually).
|
|
|
|
01-31-2013, 12:06 PM
|
#9
|
|
Member
Registered: Jan 2003
Location: Illinois (Chicago area)
Distribution: Red Hat (8.0), SuSE (10.x, 11.x, 12.2), Solaris (8-10), Tru64
Posts: 800
Original Poster
Rep:
|
Quote:
Originally Posted by jefro
You can fix the mount by (device, common name, uuid or such) in Yast I think.
|
If it's modifiable in YaST I must have missed it; I'll take another look. It might be a useful thing in the future.
Quote:
|
I assume you had this/these devices attached when you installed the system.
|
No these are portable USB drives that are moved between multiple systems. They would not be visible when the systems were built.
--
Rick
|
|
|
|
01-31-2013, 12:34 PM
|
#10
|
|
Member
Registered: Jan 2003
Location: Illinois (Chicago area)
Distribution: Red Hat (8.0), SuSE (10.x, 11.x, 12.2), Solaris (8-10), Tru64
Posts: 800
Original Poster
Rep:
|
[SOLVED] Trouble mounting USB device in OpenSUSE 12.2
Quote:
Originally Posted by John VV
|
I've seen those before. Anyway, the rules I have in place on the 11.x systems (based on info found in those tutorials, BTW) worked on the 12.2 system once I removed the "NAME=" directive. So I think many of the examples in those tutorials that employ that directive might now be broken. ( So watch out!) The other weird thing was that, on 12.2, the /media directory appears to be cleared at boot time so I couldn't use that as a location for the mount points I was looking to create. "/mnt" works fine. (Until they decide to do something odd in 13.1.  )
Quote:
for my 3TB drive i use
udev to lock it to /dev/hdc ( it is always pluged in so it was hdc anyway )
then a fstab line to mount it in a custom location
|
And that's my next project. I have one of those external SATA docking stations that I use with several disks for backup devices. I'll need to set up rules so that all of these disks wind up looking like "/dev/backup" or something like that and mounted on "/mnt/backup" so that backup scripts always know where the backup files should be written.
I'm calling this problem "solved". (At least for my needs.) Thanks, all, for the hints and comments that got me thinking of different places to look to tell what was going wrong.
--
Rick
|
|
|
|
01-31-2013, 02:12 PM
|
#11
|
|
Member
Registered: Feb 2003
Posts: 963
Rep:
|
Couldn't you just delete the entries. And when udev creates them for you, you can go modify what it assumed to suit your needs. It is annoying when udev creates a new eth# for a different machine when I boot my USB version of linux. Since I have to modify my firewall script with the new device name before I can run it. If it's assuming those from the UUID you can create custom UUID's with mkfs as long as the value is HEX. But you can do many interesting names in HEX. ba55c1ef feed deaf cafe beef and others.
|
|
|
|
01-31-2013, 02:55 PM
|
#12
|
|
Member
Registered: Jan 2003
Location: Illinois (Chicago area)
Distribution: Red Hat (8.0), SuSE (10.x, 11.x, 12.2), Solaris (8-10), Tru64
Posts: 800
Original Poster
Rep:
|
Quote:
Originally Posted by Shadow_7
Couldn't you just delete the entries. And when udev creates them for you, you can go modify what it assumed to suit your needs.
|
Maybe. I'm satisfied with the udev solution I've come up with.
Quote:
|
It is annoying when udev creates a new eth# for a different machine when I boot my USB version of linux. Since I have to modify my firewall script with the new device name before I can run it.
|
You could try modifying your firewall script to reference a shell variable, say "ETHDEV", as it sets up your iptables rules. When you know what the network device name is, run the script using
Code:
ETHDEV=whatever-the-ethernet-device-is /usr/local/sbin/my_firewall_rules
(Fill in your firewall path/script name.)
I, too, found the udev network device renaming annoying when I was trying to add a second network controller in some systems. I had all sorts of odd configuration problems (and all kinds of "network not accessible" type errors) until I figured out that I could swap the device names in the "persistent-net.rules" file.
Quote:
|
If it's assuming those from the UUID you can create custom UUID's with mkfs as long as the value is HEX. But you can do many interesting names in HEX. ba55c1ef feed deaf cafe beef and others.
|
I think that would be almost as confusing as the strings that the system is coming up with. I'd have figure out how to put P-touch labels on my little USB drives. I do like the "ba55clef" name though. There should be a smiley for that. Maybe "7:".
--
Rick
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 08:32 PM.
|
|
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
|
|