![]() |
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 |
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.
|
Quote:
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. |
Quote:
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.) |
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/?????? |
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.
|
or use udev
this is a fairly good tutorial http://www.reactivated.net/writing_udev_rules.html the usbhdd section http://www.reactivated.net/writing_u...example-usbhdd 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 |
Quote:
|
Quote:
Quote:
-- Rick |
[SOLVED] Trouble mounting USB device in OpenSUSE 12.2
Quote:
Quote:
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 |
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.
|
Quote:
Quote:
Code:
ETHDEV=whatever-the-ethernet-device-is /usr/local/sbin/my_firewall_rulesI, 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:
-- Rick |
| All times are GMT -5. The time now is 02:38 AM. |