Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Kernel & Hardware
  • Search

udev Alias Rules

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
3 posts • Page 1 of 1
Author
Message
anonybosh
Guru
Guru
Posts: 324
Joined: Sun Nov 20, 2005 1:45 am

udev Alias Rules

  • Quote

Post by anonybosh » Sun Feb 21, 2010 12:43 am

I have a couple of identical external USB drives that I would like udev to create symlinks to upon connect. However, the only static hardware descriptor that seems to differentiate between the different drives is the 'iSerial' that is output from lsusb. None of the attributes output by 'udevadm info --attribute-walk' seem to help (ATTRS{serial}=="0000:02:07.2" looks like a USB access path).
How can I 'access' this attribute via udev (for making a symlink rule)?

Thanks in advance!
-Ryan
Top
anonybosh
Guru
Guru
Posts: 324
Joined: Sun Nov 20, 2005 1:45 am

  • Quote

Post by anonybosh » Tue Mar 02, 2010 6:05 am

Bump!
Top
fangorn
Veteran
Veteran
User avatar
Posts: 1886
Joined: Sat Jul 31, 2004 1:31 pm
Contact:
Contact fangorn
Website

  • Quote

Post by fangorn » Tue Mar 02, 2010 10:09 am

This is possible, as udev can execute external programs at <event>, but in most cases is not necessary.

If you just want to get different devices to mount them to different places, I'd suggest using filesystem labels instead.

you can then mount the devices under

/dev/disk/by-label/<label>

for the usual filesystems you can change the label at any time (if not mounted). For example for XFS the command would be

Code: Select all

xfs_adm -L <label> /dev/<device>
Video Encoding scripts collection | Project page
Top
Post Reply

3 posts • Page 1 of 1

Return to “Kernel & Hardware”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic