Questions tagged [udev]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
18 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,...
user avatar
0 votes
2 answers
48 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 ...
user avatar
0 votes
0 answers
23 views

Udisks2 rule to ignore BTRFS-in-LUKS array member disks

On Ubuntu 20.04 PC's with a btrfs (in crypto / LUKS) raid-1 disk array, file managers (nautiuls, thunar, etc) show duplicate entries for the [logically] same disk, and repeatedly mount duplicate /...
user avatar
0 votes
2 answers
35 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 ...
user avatar
  • 1,385
0 votes
0 answers
42 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/...
user avatar
  • 1
-1 votes
1 answer
93 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 ...
user avatar
  • 213
0 votes
0 answers
49 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 ...
user avatar
  • 131
0 votes
1 answer
33 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, ...
user avatar
1 vote
0 answers
103 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 ...
user avatar
  • 25
0 votes
0 answers
377 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-...
user avatar
  • 236
0 votes
1 answer
2k 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 ...
user avatar
1 vote
0 answers
232 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. [...
user avatar
1 vote
0 answers
291 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", ...
user avatar
  • 35
7 votes
3 answers
3k 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, ...
user avatar
  • 225
0 votes
0 answers
66 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'...
user avatar
2 votes
1 answer
439 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. ...
user avatar
1 vote
1 answer
217 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 ...
user avatar
  • 111
1 vote
1 answer
1k 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,...
user avatar
1 vote
1 answer
565 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 ...
user avatar
0 votes
1 answer
638 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 ...
user avatar
  • 589
0 votes
1 answer
146 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 ...
user avatar
  • 253
2 votes
2 answers
2k 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 ...
user avatar
0 votes
0 answers
606 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 ...
user avatar
  • 1,657
1 vote
1 answer
550 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 ...
user avatar
3 votes
2 answers
733 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: ...
user avatar
  • 31
0 votes
1 answer
2k 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....
user avatar
  • 279
2 votes
0 answers
438 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 ...
user avatar
1 vote
0 answers
164 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 ...
user avatar
2 votes
2 answers
5k 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", ...
user avatar
  • 860
1 vote
0 answers
54 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 ...
user avatar
  • 424
0 votes
0 answers
299 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« ...
user avatar
  • 101
5 votes
1 answer
2k 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 ...
user avatar
  • 135
1 vote
3 answers
2k 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/...
user avatar
  • 3,020
1 vote
1 answer
902 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 ...
user avatar
7 votes
4 answers
19k 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. ...
user avatar
3 votes
2 answers
2k 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 ...
user avatar
  • 171
2 votes
0 answers
369 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 ...
user avatar
6 votes
1 answer
1k 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=="...
user avatar
  • 161
0 votes
1 answer
758 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 ...
user avatar
  • 2,068
1 vote
1 answer
1k 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 [...] ...
user avatar
  • 11
2 votes
0 answers
35 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 ...
user avatar
0 votes
2 answers
218 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 ...
user avatar
1 vote
1 answer
627 views

Script triggered by udev to examine partition tables and test if it's a ceph disk

I'm wanting to trigger using udev under CoreOS a script on disk add/remove. The purpose/goal is to automatically mount ceph data partitions to a specific directory in preparation for starting/...
user avatar
  • 14.1k
5 votes
0 answers
363 views

udev attribute cannot be set on boot

I'm setting up SR-IOV for my Intel I350 igb on CentOS 6.6 (2.6.32-504.el6.x86_64, udev 147) using udev. I have modified a rule I used in CentOS 7 (3.10.0-123.el7.x86_64, udev 208). When I do "udevadm ...
user avatar
  • 151
2 votes
0 answers
701 views

Force libvirt to pass always the same device number to the guest on USB device reconnection

I have a HP plotter connected with a USB cable to a debian server through a USB hub. On the server there is a virtualized Windows XP. Everytime I reboot the plotter a different device number is ...
user avatar
  • 63
4 votes
1 answer
724 views

How can I have Linux execute a bash script when a specific disk is hotswapped in?

I have a set of hard drives which are rotated for offsite backup. There are several steps that need to be performed when one of the disks is reinserted which I've rolled into a simple bash script. I'...
user avatar
  • 950
2 votes
1 answer
3k views

udev rule running setserial low_latency don't work

My server runs Ubuntu 14.04.1. I created udev rules in /etc/udev/rules.d/09-pps.rules to get GPS with PPS support work. KERNEL=="ttyS0", SYMLINK+="gps0", MODE="0666" KERNEL=="ttyS0", RUN+="/bin/...
user avatar
  • 215
27 votes
2 answers
22k views

Why is my eth0 called eno16777736?

I've seen http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/, which describes the rationale for consistent/predictable device naming, and then the rules by which device ...
user avatar
2 votes
0 answers
941 views

Are /dev/disk/by-id symlinks unreliable?

I am provisioning a Nova server and Cinder volumes using a Heat template. In order to identify the Cinder volumes attached to my OpenStack server I would like to use the /dev/disk/by-id/... symlinks ...
user avatar
  • 40.4k
6 votes
4 answers
64k views

location of 70-persistent-net.rules in Centos 7

Please, give me a clue, where it's located? it's not under /etc/udev/rules.d anymore # find / -name "*persistent-net.rules" didn't find anything...
user avatar
  • 569