can not create /dev/shm

7,538

An embedded system may have a static /dev, rather than use udev to populate it. If you don't have /lib/udev, then presumably your system isn't running udev. In that case, you need to create /dev/shm on the root filesystem.

If the root filesystem is an initramfs, rebuild your initramfs with an extra line in the initramfs description file:

dir /dev 755 0 0
dir /dev/shm 755 0 0
…

If the root filesystem is an on-disk filesystem, just create the directory.

# mkdir /dev/shm
Share:
7,538

Related videos on Youtube

stdcerr
Author by

stdcerr

Coding mostly on embedded systems (24/7/365 uptime) to make a living at daytime, coding on a variety of systems (x86, arm) for fun at nighttime, preferences: Linux, C & C++. Always interested in learning other ways/better ways to solve problems!

Updated on September 18, 2022

Comments

  • stdcerr
    stdcerr over 1 year

    I need to create /dev/shm on an embedded ARM system. From "Installed The Latest Changes to Current and......".

    I see that it can be created with mkdir /lib/udev/devices/shm, but I'm wondering what is supposed to be at that location? The only directory I have at that location is /lib/modules/, there's no devices/ or anything.

    So I went ahead and just created them, empty directories. I then added:

    tmpfs                   /dev/shm                tmpfs   defaults       0 0
    

    to my /etc/fstab and I didn't add an mtab entry, since I don't have an /etc/mtab. I then rebooted and now, there's still no /dev/shm device.

    Any ideas how I get that device?

    EDIT #1

    Oh, and a mount -a (after a reboot) results in:

    # mount -a
    mount: mounting tmpfs on /dev/shm failed: No such file or directory`