Questions tagged [udev]
111 questions
2
votes
5 answers
How to change persistent-net-generator.rules to be PCI bus dependent and not MAC based?
I am using CentOS 6.2 with VMware. I often have to clone my systems. Every time I clone it is adds a new rule to 70-persistent-net.rules file like so.
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:0c:f1:5e",…

xsaero00
- 255
- 3
- 10
2
votes
2 answers
/lib/udev/net.agent causing high CPU usage
We have a number of Soekris boxes running Debian Squeeze. They were installed through an automated process consisting of using deboostrap and copying it unto a Compact Flash card. We use puppet to manage the configuration of all these boxes.
Before…

Antoine Benkemoun
- 7,314
- 3
- 42
- 60
2
votes
1 answer
RHEL8: How to use UDEV to set SR-IOV VF Interface name
The SR-IOV VF is persisted over boot with
nmcli connection modify sriov.total-vfs 3
nmcli connection modify connection.autoconnect true
Then it would create VF interface names like v0-v2.
I would like to change that and tried to…

user892960
- 151
- 4
2
votes
0 answers
Autofs and udev rules to restrict usb permissions to groups
I need some help trying to figure out how to restrict the reading and writing access of usb devices.
There are two groups on my system:
usbreaders: only should have rights to access and read the usb
content.
usbwriters: should have reading and…

DG DM
- 35
- 5
1
vote
0 answers
LV creation on CentOS 7.7
[root@kvm3 ~]# lvcreate -L 2G storage-3 -n testing
/dev/storage-3/testing: not found: device not cleared
Aborting. Failed to wipe start of new LV.
It works fine with the following -Z option.
[root@kvm3 ~]# lvcreate -L 2G storage-3 -n testing -Zn
…

Jevin Gala
- 59
- 9
1
vote
0 answers
If statements in udev rules
Is it possible to make statements in udev rules via if, else or case?
I imagine something like:
if [ $HOSTNAME == "host1" ]
then
ATTRS{idVendor}=="04a9", ATTRS{idProduct}=="", SUBSYSTEMS=="usb", MODE="0660", GOTO="local_usb_end"
fi
I did not…

Nico
- 135
- 4
1
vote
1 answer
Dont use /dev/sd* for removable device
Today I almost erased my system with dd because I was going to write on my internal HDD (/dev/sdb*) instead of the removable usb (/dev/sdc*).
I want to make a udev rule to set any block usb under a completely different name, like /dev/remX*
Where X…

Lesto
- 111
- 4
1
vote
1 answer
Start Webcam App With Systemd On Linux
I have a simple application which streams video with a webcam called "streamer". I'd like to start "streamer" when my Linux device boots with systemd.
Next, I have the following systemd, service file,…

Frederick Ollinger
- 203
- 2
- 8
1
vote
1 answer
Why does /dev/disk/by-id directory have cdrom device only and which one of /dev/disk/by-X is recommended for creating zfs pools?
Im running a ubuntu 16.04 machine in esxi enviroment, i am going through zfs on linux faq and it recommends to use /dev/disk/by-id for home servers due to inconsistent nature of /dev/sdX names but when i list files on /dev/disk the by-id only have…

sherpaurgen
- 616
- 6
- 10
- 26
1
vote
1 answer
swapon & hibernate on power key
I have a laptop & I run Arch Linux. My laptop has a spinning hard drive rather than an SSD, so I hate swap. However, I need one to hibernate, and I want my laptop to hibernate every time power key is pressed or battery runs low. My idea now is to…

Ignat Insarov
- 121
- 3
1
vote
0 answers
Scriptless automount for systemd Linux systems
What is the proper way to do a boot/hot-plug automount for ATA and USB storage devices on Linux systems using systemd without requiring a GUI or a user having to be logged in?
It seems that calling mount from a udev rule is no longer acceptable with…

user339676
- 171
- 5
1
vote
0 answers
gnome -- create symlinks when mounting a file system
I'm not 100% sure where the problem is... udev or gnome or ...
Backstory:
I have an "IronKey". I have a udev rule that allows my IronKey to plug into my machine. After I've plugged it in, I go to the gnome desktop, select "Places" / "IronKey" ,…

hymie
- 424
- 2
- 11
1
vote
3 answers
Add swap partition on zram device using udev rule
System: CentOS 7
cat /etc/udev/rules.d/10-zram.rules
ACTION=="add", SUBSYSTEM=="block", KERNEL=="zram0", DRIVER=="", ATTR{disksize}=="0", ATTR{disksize}="512M", RUN+="/usr/bin/systemd-run /sbin/mkswap $env{DEVNAME}"
(/sbin/mkswap didn't work for me…

HTF
- 3,148
- 14
- 52
- 82
1
vote
1 answer
Udev rule for changing 'max_sectors_kb' for all 'sd*' devices
I am having a problem creating a udev rule that sets max_sectors_kb to 1024 for sd* (sda,sdb,sdc etc...) devices under /sys/block/.
Specifically, a recent kernel change means the max IO is too large for my iSCSI SAN so I am trying to set it to 1024…

tomstephens89
- 1,011
- 1
- 12
- 24
1
vote
1 answer
Disk renaming udev rule
I have two separate controllers, SATA and PATA.
I would like to rename drives connected to the PATA to hd[a-z], and their partitions to hd[a-z][0-9].
# udevadm info -a -p /sys/block/sdd
[...]
looking at device…

udev
- 11
- 4