Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Device files are not being created
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
xelibrion
n00b
n00b


Joined: 02 Jun 2018
Posts: 4

PostPosted: Sat Jun 02, 2018 7:45 am    Post subject: Device files are not being created Reply with quote

Hi guys,

Noticed yesterday that my SATA drive is no longer being mounted in Gentoo. Turned out that there's no /dev/sda file like it used to be.
And lsblk does not show it either.
Code:

$ lsblk                                                                                                                               
NAME                       MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0                        7:0    0   100G  0 loop
└─docker-259:2-296251-pool 253:0    0   100G  0 dm   
loop1                        7:1    0     2G  0 loop
└─docker-259:2-296251-pool 253:0    0   100G  0 dm   
nvme0n1                    259:0    0   477G  0 disk
├─nvme0n1p1                259:1    0    31M  0 part
├─nvme0n1p2                259:2    0    40G  0 part /
├─nvme0n1p4                259:3    0 428.4G  0 part /home
├─nvme0n1p5                259:4    0     8G  0 part [SWAP]
└─nvme0n1p6                259:5    0   512M  0 part /boot


After checking that the drive is alive and well in BIOS, I rebooted to GParted Live USB and it's recognisable there as well.

Digging into it more, it turned out that the problem is a bit more widespread and not limited to only SATA drive. USB devices have also been affected.
Here's the output from dmesg:
Code:

[  479.700071] usb 1-6.2: new high-speed USB device number 9 using xhci_hcd
[  479.820591] usb 1-6.2: New USB device found, idVendor=058f, idProduct=6387
[  479.820596] usb 1-6.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  479.820599] usb 1-6.2: Product: Mass Storage
[  479.820601] usb 1-6.2: Manufacturer: Generic
[  479.820604] usb 1-6.2: SerialNumber: AC63CFD0
[  479.821517] usb-storage 1-6.2:1.0: USB Mass Storage device detected
[  479.822086] scsi host8: usb-storage 1-6.2:1.0
[  480.866048] scsi 8:0:0:0: Direct-Access     Generic  Flash Disk       8.07 PQ: 0 ANSI: 4


and lsusb:
Code:

Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 003: ID 174c:3074 ASMedia Technology Inc. ASM1074 SuperSpeed hub
Bus 002 Device 002: ID 0424:5537 Standard Microsystems Corp.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 8087:0aa7 Intel Corp.
Bus 001 Device 009: ID 058f:6387 Alcor Micro Corp. Flash Drive <========================================== this is the USB drive
Bus 001 Device 006: ID 05ac:12a8 Apple, Inc. iPhone5/5C/5S/6
Bus 001 Device 003: ID 174c:2074 ASMedia Technology Inc. ASM1074 High-Speed hub
Bus 001 Device 008: ID 04d8:0b29 Microchip Technology, Inc.
Bus 001 Device 007: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 001 Device 004: ID 046d:c31c Logitech, Inc. Keyboard K120
Bus 001 Device 002: ID 0424:2137 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


As you can see both dmesg and lsusb recognise the device, but lsblk still shows nothing about the drive.
udev does seem to receive device events though.

Code:

# udevadm monitor
monitor will print the received events for:
UDEV - the event which udev sends out after rule processing
KERNEL - the kernel uevent

KERNEL[213.248151] add      /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2 (usb)
KERNEL[213.248705] add      /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2/1-6.2:1.0 (usb)
KERNEL[213.249325] add      /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2/1-6.2:1.0/host8 (scsi)
KERNEL[213.249367] add      /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2/1-6.2:1.0/host8/scsi_host/host8 (scsi_host)
KERNEL[213.249399] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2/1-6.2:1.0 (usb)
KERNEL[213.249440] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2 (usb)
UDEV  [213.250223] add      /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2 (usb)
UDEV  [213.251217] add      /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2/1-6.2:1.0 (usb)
UDEV  [213.251614] add      /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2/1-6.2:1.0/host8 (scsi)
UDEV  [213.252059] add      /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2/1-6.2:1.0/host8/scsi_host/host8 (scsi_host)
UDEV  [213.252933] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2/1-6.2:1.0 (usb)
UDEV  [213.253816] bind     /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2 (usb)
KERNEL[214.305982] add      /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2/1-6.2:1.0/host8/target8:0:0 (scsi)
KERNEL[214.306063] add      /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2/1-6.2:1.0/host8/target8:0:0/8:0:0:0 (scsi)
KERNEL[214.306088] add      /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2/1-6.2:1.0/host8/target8:0:0/8:0:0:0/scsi_device/8:0:0:0 (scsi_device)
KERNEL[214.306223] add      /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2/1-6.2:1.0/host8/target8:0:0/8:0:0:0/bsg/8:0:0:0 (bsg)
UDEV  [214.306458] add      /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2/1-6.2:1.0/host8/target8:0:0 (scsi)
UDEV  [214.307213] add      /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2/1-6.2:1.0/host8/target8:0:0/8:0:0:0 (scsi)
UDEV  [214.307646] add      /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2/1-6.2:1.0/host8/target8:0:0/8:0:0:0/scsi_device/8:0:0:0 (scsi_device)
UDEV  [214.308595] add      /devices/pci0000:00/0000:00:14.0/usb1/1-6/1-6.2/1-6.2:1.0/host8/target8:0:0/8:0:0:0/bsg/8:0:0:0 (bsg)


There's also an issue with my iPhone no longer being mounted as a network interface.

From the above I suspect udev is misbehaving, but to be honest I'm a bit puzzled with how to confirm the root cause. Here's the output of dmesg | grep -i udevd
Code:
                                                                                                         
[    4.833170] udevd[2795]: starting version 3.2.5
[    4.835819] random: udevd: uninitialized urandom read (16 bytes read)
[    4.836010] random: udevd: uninitialized urandom read (16 bytes read)
[    4.847802] udevd[2796]: starting eudev-3.2.5
[    4.987930] udevd[2836]: Error calling EVIOCSKEYCODE on device node '/dev/input/event5' (scan code 0xc00b8, key code 161): Invalid argument
[    4.987935] udevd[2836]: Error calling EVIOCSKEYCODE on device node '/dev/input/event5' (scan code 0xc0183, key code 226): Invalid argument
[    4.987938] udevd[2836]: Error calling EVIOCSKEYCODE on device node '/dev/input/event5' (scan code 0xc0184, key code 421): Invalid argument
[    4.987941] udevd[2836]: Error calling EVIOCSKEYCODE on device node '/dev/input/event5' (scan code 0xc0186, key code 423): Invalid argument
[    4.987944] udevd[2836]: Error calling EVIOCSKEYCODE on device node '/dev/input/event5' (scan code 0xc018a, key code 155): Invalid argument
[    4.987948] udevd[2836]: Error calling EVIOCSKEYCODE on device node '/dev/input/event5' (scan code 0xc018e, key code 397): Invalid argument
[    4.987950] udevd[2836]: Error calling EVIOCSKEYCODE on device node '/dev/input/event5' (scan code 0xc01b6, key code 212): Invalid argument
[    4.987952] udevd[2836]: Error calling EVIOCSKEYCODE on device node '/dev/input/event5' (scan code 0xc01bc, key code 430): Invalid argument
[    4.987954] udevd[2836]: Error calling EVIOCSKEYCODE on device node '/dev/input/event5' (scan code 0xc0221, key code 217): Invalid argument


Would anyone be able to point me in the right direction?
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5845

PostPosted: Sat Jun 02, 2018 8:53 am    Post subject: Reply with quote

Can you pastebin your kernel .config file? I've seen this before but I don't remember the option to toggle.

Thanks
_________________
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.

banned from #gentoo since sept 2017
Back to top
View user's profile Send private message
xelibrion
n00b
n00b


Joined: 02 Jun 2018
Posts: 4

PostPosted: Sat Jun 02, 2018 9:53 am    Post subject: Reply with quote

Hi, here's the output of cat /proc/config.gz | gunzip: https://pastebin.com/GxiwQbKn
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5845

PostPosted: Sat Jun 02, 2018 10:11 am    Post subject: Reply with quote

aha. I think I found it.

Code:
# CONFIG_BLK_DEV_SD is not set


This is probably the one you're missing. You probably want "scsi cdrom" and "scsi generic" as well.

Cheers
_________________
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.

banned from #gentoo since sept 2017
Back to top
View user's profile Send private message
xelibrion
n00b
n00b


Joined: 02 Jun 2018
Posts: 4

PostPosted: Sat Jun 02, 2018 10:32 am    Post subject: Reply with quote

bunder wrote:
aha. I think I found it.

Code:
# CONFIG_BLK_DEV_SD is not set


This is probably the one you're missing. You probably want "scsi cdrom" and "scsi generic" as well.

Cheers


Yeah, it solved it. Thanks heaps mate!
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13855

PostPosted: Sat Jun 02, 2018 3:34 pm    Post subject: Reply with quote

xelibrion wrote:
Hi, here's the output of cat /proc/config.gz | gunzip: https://pastebin.com/GxiwQbKn
As a general tip, this is a Useless Use Of Cat. There is almost never a reason to cat a file solely to redirect it to some other program. (In rare cases, this can be appropriate if the receiving program reacts differently to stdin as a file versus stdin as a pipe. In most cases where the reactions differ, the stdin as a pipe case is less useful, so even there, you often want to avoid piping cat to a program. In particular, pipes are not seekable, but files are, so stdin as a file can sometimes be optimized better than stdin as a pipe.) In this case, you could have written gunzip < /proc/config.gz and gotten the same result.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum