LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
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



Reply
 
Search this Thread
Old 09-07-2008, 05:26 PM   #1
FederalPosterChild
LQ Newbie
 
Registered: Jul 2006
Posts: 3

Rep: Reputation: 0
Any guess as too why this udev rule is not working?


I am using Ubuntu hardy and set up my swap as per this How-To.

I would now like to do get rid of the bootmisc.sh step and use udev instead...
Code:
SUBSYSTEM=="block", ATTRS{serial}=="SNDKA96735037AA03903", NAME="%k", RUN+="/bin/echo 1024 > /sys/block/%k/device/max_sectors", SYMLINK+="SwpNodA", OPTIONS+="last_rule"
But the max_sector value hasn't changed... the command works fine in root terminal.

udevtest shows
Quote:
udevtest: looking at device '/block/sdb' from subsystem 'block'
udev_rules_get_name: add symlink 'SwpNodA'
udev_rules_get_name: rule applied, 'sdb' becomes 'sdb'
udev_device_event: device '/block/sdb' already in database, cleanup
name_index: removing index: '/dev/.udev/names/sdb/\x2fblock\x2fsdb'
name_index: removing index: '/dev/.udev/names/SwpNodA/\x2fblock\x2fsdb'
udev_node_add: creating device node '/dev/sdb', major=8, minor=16, mode=0660, uid=0, gid=0
udev_node_mknod: preserve file '/dev/sdb', because it has correct dev_t
name_index: creating index: '/dev/.udev/names/SwpNodA/\x2fblock\x2fsdb'
name_index: creating index: '/dev/.udev/names/sdb/\x2fblock\x2fsdb'
udev_node_update_symlinks: update symlink 'SwpNodA' of '/block/sdb'
udev_db_get_devices_by_name: found index directory '/dev/.udev/names/SwpNodA'
update_link: found 2 devices with name 'SwpNodA'
update_link: found '/block/sdb' for 'SwpNodA'
update_link: compare (our own) priority of '/block/sdb' 0 >= 0
update_link: found '/block/sdb/sdb1' for 'SwpNodA'
update_link: compare priority of '/block/sdb/sdb1' 0 > 0
update_link: 'SwpNodA' with target 'sdb' has the highest priority 0, create it
node_symlink: found existing symlink '/dev/SwpNodA'
node_symlink: preserve already existing symlink '/dev/SwpNodA' to 'sdb'
udevtest: run: '/bin/echo 1024 > /sys/block/sdb/device/max_sectors'
Any thoughts?

Last edited by FederalPosterChild; 09-07-2008 at 05:27 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
udev rule: need help DPenguin Linux - Hardware 0 08-04-2008 08:29 PM
Udev Rule Help Please Toods Slackware 1 11-23-2007 09:55 AM
need help with udev rule hussam Linux - Software 2 12-05-2006 04:30 AM
udev rule for usbstick Steve50 Slackware 5 10-13-2006 06:53 AM
udev-Rule for Mobile tuxangler Linux - Hardware 1 03-28-2006 06:41 AM


All times are GMT -5. The time now is 05:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration