Re: Device file not appearing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 17, 2021 at 10:56:34AM -0600, Gregory Anders wrote:
> On Wed, 17 Mar 2021 17:16:04 +0100, Greg KH <greg@xxxxxxxxx> wrote:
> > udev does not do device node creation anymore (as of a decade or so),
> > you should make sure devtmpfs is mounted at /dev/ in order for this to
> > work properly.
> > 
> > good luck!
> > 
> > greg k-h
> 
> I switched over to using the miscdevice API and the situation is the same.
> Nothing under /dev, but I can see my device under /sys/dev/char (it now also
> exists under /sys/devices/virtual/misc/, as expected).

Then this is a userspace issue, not the kernel :)

> I verified that devtmpfs is enabled in the kernel config (CONFIG_DEVTMPFS=y
> and CONFIG_DEVTMPFS_MOUNT=y) and also see that it is mounted on /dev:
> 
>     # cat /proc/mounts
>     root@xilinx-kcu105-2020_2:~# cat /proc/mounts
>     192.168.0.116:/data/nfs/root / nfs rw,relatime,vers=3,rsize=4096,wsize=4096,namlen=255,hard,nolock,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.0.116,mountvers=3,mountproto=tcp,local_lock=all,addr=192.168.0.116 0 0
>     devtmpfs /dev devtmpfs rw,relatime,size=1026312k,nr_inodes=185478,mode=755 0 0
>     proc /proc proc rw,relatime 0 0
>     sysfs /sys sysfs rw,relatime 0 0
>     tmpfs /run tmpfs rw,nosuid,nodev,mode=755 0 0
>     tmpfs /var/volatile tmpfs rw,relatime 0 0
>     tmpfs /dev tmpfs rw,relatime,size=64k,mode=755 0 0
>     devpts /dev/pts devpts rw,relatime,mode=600,ptmxmode=000 0 0
> 
> I notice that it lists /dev as both devtmpfs (line 2) as well as tmpfs (the
> second line from the bottom). Could that be an issue? I'm not sure how or
> why /dev is being mounted as tmpfs in addition to devtmpfs.

Looks like you have mounted tmpfs on top of devtmpfs, which seems very
odd.  Try unmounting the tmpfs instance and see if the node really is
there in devtmpfs.

Or better yet, mount devtmpfs somewhere else right now to see if the
node is there.

Good luck with your userspace mount maze!

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux