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)

1
vote
1answer
39 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 ...
2
votes
1answer
45 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
10 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
99 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
48 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
22 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
47 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: ...
1
vote
0answers
26 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
31 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
25 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
14 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
20 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
266 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
64 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
43 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
45 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
19 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
30 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
34 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
35 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
25 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
53 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
28 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
24 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
40 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
12 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
49 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
37 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
170 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 ...
6
votes
1answer
827 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
15 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
18 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
95 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
98 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
78 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
16 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
31 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)?
1
vote
0answers
57 views

Write my own sound card driver [closed]

I would like to write my own sound card driver, in order to use my output jack as a PWM (to control a motor). When I run "lspci", the sound card is : Audio device: Intel Corporation 5 Series/3400 ...
26
votes
5answers
2k views

How does Linux differentiate between real and unexisting (eg: device) files?

This is a rather low-level question, and I understand that it might not be the best place to ask. But, it seemed more appropriate than any other SE site, so here goes. I know that on the Linux ...
1
vote
0answers
59 views

There is no /proc/bus/usb directory

I'm running a centos VM on ESXi. Does the /proc/bus/usb directory not show up until a USB device is connected? I just added a USB controller to the VM (it previously had non) and ran lsusb: $ ...
1
vote
1answer
276 views

how to get bus id of an usb device

I would like to bind/unbind my usb device - a wireless adapter. echo -n "1-1:1.0" > /sys/bus/usb/drivers/ub/unbind So to able to do that, I need the bus ID. lsusb prints out the following: Bus ...
2
votes
1answer
54 views

How to swap out the driver of a network device on a running Debian Linux box?

I've got an embedded/headless Debian Linux box which boots from a read-only filesystem image. The configuration is set up so that I can (seemingly) write to the filesystem, but any changes to the ...
1
vote
1answer
58 views

What is /proc/dma? Is it just for legacy support?

I reading a Linux book that told me I can check the dma channels by reading /proc/dma. This is what I see when I run cat /proc/dma: 2: floppy 4: cascade I'm confused because that looks like old ...
0
votes
1answer
86 views

Unable to connect to USB CDC device

I have an 8 channel USB Relay board which I have connected via USB. The manual for the board states that: To use this product with Linux, USB CDC driver needs to be compiled in with the kernel. ...
83
votes
6answers
6k views

How are “/dev” Linux files created?

There are special files in Linux that are not really files... The most notable and clear examples of these are in the dev folder, "files" like: /dev/null - Ignores anything you write to the file ...
1
vote
1answer
85 views

In udev, what kind of device events match ACTION==“change”?

The udev rules I've created so far only deal with devices being added or removed, i.e.: ACTION=="add"... or ACTION=="remove"... I've come across an example of a rule that seems to deal with device ...
3
votes
0answers
31 views

Enumerate valid values for mknod

I have access to an embedded device which has a bunch of block/char files under /dev. However, this is not a satisfying description of the hardware, because since the firmware is shared with small ...
0
votes
0answers
47 views

Tweaking the tripwire policy to stop checking for /dev/pts/x

Trying to streamline my Tripwire policy file, I see that I get a lot of chatter in every daily check report about ------------------------------------------------------------------------------ Rule ...
4
votes
1answer
150 views

What happened to /dev/raw/?

I am reading an article on LWN and it has an important statement: Raw devices (/dev/raw/rawN) are a special case of O_DIRECT I/O. These devices can be opened without specifying O_DIRECT, but ...
0
votes
0answers
49 views

How to switch Huawei CDMA 2252+ to usb from cd-rom?

I have Huawei CDMA 2252+ phone and i want to connect it to linux to send sms. In Fedora 15 (64bit) it is taken as cdrom. This is the output of dmesg after the phone plug in. [10887.524339] USB Mass ...