Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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 have a external usb hard drive that I use to back up to and sometimes what happens is that it will start a sda1, then if I unplug it then plug it back in it will go to sdb1, then sdc1, etc... I am wondering if there is a command that I can put in my script that will reset the device names back to sda1 so then I can always mount it to sda1....
Now you get these settings (ATTRS{serial}=="1000000019AA" for instance) by looking at the output of the command udevinfo -a -p /sys/block/sda now once you have the serial number for your drive copy and paste one of the lines I have to your own rules file changing the OWNER to your username and the serial to your serial number.
Now you need to put an entry in your /etc/fstab similar to below.
And of course you have to make a mount point in my case I created them in the /media directory your distro may have a different spot it puts them in. Once you have created the rule, put the line in the /etc/fstab and made the mount point when you plug in the drive the /dev/???? (whatever you named the SYMLINK+="????" in the rules file) will appear and you can access the drive as this same device every time. I just put icon shortcuts on my desktop for a filesystem device in KDE and click on them when I want to access, if I had wanted I could simply have let hald auto-mount and popup a file system browser window with Konqueror.
I've found some interesting reads about HAL vs UDEV, but what would you all recommend?
First off, before I went to Slack 12, I was on Slack 10 and was using UDEV exclusively. My external thumb drives and lacie were all handled via udev and I had appropriate /etc/fstab entries.
Now with Slack 12.0 my devices automatically get assigned a name (ie: disk) and get mounted to /media/name (ie: /media/disk) automatically via HALD.
This really is unfortunate because it appears that my /etc/udev/rules.d/10-udev.rules is being ignored and I am no longer getting devices created in /dev via udev.
For example, I had my Slack 10 udev.rules configured to assign like this:
Kingston thumbdrive = /dev/datatraveller
Crucial Gizmo thumb = /dev/gizmo
Lacie FireWire Ext HD = /dev/lacie
I am using the same udev rules in Slack 12 and they are being ignored completely.
The writeup by rworkman was helpful, but not what I was looking for overall. I stepped away from this issue end of last week and came back to it this morning. I still cannot get my 10-local.rules UDEV rule to correctly create dev nodes for me.
For simplicity sake, I just want to get my Lacie FW 160gb ext drive set to /dev/lacie so I can create an fstab entry for a specific mount point.
The writeup by rworkman was helpful, but not what I was looking for overall. I stepped away from this issue end of last week and came back to it this morning. I still cannot get my 10-local.rules UDEV rule to correctly create dev nodes for me.
And if you find that the drive does not seem to want to be recognized then install gscanbus using it as root making sure that the raw1394 module is loaded then you will need to use the rescan bus option a time or two until your drive shows up in the graphic viewer for it to work, firewire is a PITA USB works without the headaches for my drives.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.