Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
permissions problem on /dev/shm after udev upgrade[SOLVED]
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
jserink
l33t
l33t


Joined: 30 Jan 2004
Posts: 643

PostPosted: Thu Apr 25, 2013 2:24 pm    Post subject: permissions problem on /dev/shm after udev upgrade[SOLVED] Reply with quote

Hi All:

After my udev-200 upgrade (which I had put off for 3 weeks) everything network wise is fine...
my eth0 is not enp0s25 and wlan0 is wlp3s0. That all works....but I get this message when trying to start chromium:
[4601:4623:0425/221717:FATAL:shared_memory_posix.cc(176)] This is frequently caused by incorrect permissions on /dev/shm. Try 'sudo chmod 1777 /dev/shm' to fix.

Similar error when I try and start my VM with:
qemu-kvm -boot c -hda /home/jserink/VMs/Win_7_Pro.img -cdrom /home/jserink/CDs/virtio-win-0.1-49.iso -m 6291 -smp 2 -usb -net nic,vlan=0,model=virtio,macaddr=52:54:00:00:EE:07 -net vde -rtc base=localtime -no-quit -vga qxl -global qxl.vram_size=128000 -name Win7 -monitor telnet:127.0.0.1:12997,server,nowait,ipv4 -spice port=15900,addr=127.0.0.1,disable-ticketing -device virtio-serial-pci -device virtserialport,chardev=spicechannel0,name=com.redhat.spice.0 -chardev spicevmc,id=spicechannel0,name=vdagent &

Simple enough fix, at a root prompt I just to this:
chmod 1777 /dev/shm

But I should not have to do this.
I tried adding a 'rw' to fstab but that did not fix it:
jserinki7 jserink # cat /etc/fstab
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed); notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#

# <fs> <mountpoint> <type> <opts> <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
#/dev/sda2 /boot ext2 noauto,noatime 1 2
/dev/sda10 / ext4 noatime 0 1
/dev/sda5 none swap sw 0 0
/dev/sda6 /var ext4 noatime 0 0
/dev/sda7 /usr ext4 noatime 0 0
/dev/sda8 /opt ext4 noatime 0 0
/dev/sda9 /tmp ext4 noatime 0 0
/dev/sda11 /mnt/shr ext3 noatime 0 0
/dev/sda3 /mnt/WindowsC ntfs-3g unamsk=000,users,noatime,uid=jserink,gid=users 0 0
/dev/sda12 /home ext4 noatime 0 0
#/dev/cdrom /mnt/cdrom auto noauto,user 0 0
#/dev/fd0 /mnt/floppy auto noauto 0 0
proc /proc proc defaults 0 0
shm /dev/shm devtmpfs nodev,nosuid,noexec,rw 0 0
tmpfs /var/firefoxcache devtmpfs size=100M,mode=0777 0 0
#tmpfs /var/chromiumcache tmpfs size=100M,mode=0777 0 0
cache-chromium /home/jserink/.cache/chromium devtmpfs defaults,noatime,mode=1777 0 0


Any gurus know how to fix this?
I want to avoid and ungly bootup hack in the local.d directory.

Cheers,
john


Last edited by jserink on Fri Apr 26, 2013 12:42 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 8600

PostPosted: Fri Apr 26, 2013 1:16 am    Post subject: Reply with quote

Why are you mounting devtmpfs at /dev/shm? You should never mount devtmpfs explicitly.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Fri Apr 26, 2013 10:22 am    Post subject: Reply with quote

I use in /etc/fstab:
Code:
shm /dev/shm tmpfs defaults,nodev,nosuid,mode=1777 0 0


Arch wiki has a slight variation.
Back to top
View user's profile Send private message
jserink
l33t
l33t


Joined: 30 Jan 2004
Posts: 643

PostPosted: Fri Apr 26, 2013 12:42 pm    Post subject: Reply with quote

Hu wrote:
Why are you mounting devtmpfs at /dev/shm? You should never mount devtmpfs explicitly.

Because of this:
2. devtmpfs support:

You need at least version 2.6.32 of the kernel for devtmpfs
functionality. Once you have this, make sure CONFIG_DEVTMPFS=y is set
in the kernel configuration. See the gentoo udev guide for the option in
make menuconfig [1].

If you have a line for /dev in /etc/fstab, make sure it is configured
for file system type devtmpfs (not tmpfs or any other type). Also, you
can remove this line if you prefer, since devtmpfs is mounted
automatically.


I changed it to this:
shm /dev/shm tmpfs nodev,nosuid,noexec,rw 0 0

And it works now.

Cheers,
John
Back to top
View user's profile Send private message
ssuominen
Developer
Developer


Joined: 30 Sep 2005
Posts: 2000
Location: Finland

PostPosted: Sat Apr 27, 2013 7:42 am    Post subject: Reply with quote

jserink wrote:

I changed it to this:
shm /dev/shm tmpfs nodev,nosuid,noexec,rw 0 0

And it works now.


There shouldn't be /dev/shm line in /etc/fstab at all, you are just replicating the defaults there as it's automounted already with those options. Some outdated guides are telling people to put
that line to /etc/fstab, but that's all they are, outdated guides.
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Sat Apr 27, 2013 11:01 am    Post subject: Reply with quote

ssuominen wrote:
it's automounted

By what?
Back to top
View user's profile Send private message
ssuominen
Developer
Developer


Joined: 30 Sep 2005
Posts: 2000
Location: Finland

PostPosted: Sat Apr 27, 2013 11:15 am    Post subject: Reply with quote

PaulBredbury wrote:
ssuominen wrote:
it's automounted

By what?


udev (udev, udev-mount init scripts, devtmpfs)
Back to top
View user's profile Send private message
jserink
l33t
l33t


Joined: 30 Jan 2004
Posts: 643

PostPosted: Thu May 02, 2013 11:40 pm    Post subject: Reply with quote

I've removed the shm entry from my fstab and everything still works so it appears it does not need to be there.

Good tip.
jserink@jserinki7 ~ $ cat /etc/fstab
# /etc/fstab: static file system information.
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed); notail increases performance of ReiserFS (at the expense of storage
# efficiency). It's safe to drop the noatime options if you want and to
# switch between notail / tail freely.
#
# The root filesystem should have a pass number of either 0 or 1.
# All other filesystems should have a pass number of 0 or greater than 1.
#
# See the manpage fstab(5) for more information.
#

# <fs> <mountpoint> <type> <opts> <dump/pass>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
#/dev/sda2 /boot ext2 noauto,noatime 1 2
/dev/sda10 / ext4 noatime 0 1
/dev/sda5 none swap sw 0 0
/dev/sda6 /var ext4 noatime 0 0
/dev/sda7 /usr ext4 noatime 0 0
/dev/sda8 /opt ext4 noatime 0 0
/dev/sda9 /tmp ext4 noatime 0 0
/dev/sda11 /mnt/shr ext3 noatime 0 0
/dev/sda3 /mnt/WindowsC ntfs-3g unamsk=000,users,noatime,uid=jserink,gid=users 0 0
/dev/sda12 /home ext4 noatime 0 0
#/dev/cdrom /mnt/cdrom auto noauto,user 0 0
#/dev/fd0 /mnt/floppy auto noauto 0 0
proc /proc proc defaults 0 0
#shm /dev/shm tmpfs nodev,nosuid,noexec,rw 0 0
tmpfs /var/firefoxcache devtmpfs size=100M,mode=0777 0 0
#tmpfs /var/chromiumcache tmpfs size=100M,mode=0777 0 0
cache-chromium /home/jserink/.cache/chromium devtmpfs defaults,noatime,mode=1777 0 0


Cheers,
john
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