Questions tagged [udev]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
57 views

Script to monitor mounted usb key

My issue Hello, I'am currently working a project to monitor files copied to a usb key. I'm using a udev to start an inotify script. I'm currently struggling to find when the usb key is mounted and get ...
p1r4t3's user avatar
  • 11
2 votes
0 answers
103 views

Fix kickstart drift between CentOS 8 Stream behavior and CentOS 9 Stream behavior

I'm facing a weird situation on one of my server on the provisioning process. Here is the machine HW Model: HPE Proliant DL365 Gen 10 Plus with 6x 1.9TB SATA 6GBps SSD disks. What's going on: When I'm ...
Dr I's user avatar
  • 975
0 votes
0 answers
32 views

/dev/zvol/pool/group/srv points to partition zd0p16 not volume zd0 - bug or feature?

I am only starting to get familiar with openzfs 2.2.0 on Linux (Ubuntu kernel 6.5) and immediately ran into something strange. A symlink I was expecting to point to a zvol block device.. was pointing ...
anx's user avatar
  • 9,708
2 votes
1 answer
279 views

RHEL8: How to use UDEV to set SR-IOV VF Interface name

The SR-IOV VF is persisted over boot with nmcli connection modify <PF> sriov.total-vfs 3 nmcli connection modify <PF> connection.autoconnect true Then it would create VF interface names ...
user892960's user avatar
0 votes
0 answers
13 views

detect when sssd connects to the ladp server and finds a specific group in boot

I am looking to find a way so when system is booting , i can detect when sssd connect to LDAP server and finds a specific group then reload the systemd-udevd. i actually want to automate all of these ...
bani's user avatar
  • 1
1 vote
0 answers
70 views

Swap disk devices in RHEL 8

I need to swap a couple of disk devices around on a RHEL 8 server because it's unfortunately going to be problematic to rebuild it and I need the devices in a specific order. I think the following ...
DirkG's user avatar
  • 11
0 votes
0 answers
265 views

Allow a systemd service access to /sys/…/energy_uj - udev rule changing owner having no effect?

I'd like to collect the my CPU power usage on some "plain" linux boxes (i.e. no fancy things like VMs or let alone K8s) via scaphandre or prometheus_node_exporter, running as systemd service ...
Caesar's user avatar
  • 111
0 votes
2 answers
75 views

Howto prevent udevd wrongly enqueues remove event for device ppp?

Connecting a PDA device with Debian using SynCE, USB serial device is recognized and connects with ttyUSB bus, obtains an IP address and disconnects after a few seconds (two, max three). This is how ...
Gustavo's user avatar
6 votes
2 answers
613 views

How to name drives according to their position in a multi-bay enclosure?

It is important to know a position of a bad drive in a multi-bay device, however default naming of drives e.g /dev/sda, /dev/sdb etc. does not provide a clue where a particular drive is residing ...
dimus's user avatar
  • 337
0 votes
1 answer
266 views

During which dracut hook can a PXE client rename predictable interfaces names with a udev rule?

tl;dr: During load of an initramfs (execution of dracut modules) on a PXE client, I need to rename the kernel-given (predictable) interface names (right now they're unpredictable ethX names). This way,...
brimhalgh's user avatar
0 votes
2 answers
646 views

How to deal with dynamic drive name when device mounting hard drives to LXC on Proxmox?

Question Setup On a Proxmox server I create an LXC container with: pct create 101 local:vztmpl/centos-8-default_20201210_amd64.tar.xz --features mknod=1,nesting=1,fuse=1 --ostype centos --storage=CTVM ...
mikeLundquist's user avatar
0 votes
2 answers
88 views

Permissions of /dev/null wrong in KVM guest

My host node is RHEL7 running KVM from the 'updates' repo. On the host node, the permissions for /dev/null are: crw-rw-rw-. 1 root root 1, 3 Dec 18 04:45 /dev/null In an Alpine KVM guest (5.14, but ...
tater's user avatar
  • 1,475
0 votes
0 answers
194 views

Remote access to `/dev/input` fails with permission error

I need to open a USB game controller device (joystick) remotely. This device is physically connected to server and is available for local user with permissions: crw-rw-r--+ 1 root input 13, 0 ** /dev/...
zlg's user avatar
  • 1
-1 votes
1 answer
165 views

Why are some of my Secondary IPs missing after a YUM update on Amazon Liunx 2

On Sunday, I did a Yum Update on my Amazon Linux 2 instance (a T2.Medium) and after the update only 2 IP addresses per interface were working. Before the update I had 6 IPs per interface. It looks ...
iewebguy's user avatar
  • 213
0 votes
0 answers
96 views

USB Drive at the same location on FreeBSD

I have a number of USB drives that are attached to a FreeNAS server. These are then used as offline backup targets. One problem is that the order that the drives are plugged into matters. On a Linux ...
tl8's user avatar
  • 131
0 votes
1 answer
71 views

Debian/Ubuntu, inconsistency between S-ATA ports numbering and /dev/sdX lettering [closed]

The hardware situation is as such : a motherboard (MSI X99A SLI Plus), two (2) Samsung 860 Pro SSDs connected on SATA-1 and SATA-2 of the motherboard. five (5) identical HDDs connected on SATA-3, ...
Annoying Technology's user avatar
2 votes
0 answers
183 views

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 ...
DG DM's user avatar
  • 35
0 votes
0 answers
610 views

How to populate /dev/input?

I have a fully working (for this part) embedded system based on a rather ancient, vendor-modified, Linux v3.18.29. To solve other problems I am in the process of upgrading everything to current u-...
ZioByte's user avatar
  • 296
0 votes
1 answer
5k views

udev rules not working

sorry for my English.... I am with Linux Mint I to try to change my interface name but without result... The steps which I to does... First search for my interface name and mac from it, ip a to ...
dsaj34v's user avatar
1 vote
0 answers
339 views

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. [...
Jevin Gala's user avatar
1 vote
0 answers
570 views

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", ...
Nico's user avatar
  • 135
9 votes
3 answers
7k views

How to determine "Predictable Name" of network interface

I am setting up a new server and installed Ubuntu Bionic, which uses Predictable Network Interface Names. The installer is running on a rescue system, which still uses old interface names like eth0, ...
pymkin's user avatar
  • 255
0 votes
0 answers
106 views

X-Org Server - Identify USB Unplug event

In our X-Org server setup, if the server is running and we unplug the USB Mouse then the server doesn't really do anything (no errors or warnings.) If we replug the device, even then the server doesn'...
Beenish Khan's user avatar
2 votes
2 answers
892 views

Assign static id to usb printer

I have three usb receipt printers from the same vendor (thus the same usb vendor and product id) plugged into the same server and I need to be able to issue separate printing commands to each of them. ...
user1494162's user avatar
1 vote
1 answer
361 views

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 ...
Lesto's user avatar
  • 111
1 vote
1 answer
2k views

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's user avatar
1 vote
1 answer
880 views

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 ...
sherpaurgen's user avatar
0 votes
1 answer
850 views

How to findout if haldaemon is being used or udev in RHEL server?

I am quite confused if hal is really in use or just udev. What I understood: In general, HAL is an abstraction layer that allows an operating system to interact with a hardware device. And daemon ...
GP92's user avatar
  • 741
0 votes
1 answer
320 views

Right network interface autodetect and get dhcp while boot

While preparing the mini forensic system I hung on a problem: Let us imagine, we prepare a usb-flash booted linux for lot of diferent workstations. While setting up the network (ipv4 dhcp) we can find ...
schweik's user avatar
  • 263
3 votes
2 answers
3k views

SATA disks being identified as SCSI

I have two identical servers with same hardware and cloned Linux OS. They both have Supermicro HBA AOC-S3008L. Yet one server identifies SATA disks as SCSI while the other one correctly identifies ...
Nima Mohammadi's user avatar
0 votes
0 answers
732 views

Run script after plugging in USB device of certain vendor ID and product ID

I have a USB device and I need to execute a "infinite" script when I plug in this device and pass the /dev/... path as an argument. The real example is: The device is RFID reader (0403:6001), which ...
mkudlacek's user avatar
  • 1,677
1 vote
1 answer
817 views

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 ...
Ignat Insarov's user avatar
3 votes
2 answers
846 views

Loopback interface is renamed to rename1

On my Ubuntu 17.04 Server the Loopback Interface keeps beeing renamed to "rename1" during boot (Syslog: rename1: renamed from lo). I tried to disabling renaming by editing grub.conf: ...
mjr's user avatar
  • 31
0 votes
2 answers
3k views

Why does udevadm not provide me a disk serial number when hdparm can?

Compare: root@home:~# hdparm -I /dev/sdb | grep Serial Serial Number: WCJ025C8 Transport: Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3....
Brad's user avatar
  • 289
2 votes
0 answers
567 views

Automount ATA/SCSI drives with systemd

I am attempting to automatically mount all ATA/SCSI drives on boot using systemd and udev without utilizing /etc/fstab. This is necessary because filesystems need to be mounted on directories named ...
user339676's user avatar
1 vote
0 answers
217 views

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 ...
user339676's user avatar
3 votes
2 answers
8k views

Change interface mac (hw) address using udev rules

I want to set a specific ethernet MAC address for an interface using UDEV rules. I have the following rule: SUBSYSTEM=="net", ACTION=="add", ATTRS{serial}=="50B123", ATTR{address}="00:22:33:44:55:AA", ...
Konrads's user avatar
  • 880
1 vote
0 answers
64 views

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 ...
hymie's user avatar
  • 424
0 votes
0 answers
304 views

apt-get upgrade fails because of max recursion on udev

When i´m doing a apt-get upgrade on my debian jessie ( a vserver from hetzner) machine, i get an error on upgrading the udev package. The Error Output starts with this: addgroup: Die Gruppe »input« ...
develth's user avatar
  • 101
5 votes
1 answer
3k views

Calling lvcreate from inside the container hangs

I run a container. It has all the capabilities and mounts all the directories from root (except /proc). When I call lvcreate from inside of it I get: # lvcreate -v -L104857600B -n vol1 default ...
zefciu's user avatar
  • 135
1 vote
3 answers
3k views

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/...
HTF's user avatar
  • 3,188
1 vote
1 answer
1k views

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 ...
tomstephens89's user avatar
7 votes
4 answers
22k views

mdadm software RAID isn't assembled at boot during initramfs stage

First, I prefer to mention I've found and read this. I'm running Debian Jessie with a standard 3.16 kernel. I've manually defined a RAID1 array. But it is not assembled automatically at boot time. ...
Sun Wukong's user avatar
3 votes
2 answers
3k views

Arch cryptsetup hangs on 'waiting for zero'

Cryptsetup was working flawlessly for months, but something I did today on my system now makes it hang: # cryptsetup --debug --verbose luksOpen /dev/sdb home --key-file=/home.key --verbose ... Key ...
cronburg's user avatar
  • 171
3 votes
0 answers
544 views

Control /dev/pts/* assignments

I am trying to find a way to create a udev rule for a network connected terminal? Basically I need the rule to say a specific MAC address, or IP, is always assigned pseudo terminal /dev/pts/5 for ...
Jeremy T.'s user avatar
6 votes
1 answer
2k views

udev rule not applied on boot for mounted disk

I'm trying to persist a readahead rule on a mounted drive to use with mongodb. The mount is persisted using /etc/fstab and that works as expected. I have added a udev rule ACTION=="add", KERNEL=="...
datacarl's user avatar
  • 161
0 votes
1 answer
999 views

Is it possible to write a udev rule to keep other udev rules from running?

This http://reactivated.net/writing_udev_rules.html says It is important to understand that udev will not stop processing when it finds a matching rule, it will continue searching and attempt ...
Stu's user avatar
  • 2,218
1 vote
1 answer
2k views

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 [...] ...
udev's user avatar
  • 11
2 votes
0 answers
40 views

Can 'or' logic be used in UDEV for mounting drive with unique UUIDs?

We do a back-up to a LaCie external rugged drive. The drive is then swapped with it's twin in the safe deposit box. While the drives have different serial numbers, for the servers purposes they are ...
Edward_178118's user avatar
0 votes
2 answers
271 views

Posix map fs path to syspath

Is there a safe way to map a filesystem path to a /sys/block/ node. For instance on my system (Ubuntu) my / path is mounted from /dev/disk/by-uuid/7f6a93a7-1e63-48a3-a7e3-b336a2f9dbf7 which is a ...
Jakob Simon-Gaarde's user avatar