Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
/dev/shm doesn't get mounted
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
R8sR1wwlae
n00b
n00b


Joined: 31 Jan 2014
Posts: 6

PostPosted: Fri Jan 31, 2014 4:44 pm    Post subject: /dev/shm doesn't get mounted Reply with quote

Recently I was emerging python 3 and its building failed with an error telling me to check if /dev/shm is mounted. That's my problem. Somewhy /dev/shm doesn't get mounted on my system. Here is its line in "mount" output:
Code:
none on /dev/shm type tmpfs (rw,relatime)

I have CONFIG_SHMEM=y turned on in the kernel.

/etc/init.d/udev-mount and /etc/init.d/devfs are running

I don't have anything about /dev/shm in fstab (it's supposed to mount without that, right?)
I use openrc, not systemd. I have eudev installed.

Some time ago I tried systemd but then returned to openrc - might be I messed something up with that (however I didn't do anything specific)
Back to top
View user's profile Send private message
R8sR1wwlae
n00b
n00b


Joined: 31 Jan 2014
Posts: 6

PostPosted: Fri Jan 31, 2014 5:16 pm    Post subject: Reply with quote

I think it's supposed to be mounted by /etc/init.d/devfs. Here is a code snippet from it:
Code:

# Mount required stuff as user may not have then in /etc/fstab
   for x in \
      "mqueue /dev/mqueue 1777 ,nodev mqueue" \
      "devpts /dev/pts 0755 ,gid=5,mode=0620 devpts" \
      "tmpfs /dev/shm 1777 ,nodev shm" \
   ; do
      set -- $x
      grep -Eq "[[:space:]]+$1$" /proc/filesystems || continue
      mountinfo -q $2 && continue

      if [ ! -d $2 ]; then
         mkdir -m $3 -p $2 >/dev/null 2>&1 || \
            ewarn "Could not create $2!"
      fi

      if [ -d $2 ]; then
         ebegin "Mounting $2"                                 # this line produces something in rc.log I think
         if ! fstabinfo --mount $2; then
            mount -n -t $1 -o noexec,nosuid$4 $5 $2
         fi
         eend $?
      fi
   done


And here is a piece of rc.log
Code:

   OpenRC 0.12.4 is starting up Gentoo Linux (x86_64)

 * /proc is already mounted
 * /run/openrc: creating directory
 * /run/lock: correcting mode
 * /run/lock: correcting owner
 * Using /dev mounted from kernel ...
 [ ok ]
 * Mounting /dev/mqueue ...                  # this is the line of log produced by mentioned code snippet
 [ ok ]
 * Creating list of required static device nodes for the current kernel ...
 [ ok ]
 * Mounting debug filesystem ...
 [ ok ]
 * Mounting config filesystem ...
 [ ok ]
 * Mounting cgroup filesystem ...
 [ ok ]
 * Mounting fuse control filesystem ...
 [ ok ]
 * setting up tmpfiles.d entries for /dev ...
 [ ok ]
 * Starting udev ...
 [ ok ]
 * Generating a rule to create a /dev/root symlink ...
 [ ok ]
 * Populating /dev with existing devices through uevents ...
 [ ok ]
 * Waiting for uevents to be processed ...
 [ ok ]

rc sysinit logging stopped at Fri Jan 31 19:37:05 2014

So I see that that ebegin line works only for mqueue but not for pts and shm, and the ewarn line in another if clause doesn't seem to produce anything in the log (why is that btw?). What could be the reason of this?
I use luks and lvm, by the way if that matters. And my root partition is encrypted.

-----------------------
Yeah, that line of rc.log is produced by the mentioned line - I checked that by editing that Mounting $2 string and it changed in the log too.
Back to top
View user's profile Send private message
R8sR1wwlae
n00b
n00b


Joined: 31 Jan 2014
Posts: 6

PostPosted: Fri Jan 31, 2014 6:00 pm    Post subject: Reply with quote

Looks like it skips shm and devpts because tmpfs and devpts are not mentioned in /proc/filesystems when /etc/init.d/devfs is run. I wonder why it is so.

-------------------------------
CONFIG_TMPFS=y
CONFIG_DEVTMPFS=y
Back to top
View user's profile Send private message
R8sR1wwlae
n00b
n00b


Joined: 31 Jan 2014
Posts: 6

PostPosted: Sat Feb 01, 2014 6:56 am    Post subject: Reply with quote

I investigated the contents of /proc/filesystems with openrc's interactive mode and everything seems ok there (both tmpfs, mqueue and devpts are there). That means that the next line with mountinfo makes the script skip the mount process.
Back to top
View user's profile Send private message
R8sR1wwlae
n00b
n00b


Joined: 31 Jan 2014
Posts: 6

PostPosted: Sat Feb 01, 2014 7:12 am    Post subject: Reply with quote

mountinfo is located in /lib64/rc/bin/mountinfo
I looked at it at the first accessible with interactive mode moment of openrc and right before devfs is started - both /dev/shm and /dev/pts are already there, but /dev/mqueue isn't. That's why it runs for /dev/mqueue but skips /dev/shm and /dev/pts. Now I'll have to investigae where /dev/shm comes from before openrc.
Back to top
View user's profile Send private message
R8sR1wwlae
n00b
n00b


Joined: 31 Jan 2014
Posts: 6

PostPosted: Sat Feb 01, 2014 6:24 pm    Post subject: Reply with quote

I was slightly wrong about all this. I actually had /dev/shm mounted but with wrong flags - 0755 instead of 1777, also noexec, nosuid and nodev got lost too. The problem was genkernel-next. I removed it, installed genkernel, rebuilt kernel and initramfs, rewrote grub config and the problem disappeared.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo 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