Debian :: Use Udev Rules To Prevent HDDs To Change Device Instead Of Using UUID In /etc/fstab?

Dec 15, 2010

UUIDs make fstab hard to read, so.. Is it possible to use udev rules to prevent HDs to change device, instead of using UUID in /etc/fstab?

View 2 Replies


ADVERTISEMENT

Debian Configuration :: Udev / Systemd Change Some Rules In 8.0

Apr 18, 2016

I have SSD drives without SCT support, because of this I want to tune /sys/block/device-name/device/timeout in order to force mdadm put these drives offline. So, I can see my drive like this:

/dev/disk/by-id/ata-OCZ-SABER1000_A22MJ061512000074.

Where can I tune /sys/block/device-name/device/timeout from 30 to 7 sec only for these drive? I don't want to use rc.local.

Can I create right udev rules for it in /etc/udev/rules.d?

I want to avoid any conflict with /lib/udev/rules.d.

Code: Select all# udevadm monitor --environment --udev
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing

UDEV  [9302.549485] add      /devices/pci0000:00/0000:00:01.2/0000:03:00.0/host0/target0:0:0 (scsi)
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:01.2/0000:03:00.0/host0/target0:0:0
DEVTYPE=scsi_target
SEQNUM=5210
SUBSYSTEM=scsi

[Code] ....

View 0 Replies View Related

Debian Configuration :: Udev Rules To Change R/W Permissions?

Mar 28, 2011

I'm trying to allow non-root account to use avrdude to program mucrocontrollers. There are many articles online about how to do that, but it seems not to work for me. Every time i try to execute avrdude it says "permission denied". Here's "$ udevadm info --name=/dev/bus/usb/002/011 --attribute-walk" says looking at device '/devices/pci0000:00/0000:00:1d.1/usb2/2-1':

KERNEL=="2-1"
SUBSYSTEM=="usb"
DRIVER=="usb"
ATTR{configuration}==""

[code]....

However, after restarting udev, replugging the device, even rebooting the computer I still get "permission denied". The Vendor and Product match, so what's the problem?

View 7 Replies View Related

Red Hat :: Creating Raw Device Via Udev Rules

Apr 12, 2010

I have a Linux server that runs the Sybase DB. Sybase suggests using character devices to access raw devices rather than O_DIRECT to block devices, or cooked FS's. So, I went ahead and configured /etc/sysconfig/rawdevices as such:

/dev/raw/raw1 /dev/vg01/tempdb
/dev/raw/raw2 /dev/vg01/testdb
/dev/raw/raw3 /dev/vg01/fakedb ...

This works fine. I set 'chkconfig rawdevices on' and all is well. I read that this method is deprecated and went about trying to accomplish the same via Udev rules. I already use udev rules in /etc/udev/rules.d/60-raw.rules to set permissions on these devices, i.e.
ACTION=="add", KERNEL=="raw*", OWNER=="sybase", GROUP=="sybase", MODE=="0660"

That works fine. I even set symbolic links:
KERNEL=="raw1", SYMLINK+="vg01/rtempdb"
KERNEL=="raw2", SYMLINK+="vg01/rtestdb1"
KERNEL=="raw3", SYMLINK+="vg01/rfakedb2"

But I cannot seem to get the actual device creation piece to work within udev (it only works using rawdevices). I've tried:
ACTION=="add", KERNEL=="vg01/tempdb", RUN+="/bin/raw /dev/raw/raw1 %N"

No errors, but nothing happens. The device just doesn't create. I've also tried doing it by passing major and minor numbers. Is it possible to get all of this into udev rules or am I stuck with rawdevices? I'm also utterly confused as to the future of rawdevices... the raw man page said it was deprecated, and now at v5.5 it has that piece taken out. Also RHEL 5.3 dropped support for rawdevices in initscripts only to add itback in 5.4. I'm an admin, not a DBA, so I cannot say if this is a bad or good way, only that it is the way the vendor supports and recommends, so it is the way that I must go... just trying to make it work as "un-deprecated" and cleanly as possible.

View 1 Replies View Related

Fedora :: Udev Rules For Using USB Device Not As Root

Oct 15, 2010

Having finally made the switch from Windows (7 Professional) to Linux (Fedora 13) on my laptop, I'm now trying to get all my devices working, specifically an Olympus VN-4100PC Digital Voice Recorder. I've installed odvr and it works in root, but not as a normal user. The installation instructions say: odvr *requires* access to the user-space USB interface.

It is recommended to place "41-odvr.rules" into "/etc/udev/rules.d" or setup your own udev rules rather than running odvr as root. After changing udev rules, don't forget to run "udevcontrol reload_rules" and to replugin your DVR. Again, root privileges are required unless udev is properly setup. The file "41-odvr.rules" (designed for Ubuntu) has the following content:
SUBSYSTEM=="usb", SYSFS{idVendor}=="07b4", SYSFS{idProduct}=="020d", ACTION=="add", GROUP="audio", MODE="0664"

I tried just doing what it said and copying it to "/etc/udev/rules.d" but it didn't seem to work. Looking at other files, I then changed it to:
SUBSYSTEM=="usb", ATTR{idVendor}=="07b4", ATTR{idProduct}=="020d", ACTION=="add", GROUP="audio", MODE="0664"

And now if I do "ls -l /dev/bus/usb/002", I get:
crw-rw-r--. 1 root audio 189, 134 Oct 15 01:21 007

Which seems to suggest that it is running the "41-odvr.rules" file, since lsusb gives:
Bus 002 Device 007: ID 07b4:020d Olympus Optical Co., Ltd Digital Voice Recorder VN-240PC

But odvr still doesn't work as a normal user, giving:
Failed to open Olympus device: couldn't claim interface

View 2 Replies View Related

General :: How Udev Rules Work To Create Device Files

Jun 2, 2010

how udev rules work to create device files. Following is what I did for that: Up on plugging in my phone (sony w800i), I am getting a device file 'devcdc-wdm0' created. I just tried to figure out the rule which is responsible for the creation of this particular file.

I searched in 'etcudev ules.d' and 'libudev ules.d' for the string 'cdc-wdm' to find that rule. But I am not getting any hits in that search. Could any one help me out in this one.

BTW: I am using Ubuntu 9

View 6 Replies View Related

Debian Configuration :: Udev Static Device Change From Wheezy To Jessie

Sep 9, 2015

I am using a 3rd party kernel driver that does not support udev properly. When I was using wheezy I placed the required device files in /lib/udev/devices.

The udev in jessie does not appear to support this. Is there any way to have udev create these device files or will I have to create then using a script at boot-up?

View 1 Replies View Related

OpenSUSE Install :: Pc Not Starting After Change In Fstab Options ( Uuid )?

Jan 31, 2010

all of a sudden my pc decided no to start anymore.YOu might be aware of the ide/sata driver problem, well it was the problem. I reinstalled grub with suse dvd and it went ok. Pc working properly. But then i tried to fix this once for all and changed the fstab options from /dev-by-id to uuid (all partitions : swap, /, /home etc ).Is uuid a definite solution ?Why is the pc not able to start from there ?

Since i moved the partitions with uuid option in fstab and even after reinstalling grub the pc is not starting anymore . It gives me the boot menu (linux suse/failsafe) and then a black screen left with no keyboard nor mouse available.

[Code]...

View 9 Replies View Related

Ubuntu :: Safe To Change Fstab UUID Entry For The System To /dev/sdb4?

Nov 13, 2010

is it safe to change fstab UUID entry for the system to /dev/sdb4? and after editing fstab, is there a script or command I need to run to release lock or update mount information? edit: I see not correct, and therefore not safe,but is there a format to tell linux to use /dev/sda1 instead of UUID= or label= .

View 9 Replies View Related

Ubuntu :: Can't Create File /etc/udev/rules.d/70-android.rules?

Jun 19, 2011

I need to create filename 70-android.rules in the directory /etc/udev/rules.d/I have Adm privileges in my user account properties, but when I use sudo to create this file the Ubuntu OS does not allow me the privilege... I am running Ubuntu 10.04 LTS and here's the Terminal output below:daddy@gatomon-laptop:/etc/udev/rules.d$ sudo cat > 70-android.rulesbash: 70-android.rules: Permission denieddaddy@gatomon-laptop:/etc/udev$ ls -ltotal 8drwxr-xr-x 2 root root 4096 2011-03-16 18:03 rules.d-rw-r--r-- 1 root root 218 2010-04-19 04:30 udev.conf

View 2 Replies View Related

Debian Hardware :: Udev Rules For Partitoned Usb?

Apr 23, 2011

I am using Debian Squeeze on my laptop an now I want to write udev rules. I bought an USB enclosure for my old Desktop HDD drive (Debian lenny ). But when I plug it in only the first primary partition gets mounted so I can not copy the data from my old desktop to the laptop. the output of mount shows that the following disk was mounted/dev/sdb1 on /media/disk type ext3 (rw,nosuid,nodev,uhelper=hal)

I can cd into /media/disk/etc and cat fstab shows the following:
# /etc/fstab: static file system information.
#

[code]...

View 1 Replies View Related

General :: Fstab Sdxx Or Uuid Or / Disk And Partitions In The Fstab File?

Jan 5, 2010

What would be the best way list disk and partitions in the fstab file?

View 1 Replies View Related

Hardware :: Changes To Fstab (UUID's) / Revert Fstab's Listings Back To The Old /dev/hd Settings?

Jan 15, 2010

I've had two hd's in my box forever. for more space and backup reasons. Well I have started running the Debian Squeeze distro since December. I've had many issues, some are still unresolved. but now I'm running into major headaches with the fstab. Specifically dealing with/wondering why UUID's are used instead of the old /dev/hd? I was a little annoyed when I tried Kubuntu to find /dev/sd? used instead of /dev/hd? but that was workable. But the UUID's are a nightmare. Here's my problem.

My main box is finally giving up the ghost. The mobo is dying. So in order to do some tests I took my hd bundle (my two hard drives with their cables) physically out of the box and temp installed them in a test box. I wanted to do some benchmark and other tests. I got all kinds of errors. I found that the system wasn't recognizing the UUID's listed in fstab. My concern is when the new mobo gets here next week I won't simply be able to plug the hd's in like I always have been and just let Linux reconfigure itself (Debian used to be good about this). I really don't want to have to clean reinstall if it's not needed.

So for this I have two questions. WHY developers decided to drop using /dev/hd? or even /dev/sd? ?

And is it possible to revert fstab's listings back to the old /dev/hd? settings. In debian fstab had lines commented out showing how each partition was listed in it's /dev/hd? status during install.

I'm getting really sick of all these archane changes in ALL aspects of linux that don't seem to have any good explaination or need.

View 4 Replies View Related

Debian :: Custom Udev Rules Not Taking Place?

Mar 20, 2011

I'm trying to write udev rules to make it easier to recognize the network cards in my server. After a reboot it doesn't seem to take place, what am I doing wrong? I'm running Debian Squeeze stable.

Code:
$ uname -a
Linux debian 2.6.32-5-amd64 #1 SMP Wed Jan 12 03:40:32 UTC 2011 x86_64 GNU/Linux
Code:
# ls -l /etc/udev/rules.d/
total 4

[Code]...

View 3 Replies View Related

Debian :: Reset/remove Udev Persistent-net-rules?

Apr 30, 2011

I should create a sqeeze image and install it on other computers.Udev should detect network card (NIC) module and load it automatically at startup.How I understand /lib/udev/rules.d/75-persistent-net-generator.rules runs when udev starts, then writes to /etc/udev/rules.d/70-persistent-net.rules.The problem is, udev searches for this NIC on other hardware and the network cannot start.I can solve this problem easily using a startup script to delete /etc/udev/rules.d/70-persistent-net.rules file.

View 2 Replies View Related

Debian :: Write Udev Rules In Order To Automount Usb Pendrive?

Oct 9, 2010

im using Debian (lenny) with 2.6.26 kernel, I'm trying to write udev rules in order to automount my usb pendrive, so I added this rules in udev:

SUBSYSTEM=="block", SUBSYSTEMS=="scsi",ATTRS{vendor}=="OTi ",
ATTRS{model}=="Flash Disk ", NAME="penna128M",RUN="/usr/bin/
pmount /dev/penna128M"

I use pmount to install the device as normal user If i connect my device to the usb port I don't see nothing in /media/penna128M, BUT giving at the prompt cat /etc/mtab the last line is:

/dev/penna128M /media/penna128M vfat rw,noexec,nosuid,nodev 0 0

The line in fstab about this pendrive is:

/dev/penna128M /media/penna128Mvfatdefaults,user,owner,auto00

View 5 Replies View Related

Debian Configuration :: Synaptics Udev Rules Ignored After Yesterdays Upgrade?

Apr 14, 2010

After yesterdays upgrade of Squeeze, my Synaptics touchpad's udev configuration is ignored on my EeePC. It was working fine before. Are there any changes in how it is supposed to be configured or is it just broken?

View 3 Replies View Related

Debian :: Hardcode Device Input Using Udev?

Jun 7, 2011

My touchscreen "LG Display LGD-MultiTouch" will be recognized sometimes as /dev/input/event0 and sometimes as /dev/input/event3. How to hardcode /dev/input/event0 using udev and xorg.conf?

Code:
# cat /proc/bus/input/devices
I: Bus=0003 Vendor=1fd2 Product=0064 Version=0100
N: Name="LG Display LGD-MultiTouch"
P: Phys=usb-0000:00:1d.7-4.1/input0
S: Sysfs=/devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4.1/1-4.1:1.0/input/input0
U: Uniq=
H: Handlers=mouse0 event0
B: EV=1b
B: KEY=403 0 30000 0 0 0 0 0 0 0 0
B: ABS=700 3f
B: MSC=10

# udevadm info --query=all --path=/devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4.1/1-4.1:1.0/input/input0
P: /devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4.1/1-4.1:1.0/input/input0
E: UDEV_LOG=3
E: DEVPATH=/devices/pci0000:00/0000:00:1d.7/usb1/1-4/1-4.1/1-4.1:1.0/input/input0
E: PRODUCT=3/1fd2/64/100
E: NAME="LG Display LGD-MultiTouch"
E: PHYS="usb-0000:00:1d.7-4.1/input0"
E: UNIQ=""
E: EV==1b
E: KEY==403 0 30000 0 0 0 0 0 0 0 0
E: ABS==700 3f
E: MSC==10
E: MODALIAS=input:b0003v1FD2p0064e0100-e0,1,3,4,k110,111,140,141,14A,ra0,1,2,3,4,5,28,29,2A,m4,lsfw
E: SUBSYSTEM=input

View 3 Replies View Related

Debian :: Change The UUID Of A Partition?

May 9, 2011

I have, as I have in the past, copy/pasted a partition using gparted to get a working OS to another place.

I have always done this in the past to a different drive. Never paid much attention to the UUID.

This time I did it on the same drive. The partitions have the same UUID. This is not a good thing.

The copied OS boots and mounts fine as I edited the fstab to go by /dev/sdxy (where x is the drive and y the partition). My grub uses a custom menu using symbolic menu entries so it goes by the partition definition instead of UUID too.

I would really like to change the UUID on that partition.

View 8 Replies View Related

Ubuntu :: Add A File To /lib/udev/rules?

Sep 28, 2010

I tried searching for an explanation on howto add a file but couldn't find anything.

View 5 Replies View Related

Hardware :: Listing Udev Rules Currently Used?

Apr 24, 2010

I am trying to list udev rules for devices ( similar to lshal ). lsdev is not listing what i want. trying to write udev rule for ALSP touchpad. Upon reading the guide at this site, I am not seeing the ../10_local.rules which is indicated as the correct pat to save user defined udev rules.

Code:

ls /etc/udev/rules.d

Would I be correct in assuming that I save my rule as

Code:

/etc/udev/rules.d/mouse.rule

Device ID:I am confused also as to which device is actually being used! running

Code:

cat /proc/bus/input/devices

i get a return with these entries:

Code:

I: Bus=0017 Vendor=0001 Product=0001 Version=0100
N: Name="Macintosh mouse button emulation"
P: Phys=

[code]....

I have followed howtos as listed here, here, and here. Am I not pointing my mouse.rules to the correct location? Maybe my issue is that I followed howtos from varied sources.the mouse.rules i put in /etc/udev/rules.d/mouse.rules had no effect.

View 7 Replies View Related

Debian Configuration :: Udev Script To Run Service On Device Insertion

Jan 24, 2010

I have just bought a DVB-T usb dongle to watch some TV. The software I'm using is vdr, which has to be started through the /etc/init.d/vdr service. I have created a udev script that executes the service on device insertion. It works nicely, however now when I boot up the computer it takes ages to get to desktop. I believe it is because of the WAIT_FOR part. But without this part, the service starts too soon because the usb dongle has been inserted but the firmware has not finished loading. Can someone point out an alternative way to do it? The script is here [URL].

View 4 Replies View Related

Hardware :: Using UUID Or LABEL In Fstab And Menu.1st?

Apr 9, 2010

I have a question about mounting partitions. I thought of using UUID or LABEL in fstab and menu.1st Is there an advantage of one over the other?

View 5 Replies View Related

Ubuntu :: Udev Rules For Multiple USB GSM Modem?

Oct 20, 2010

I have a question related on udev rules. I have a SMS Gateway project using multiple usb gsm modem. I use huawei modem for this project. My goal are every time I plug in huawei devices on my ubuntu box it automatically mounts on specific ttyUSB port

e.g.
huawei 1 -> ttyUSB1
huawei 2 -> ttyUSB2

My problem are to meet this goal i must find unique data between different huawei devices (e.g. productID, vendorID, serial). In huawei product this information are the same with all devices.There is only one unique on every huawei devices. That is IMEI value. How can use this value or find this value for udev rules.

View 1 Replies View Related

Software :: New UDev Rules Set Breaking Functions

Jul 9, 2010

On my Sid box, I did an update and it appears it also updates udev's rule set that doesn't like the notion of dm-crypt or LVM. For example:

Code:
trilarian@Debian-Desktop:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/dm-1 9.9G 2.4G 7.1G 26% /
tmpfs 438M 0 438M 0% /lib/init/rw
udev 10M 192K 9.9M 2% /dev
tmpfs 438M 0 438M 0% /dev/shm
/dev/md0 94M 83M 12M 88% /boot
/dev/dm-2 1008M 630M 328M 66% /var
/dev/dm-3 600G 291G 310G 49% /home
When I used to run df I would get lvm/dm name instead of number, like:
Code:
/dev/mapper/raid-root 9.9G 2.4G 7.1G 26% /
What I need to change in udev to restore the old function?

View 1 Replies View Related

Networking :: Ubuntu 10.04 Ignores Eth Udev Rules

Jan 6, 2011

For some reason, Ubuntu keeps assigning my network interface wrong MAC address. This happens only after fresh boot (I have dual boot with WinXP, if I start Windows first and then restart to Ubuntu without switching computer off, the MAC is correct). Contents of /etc/udev/rules.d/70-persistent-net.rules:

Code:

# PCI device 0x10ec:0x8136 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:22:19:ef:1c:3d", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x168c:0x001c (ath5k_pci)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:17:c4:78:f4:f8", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

[code]....

EDIT: I made a workaround by adding

Code:

auto eth0
iface eth0 inet dhcp
hwaddress ether 00:f3:f5:ef:fe:56

to /etc/network/interfaces and it works. However, I'd still like to know why Ubuntu ignores my udev rules, regardless whether the workaround happens to work or not...

View 1 Replies View Related

General :: Udev Rules Aimed For USB Drives Only?

Mar 14, 2011

I have written a udev rule as follows:Code:RUN+=/.../.../example.shWhenever i plug in a USB drive, this rule is executed, however it is also done when i plug in a dongle for WiFi. How do i make this udev rule specific for USB drives only. In other words this script should be run for USB devices only.

View 3 Replies View Related

Red Hat :: 50-udev.rules Causes Start_udev To Hang On Boot?

Aug 14, 2010

I've been having problems with start_udev on my machine post kernel 2.6.18-162 on my CentOS machine. A previous install would work on the old kernelut not the newer ones. I recently did a completely fresh install of CentOS 5.5o see if maybe there was a orruption in my install when it upgraded,t I still have the problem of udev hanging on startup.Using the rescue option on the disk, I've managed to track the problem down to the 50-udev.rules file. Through trial and error, I moved all the .rules files out of the rules.d directory, and added them back one at a time to see which one(s) caused the system to hang, and which ones it carried on booting as normal with. The only one that causes it to hang is the 50-udev.rules.

From what I can tell, this rules file is responsible for letting udev check various pieces of hardware. I think that it is failing whent runs modprobe on a pci device address.Only problem is I don't understand the rules file syntax, so I don't know if I can simply comment out or change a line in this file to skip the device that its looking for.Can anybody help me track down the specific device/line that is doing this?(I've kept the file out of the folder for now and my system appears to continue operating, but I get the occasional problem that for all I know could be due to udev not having a complete start up).

View 6 Replies View Related

Debian Installation :: Why Does 8.2 Change UUID Of Swap Drive

Dec 14, 2015

Been doing some installations in a newly upgraded machine where I'm setting up two instances of 8.2 in slightly different configurations.Installing from netinst AMD64 DVD with firmware non-free. First installation goes smooth as then the second changes the UUID of the swap partition, meaning that the first then can't find it. To add insult to injury the second installation doesn't install GRUB in the MBR of the HDD.

Nothing different or special about the installation which is standard graphical with manual allocation of previously set up partitions. I don't touch the swap drive in the partitioner - just point to the correct partitions for / and /home as I want them. This is exactly as I've done before, many times.Setup asks me if I want to install GRUB in MBR and I answer "No" (because it would otherwise load in MBR of sda where I want it on sdb) then point to sdb in the next screen. Again really nothing different to what I've done dozens of times.

View 7 Replies View Related

Ubuntu :: 10.04 Install - Disabling UUID In Grub2 And Fstab?

Nov 25, 2010

For reasons long and unique, I want to disable UUID in my recent Ubuntu 10.4 install, and use the old fashioned /dev/sda1 /dev/sdb3 etc. method. I had this "all fixed" under GRUB (pre-2) on Ubuntu 8.04 and it has served well and bug free for years. (Warning: I use old stable hardware - others may have disasters.) But with GRUB2, the task seems more complicated. (This guide me make the backups I haven't done since the fresh install 2 weeks ago.)

Is the following process complete, necessary, and accurate...
Edit the file /etc/default/grub to remove the # in the line...
#GRUB_DISABLE_LINUX_UUID="true"
... making sure to add the two " if missing .....

Copy nearly the entire /boot/grub/grub.cfg file
into /etc/grub.d/40_custom and then...
Comment out every line that says...
search --no-floppy --fs-uuid --set (etc.)

Change every line that says...
linux /boot/vmlinuz-2.x.yy-zz-generic root=UUID=(etc.) into...
linux /boot/vmlinuz-2.x.yy-zz-generic root=/dev/sda1
Edit /etc/fstab and change every instance of UUID=(etc.)
to the appropriate drive and partition e.g. /dev/sda1

edit /etc/initramfs-tools/conf.d/resume and change RESUME=UUID=(etc.)
into RESUME=/dev/sda1
Run update-grub

Do all the above, every time I do a kernel upgrade. (Is it important to do all the above before or after rebooting for an upgrade?) Am I correct, succinct, and complete in the above process? Any mistakes? Any omissions?

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved