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).

learn more… | top users | synonyms (1)

0
votes
0answers
17 views

How to make sure that certain devices always use the same device file?

When mounting a hard drive via UUID and another via device file, how can I make sure, that the first one is always /dev/sdaX and the second /dev/sdbX and not the other way round? Some explanation of ...
2
votes
0answers
15 views

Predictable partition name for squashfs partition in initramfs

TL;DR: How can I boot a squashfs partition from initramfs with a predictable partition name? /dev/sda2 won't work because the device names get reordered randomly and sometimes it will boot from the ...
3
votes
1answer
22 views

Is there a definite way to relate a driver's source code in Linux kernel to the device itself?

Linux kernel's source code contains the sources of drivers for plenty of devices under /drivers directory. Sometimes by looking at the source code comment, it's possible to get a hint of the device ...
1
vote
0answers
13 views

How do I access USB endpoints with recent Linux kernels?

I am modifying some dated code (from year 2011; see here) that accesses a USB endpoint in the path: /sys/class/usb_endpoint/usbdevBUS.DEVICE_epENDPOINT/device where "BUS", "DEVICE", and "...
1
vote
0answers
23 views

Multiple entries in /proc/bus/input/devices for same device

I have one USB touchscreen connected to my hardware setup but using cat /proc/bus/input/devices gives me two entries for the same device : I: Bus=0003 Vendor=2965 Product=5023 Version=0110 N: Name="...
2
votes
0answers
38 views

Ethernet to USB adapter is not initialized as ttyUSB or ttyACM device

When I plug a Ethernet-to-USB adapter to my Ubuntu 14.04 on the USB port. I can see the Ubuntu has an extra ethernet device. However, I want to see /dev/ttyACM* type of device. I'm wondering why the ...
0
votes
0answers
36 views

How to convert from virtual address to physical address and back? [migrated]

I'm given a task to write an application that will talk to a device. However this is not a driver since device is still being developed and the application is intended to exercises its first revision. ...
4
votes
1answer
67 views

Where does a device file come from?

I'm reading through the Linux Kernel Module programming guide and I am a bit onfused about how device drivers work. I tried following along and making a basic device driver, which shows up in /proc/...
1
vote
0answers
28 views

Why did the interface name of my wireless card change when I added a sound card?

Predictable network interface names are not supposed to change when hardware is added or removed. Isn't that the whole point of the naming scheme??? My wireless interface was named wlp3s0. I ...
2
votes
2answers
45 views

Mistakenly removed scsi-drive device files

I mistakenly removed my sd* device files via the following command: rm /dev/sd*. Is it possible to recreate the device files via mknod?
1
vote
0answers
13 views

Pci device file identifier?

As regards disk devices, Linux systems represent them through a /dev/ file. /dev/sda is a hard drive, and so on. Is there also a file representing a PCI device, for example a graphic card? If not, ...
0
votes
0answers
22 views

Linux device names vs mounting points

I relaced the root hdd in my virutal linux machine, during the process I tried to assign a name to the device, which was rejected as invalid. The accepted device name was: /dev/xvda The device was ...
-3
votes
1answer
42 views

How can I treat my disk like one big file?

I was reading about device files in FreeBSD, but my understanding is not great. To practice, I thought up the following scenario. I suspect that the problem can be solved using device files. Imagine ...
2
votes
1answer
102 views

According to which algorithm does Linux assign the hard drive letters?

I have observed that between repeated boots of the same system, the mapping between the device names /dev/sda, /dev/sdb/... and the physical hard drives stays the same. However I am not sure if it ...
3
votes
1answer
143 views

How to prevent /sda /sdb changes between boots?

I am going to install Gentoo Linux onto an old hardware, which motherboard is having both IDE and SATA hard drives. I have two IDE and one SATA hard drives connected, and plan to do RAID on them. ...
1
vote
0answers
11 views

Edit audio output before playback

I want to low level edit the output of ALSA sound system. I should sniff the audio output, change it before playback and then play it. I saw /dev/snd/OUTDEVICE but I think it is write only. Which is ...
7
votes
1answer
164 views

Command to generate /dev/disk/-by-path/ name on a system without udev daemon

On most Linux systems udev usually creates symlinks in /dev/disk/by-uuid/ /dev/disk/by-path/ which point to actual device nodes (/dev/sda, /dev/sdb, etc). I don't have udev on my system, and I ...
2
votes
2answers
118 views

No space left on device on CentOS7

My machine which OS is CentOS7 have to backup 50G data into MySQL. But, there is no space left on the device. But there are many spaces on /home. How can I make user that there are enough space for ...
1
vote
1answer
26 views

How to work out which drive and directory your system booted from if it is not mounted in /etc/fstab?

My /etc/fstab doesn't include the disk the system booted from, basically because I made some changes and forgot to include this. The initial /boot and / directories are on different drives. I noticed ...
3
votes
1answer
48 views

Ignore unmounted file systems

I've got two devices on my LAN: a Raspbian jessie and an Ubuntu 14.04. The latter has some nfs shared folders, which are available from Raspbian at startup, set up in its /etc/fstab file as: 192.168....
1
vote
0answers
53 views

How can I mount remove /dev/mem to local

This question is relate to this, but more general. Currently I mount remote root by sshfs sshfs -o sshfs_sync,sync_readdir,reconnect,follow_symlinks,direct_io,sync_read root@pi:/ pi /proc is ok, ...
1
vote
1answer
60 views

Programmatically determine the IRQs associated with a network interface

What is the most reliable way to programmatically determine the IRQs associated with a network interface, given the name of the interface (e.g. eth0)? I'm okay with a best-effort approach, but I'd ...
1
vote
1answer
28 views

How can I access optical drive status information?

I can obtain the status of a connected display with: cat /sys/class/drm/card0-HDMI-A-1/status Is there something analogous for optical drives? I looked around in /sys/ but couldn't find anything that ...
0
votes
1answer
21 views

Busy /dev/gpio. I can shared it?

I need shared one device between two C applications. This device is a buzzer. I've try open this with O_NONBLOCK flag, but result is same: device or resource busy. Is there any possibility to use the ...
0
votes
0answers
40 views

How to call a device's power management methods in another way than during suspend to ram?

Let us consider the e1000e driver for an Ethernet card. This driver provide two power management methods .suspend and .resume to respectively turn off and turn on the card. Those methods are naturally ...
4
votes
3answers
351 views

Do tmpfs and devtmpfs share the same memory region?

My system disk usage is like this: # df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/rhel-root 50G 39G 12G 77% / devtmpfs 5.8G 0 5.8G 0% /dev ...
1
vote
3answers
87 views

How could Linux use 'sda' device file when it hasn't been installed?

I am installing CentOS Linux distribution on a fresh new machine. Just for learning. I am new to Linux. At the partition step, CentOS tells me that it has detected a sda HD in my machine and I should ...
-1
votes
2answers
81 views

What are exactly mknod command parameters?

What are exactly mknod command parameters? I want to create a jail in chroot. So I need to do: mknod /var/chroot/bind/dev/null c 1 3 mknod /var/chroot/bind/dev/random c 1 8 What are c, 1, 3 and 8?
1
vote
1answer
57 views

Which special file holds Microphone input?

There is a special file for everything: /dev/tty for the terminal, /dev/sda for a drive, and two random number generators: /dev/random and /dev/urandom. Yet I can't find the special file(s) for raw ...
0
votes
1answer
27 views

What happens when writing to a device driver? [duplicate]

What happens when writing to a device driver? For example: echo "some text" > /proc/device_driver I'm guessing that echo has a write-call that somehow invokes the write-function in the driver. ...
1
vote
1answer
45 views

Swap /dev/mapper/* devices

I have been given a box that has /dev/mapper/root mounted as / and mapped to /dev/dm-0. It has /dev/mapper/home mounted as /home and mapped to /dev/dm-2. The dm-0 device is 5G and the dm-2 device is ...
0
votes
1answer
75 views

Size of a character/block file

Why is the size of a character or block file given as comma separated? crw-rw-rw-. 1 root root 1, 3 Mar 8 10:15 /dev/null brw-rw----. 1 root disk 8, 1 Mar 8 10:15 /dev/sda1 Size of a file is ...
1
vote
1answer
80 views

Correspondence between SCSI device entries in /sys and the disks in /dev

Under the /sys/class/scsi_device folder I have the following: root@linux01:/sys/class/scsi_device # ls 1:0:0:0 2:0:0:0 2:0:1:0 3:0:0:0 How can I know how each of these devices is related to ...
1
vote
1answer
30 views

Get paths to all sd cards in a computer using GNU bash 4.3.11 running Ubuntu 14.04

how can I get the paths to all sd cards in a computer using GNU bash 4.3.11 running Ubuntu 14.04 and just those? Background: I have an .iso-file and want to create a bash script that asks the user ...
0
votes
3answers
56 views

Why does reading a device require admin permissions?

I'm trying to create a backup script that saves my thumbdrive as an image. I'm planning on having it automatic. I've always seen the thumbdrive listed as /dev/sdb, and created a script that will save ...
1
vote
0answers
29 views

iostat ( column svctm is not trusted any more ) what to use instead?

I'm running a Linux Server with "Oracle Linux Server release 6.5" which is pretty much the same as RedHat Version. I need to determine the latency on my disk devices. The man page of the iostat ...
1
vote
1answer
30 views

uuid, device number, and device file for a device

In Linux, I would like to know about the differences in purposes and usages of uuid, device (major and minor) number, and device file for a device. They all seem to me to identify a device (and may ...
0
votes
1answer
66 views

Major and minor numbers of a partition

$ stat new File: ‘new’ Size: 928 Blocks: 8 IO Block: 4096 regular file Device: 804h/2052d Inode: 28188755 Links: 1 Access: (0622/-rw--w--w-) Uid: ( 1000/ t) Gid: ( ...
0
votes
1answer
25 views

Is it possible read every serial device's data?

Reading serial data is something ordinary when comes from devices connected by direct serial 9-pin cables. But happens with usb devices ? Considering that actually USB is a Universal Serial Bus, is it ...
2
votes
2answers
69 views

How does bash print to the screen if not with a framebuffer? [duplicate]

I noticed that a framebuffer doesn't always exist on some systems. In these cases, how does bash print to the screen (assuming it ever uses fb devices at all)? Since there's no framebuffer device, ...
1
vote
2answers
59 views

Send a message to a “screen” to be received by a device on /dev

My question may looks trivial... But it's because despite of my long experience of linux/unix/osx systems, I found myself lacking some basic notions. I created a little bluetooth/arduino switch to ...
3
votes
4answers
258 views

Why does mknod require root privileges?

I noticed that the mknod command required root privileges when a creating a node other than a regular file, FIFO or a Unix socket. Why is that? How can a regular user harm a system or compromise ...
7
votes
1answer
1k views

Difference between /dev/null and /dev/zero

When trying to redirect to /dev/null and /dev/zero, the output it is discarded. It seems both /dev/null and /dev/zero accept and discard all input. So, what is the difference between /dev/null and /...
0
votes
0answers
17 views

How is Xserver able to tell which device is a mouse or a keyboard?

In these days we don't have to create a custom configuration that sets our devices up, at least when it comes to Xserver. But sometimes you want to change some default parameters. When you do it, you ...
0
votes
2answers
20 views

How can I see the dismounted devices

How can I see if the usb device has been dismounted? Because when I did fdisk -l the information is the same, before and after the ran command umount /dev/usb.
1
vote
0answers
157 views

when running `udevadm test`: `no db file to read /run/udev/data/+gpio_sw:PA7: No such file or directory`

I am trying to write an udev rule that matches a GPIO Pin of my Orange Pi (the GPIOs use the gpio-sunxi kernel module). My ultimate goal is to let users who are member of a particular group access ...
2
votes
1answer
164 views

Access iphone storage as device/partition

I am working on a project, in which the ultimate goal is to successfully wipe iOS from an iPhone and install TinyCore Linux in it's place. I expected the iPhone to function like an external drive when ...
0
votes
0answers
118 views

Linux doesn't recognize the SSD it's booting from!

I've extended a computer by a SSD and the BIOS recognizes it (and shows its name), but neither Ubuntu 14.4 nor Knoppix 7.6 show it in fdisk's output. Then I copied Fedora 23 WS Live to that SSD (on ...
0
votes
0answers
18 views

Devices for Analog I/O gone from /dev after reboot

I have a system using Centos 6.6 and another system using RHEL 6.6 on the same architecture that both need analog I/O drivers to communicate with sensors that will be attached to the device. Thus, I ...
1
vote
1answer
33 views

Are device files implemented by device drivers or OS kernels?

Device files are interfaces of device drivers to user programs. In Linux, is a device file implemented directly by its corresponding device driver, or by the OS kernel (excluding the device driver)?