Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [devices]

devices refers to questions about the Unix/Linux device special files, normally these are under /dev. Do not use this tag for physical devices (for that use e.g. usb or pci).

1
vote
0answers
11 views

Webcam and Desktop composite with v4l2loopback?

Is there anyway to do a composite video setup where the webcam is overlain onto the desktop and output as a video device (simulated webcam)?
-4
votes
1answer
189 views

Is data streamed as stdout/stderr removed after it appears in the terminal? [closed]

I know that stdout/stderr are a streams of data (uncommonly called "sources of data"), and that their streams of data also typically appear as terminal output. After the stdout/stderr data appears in ...
1
vote
0answers
13 views

Is there any standard for naming RS-485 tty devices/device aliases in Linux?

I know, that there are some standards in tty naming. There is ttyUSBx for USB to serial converters, ttySx for RS-232, ttyAMAx on ARM devices, but I can't find anything about conventions in RS-485 ...
0
votes
1answer
39 views

Correct way to fix missing device file in /dev?

I am using a proprietary PCI card from Sensoray in my Ubunut 14.04 machine (I intend to upgrade to 18.04 soon). The card comes with the source code for the driver and a Makefile to build and install ...
1
vote
0answers
37 views

Disk device paths Changes from xvd to sda, how do I change to xvd?, [closed]

OS Ubuntu '16.04.5 LTS' Hypervisor Xen This output is when sda df -h Filesystem Size Used Avail Use% Mounted on udev 16G 4.0K 16G 1% /dev tmpfs 3.2G 1.3M 3.2G ...
0
votes
1answer
33 views

Emulating a character device from userspace

We are currently working on building a system for data visualisation for different sensors. To make development of the Linux application possible we would need to emulate the behaviour of the ...
0
votes
1answer
28 views

Rip-off (an ncurses term) single bottom line out of /dev/tty terminal, is it possible?

Ncurses allows to separate a single line from screen, at level of physical screen (curscr), to devote it to e.g. a title bar, thus also creating a logical screen (stdscr), devoted to application's ...
1
vote
1answer
55 views

USB device (keyboard or mouse) shows in `lsusb` but does not work if it is the second USB device to be plugged in

I've been having a strange issue the past couple of months where the second USB device to be plugged into my laptop is unresponsive, despite showing up in lsusb and dmesg seemingly without issue. ...
-1
votes
2answers
60 views

How to find the Absolute device name

I had a homework question which I answered correctly: Use lvdisplay to discover information about the VG Name found in the previous question. What is the first LV Path which is using the volume ...
0
votes
0answers
15 views

Identify watchdog module related to /dev entry

I have several /dev/watchdog* files on my embedded platform. I'd like to know how I can identify which watchdog module is related to which /dev/watchdog* entry.
-2
votes
1answer
27 views

What is the relation between a line in cpu cache and a page in main memory (and block in disk)?

Computer Systems: A Programmer's Perspective (2nd Edition) [Randal E. Bryant, David R. O'Hallaron] says A block is a fixed-sized packet of information that moves back and forth between a cache and ...
0
votes
1answer
40 views

How is a sequentially accessible device made randomly accessible?

If a device offers only sequential access not random access, can a device driver or a file system make the device look like randomly accessible to users? If yes, is this done by providing buffer/...
0
votes
0answers
26 views

Disable consistent device naming on Centos 7.5

I'm using kickstart's booloader options to suppress the consistent device naming feature for network interfaces on Centos 7.5. A minimal example of my kickstart file is as below: auth --enableshadow -...
-1
votes
1answer
87 views

Can filesystems be created only on block devices, but not on character devices?

Can filesystems be created only on block devices, but not on character devices? Can a filesystem be viewed as a block device itself (for example, when programming to use a file system)? My guess is ...
0
votes
0answers
40 views

Do the input queue and output queue belong to the terminal device, its driver, or line discipline?

In APUE, where should the input queue and output queue (shown in the first figure) appear in the second figure? For example, in "actual device" in "terminal device driver" in "terminal line ...
1
vote
1answer
34 views

Is devtmpfs special with respect to namespaces? a permissions problem

I'm wondering if devtmpfs is special with respect to namespaces. Here's my system info (using Vagrant for testing) vagrant@ubuntu-xenial:~/test$ uname -a Linux ubuntu-xenial 4.4.0-135-generic #161-...
0
votes
1answer
38 views

udev ACTION add isn't working

I'm trying to use udev for some basic actions, in this case the idea is to launch a simple script. The problem is that when I use this rule: ACTION=="remove", ENV{ID_FS_LABEL}=="NAMEHERE", KERNEL=="...
2
votes
2answers
115 views

Why can I (or cannot) mount a mounted device again? What is happening?

Why can I (or cannot) mount a mounted device again? What is happening? For example: /tmp/test$ sudo mount /dev/sda5 ./1;echo ${?} 0 /tmp/test$ sudo mount /dev/sda5 ./2;echo ${?} 0 /tmp/test$ sudo ...
1
vote
0answers
20 views

Scenario to use the sg driver

Is there any device commonly controlled by SCSI generic driver (sg) in Linux today? I am curious about that. Currently I just know the mtx tool which controls robots in tape libraries via sg driver.
0
votes
0answers
22 views

Should I let my user access /dev/mapper/control?

I'm building LiveCDs using some script I worked on as an exercise. Now I want to create VDIs to directly use in VirtualBox. I need kpartx among others to create a loop device, mount it and copy files, ...
2
votes
1answer
310 views

How to use dd if=/dev/mem in place of devmem ?

It seems like root@testbox:~# dd if=/dev/mem bs=1 count=4 skip=2149646336 | hd should be nearly equivalent to root@testbox:~# devmem 2149646336 32 But, while devmem works great, that dd invocation ...
0
votes
2answers
40 views

How to determine if an unmounted CD/DVD is in the drive?

Under Linux, is there any way to get a yes/no answer to whether or a CD/DVD drive contains a disc which isn't mounted but which can be mounted or written to?
0
votes
0answers
29 views

How can I xor two block devices together?

I'm looking for a way to create a virtual block device that when accessed returns the XOR of two block devices. I feel like dmsetup would be used here somewhere but I can't find anything related to ...
0
votes
0answers
203 views

Udev Rules Not Running

I'm playing with Udev Rules on OpenSuse Leap, and I'm trying to run a simple and small script once a USB device is plugged into my system. However, my script which I added in my keyword "RUN+=" does ...
2
votes
1answer
31 views

How to link a tunX interface to a specific OpenVPN instance?

I known that I can give a specific name to the TUN interface using --dev option, but I didn't and I have now on a router machine something like a hundred client configs. with less clients I was able ...
0
votes
1answer
34 views

Given a block device file, how can I list all relevant partions?

Given a device file (ex: /dev/sda) how can I get a list of all relevant partitions? Expected input: /dev/sda Expected output: /dev/sda1 /dev/sda2 /dev/sda3 ... I know there are many ways to get ...
0
votes
2answers
18 views

Skipping the middle mapping with cryptsetup luksOpen

I'm mounting a bunch of encrypted disks like so cryptsetup luksOpen some_source some_mapping && mount /dev/mapper/some_mapping /some_mountpoint How can I abstract away the middle mapping? I ...
2
votes
1answer
92 views

SPI driver for Debian

This is the Linux: PRETTY_NAME="Debian GNU/Linux 8 (jessie)" NAME="Debian GNU/Linux" VERSION_ID="8" VERSION="8 (jessie)" ID=debian The Kernel version is: 4.1.15-gcfb25fd ...
5
votes
3answers
438 views

Make tar from /dev/stdin file

What I'm looking for is a way to pass in arbitrary data through STDIN, and have it get tar'd up as if its a normal file. I tried this $ echo test | tar -cf test.tar /dev/stdin and that gives me a ...
2
votes
2answers
170 views

How to completely inhibit lid switch events?

Context: Due to missing drivers for my 2-in-1 convertible, folding the screen back only triggers a lid switch event. This causes the laptop to suspend or, when "Suspend when laptop lid is closed" is ...
0
votes
1answer
111 views

How to create multiple devices in a /dev/ subdirectory (kernel driver)

I'm writing a kernel module. I can easily create a character device in /dev/ but I want to have 3 devices available to my user and it would be nice to put them all under a /dev/ subdirectory. ...
1
vote
1answer
25 views

Why raspbian lite powers off when doing `sudo cat /dev/char/10:130`?

I did on a terminal sudo cat /dev/char/10:130, which in the uevent has name of watchdog, and it outputs a message from the kernel saying that watchdog did not stop !, and after a couple of second it ...
2
votes
0answers
133 views

What is the difference between `/dev/input/event*` and `/dev/input/mouse*` according to mouses?

Suppose my mouse is associated to /dev/.../event1 and /dev/.../mouse1. I was reading the byte streams of those files, and I noticed that event1 gives much more information than mouse1, which ...
2
votes
1answer
9k views

PKCS#7 signature not signed with a trusted key

Installed Ubuntu with SIP disabled on MacBook 2017 - 0 issues, booted in seconds. I have been building it out and created a problem while trying to make the WiFi work. At some point (it was very late)...
-2
votes
1answer
59 views

How to deny all access to /dev/sda? [closed]

I would like even applications not to be able to access /dev/sda . If possible, I would even like to disallow root applications from accessing it, but that is not as important.
1
vote
1answer
178 views

what is DEVLINKS in the output of udevadm info --query=property --name=/dev/mmcblk0

I was looking at the udev information but couldn't find out anywhere. What does DEVLINKS signify also what are these values dev/disk/by-id/mmc-008G30_0xf281d20d & /dev/disk/by-path/platform-...
1
vote
0answers
22 views

Ethernet malfunction when booting with extra device on /dev

I have a customized Linux distro (created via buildroot) running on an embedded platform. The system consists in a processing module (Based on Samsung Exynos 4412 microprocessor) with a base board for ...
1
vote
0answers
32 views

Drive emulation at driver level

I would like to emulate a virtual SED at driver level. The goal is to develop/simulate the "firmware" of a drive, and map driver interface commands to an app which would handle interface specific ...
0
votes
1answer
39 views

How do you use SSHFS to work on drives in /dev/

My laptop for some reason will not power an external 2.5" HDD, so I am using a Raspberry PI to connect to the drive. The problem is, I am struggling to perform tasks such as formatting disks and ...
1
vote
1answer
543 views

persistent device naming for NVMe storage devices

The Linux kernel's simple naming for a storage device (e.g. /dev/sda, /dev/sdb) can change randomly across boots. Is that true for NVMe storage devices too? These have names such as /dev/nvme0n1p1 and ...
0
votes
1answer
82 views

Programmatically identify block device of filesystem [closed]

The following code was tested on RedHat 7 using df verison 8.2 and lsblk version 2.23.2. This is important as the lsblk utility has signficantly more output options than the RedHat 6 version (2.17.2) ...
0
votes
0answers
180 views

Define udev rule for disk by id or uuid?

I want to define a udev rule for a particular block device (or partition). I currently do it by defining a 91-my-custom-rules.rules configuration file as follows: computer:/etc/udev/rules.d # cat 91-...
0
votes
2answers
63 views

What are limitations chrooted system? [closed]

Chroot allows us to change the root directory, or rather root directory of specific process. Now obviously this does restrict the process to the specified tree (unless it doesn't relinquish the ...
2
votes
2answers
72 views

Can I run Linux on specific CPU cores?

I'm making a brainwave detection device. Will be using an Octa-Core ARM processor for the software processing. For the management of CPU cores, can I code Linux to strictly run on a specific set of ...
0
votes
0answers
75 views

Proxmox Guest: Network Device not linked

I've setup a new Ubuntu 18.04 virtual machine using Proxmox. On this new virtual machine I can't get a working Internet connection. The command lshw -C network shows: root@web:~# lshw -C network *-...
0
votes
0answers
110 views

/dev/sr0 (live DVD) turns into /dev/sr1 when inserting periphials

On a live Linux session, inserting a keyboard or mouse via USB onto the computer causes /dev/sr0 to be remapped as /dev/sr1, which makes the live system unable to access the DVD. sudo rename /dev/sr1 ...
1
vote
0answers
69 views

Removing LV cache after lvreduce fails

Seeing some odd behavior with lvms. If I resize a cached logical volume and then attempt to remove the cache I get a failure with exit code 5. Does anyone know why this would happen? Recreate steps: ...
0
votes
1answer
31 views

U(n)mount sthealthily without notifying applications or clearing cache. (testing purposes)

There is already: $ umount -l . But is there a way to unmount silently? This means, in example: If a photo on the unmounted partition is inside of a device, then Linux should preferrably keep it ...
1
vote
1answer
108 views

Set usb flash drive as non rotational drive

I'm trying to optimize the IO schedulers and to use a proper scheduler for rotational and for non rotational drives (different). When I run: cat /sys/block/sd*/queue/rotational I get: 1 <-- ...
3
votes
0answers
29 views

Debugging in android chrome as a non-root user

I am trying to debug a website displayed in Google Chrome on an Android device connected to my box via USB. To this end, there is the remote debugging protocol as implemented in the desktop versions ...