udev Rules

January 27, 2007 at 7:29 pm 1 comment

I decided to format one of my flash drives as ext2. This creates a bit of a problem mounting the drives because the other is FAT16. Fortunately there’s a quick fix. (If you’re using udev) For the most part I used the tutorial on Arch Linux’s wiki. The ATTRS part didn’t transfer (not sure if it was just a Slackware or Arch thing or if the wiki entry was a little dated), but it works when SYSFS is used. Put your new rules in a file in /etc/udev/rules.d, restart udev, and plug/unplug your drives.

To get some information you might want to add to your rule run `udevinfo -a -p /sys/block/sda`

Here’s my new rules file:
KERNEL=="sd?", SYSFS{idVendor}=="08ec", SYMLINK+="vbtm"
KERNEL=="sd?", SYSFS{idVendor}=="054c", SYMLINK+="sony"

I’ll probably change SYSFS{idVendor} to SYSFS{serial} now that I figured out the ATTRS bit, and add partition numbering support. (add %n to the end of the SYMLINK) I also bought a new 300GB external hard drive (seagate) for backups, so I’ll need to add that to my rules file eventually.


Entry filed under: Hardware. Tags: , , .

State of the Union Managing your $HOME with Subversion

1 Comment Add your own

  • 1. dosnlinux  |  January 27, 2007 at 7:43 pm

    For the record, ATTRS replaces SYSFS in newer versions of udev, so use whichever is appropriate for you.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


%d bloggers like this: