Created attachment 1109474 [details] dmesg Description of problem: During the boot process the permissions for /dev/shm changes from 777 to 755 after loading initramfs. Mounted /boot/efi. Reached target Local File Systems. drwxrwxrwt 2 root root 60 Dec 25 13:20 /dev/shm drwxrwxrwt 2 root root 60 Dec 25 13:20 /dev/shm Starting Import network configuration from initramfs... drwxrwxrwt 2 root root 60 Dec 25 13:20 /dev/shm drwxrwxrwt 2 root root 60 Dec 25 13:20 /dev/shm drwxrwxrwt 2 root root 60 Dec 25 13:20 /dev/shm Starting Restore /run/initramfs on shutdown... Starting Preprocess NFS configuration... Starting Tell Plymouth To Write Out Runtime Data... Started Restore /run/initramfs on shutdown. ‘./dev/shm/lldpad.state’ -> ‘/dev/shm/lldpad.state’ drwxrwxrwt 2 root root 60 Dec 25 13:20 /dev/shm drwxr-xr-t 2 root root 60 Dec 25 13:20 /dev/shm Steps to Reproduce: 1. Boot machine 2. 3. Actual results: # ll -d /dev/shm drwxr-xr-t 2 root root 60 Dec 25 13:20 /dev/shm Expected results: # ll -d /dev/shm drwxrwxrwx 2 root root 60 Dec 25 13:20 /dev/shm Additional info: Initramfs state always loads /dev/shm with 755 and I am unsure where this gets set. # ll -d /run/initramfs/state/dev/shm/ drwxr-xr-x 2 root root 60 Dec 25 13:20 /run/initramfs/state/dev/shm/ I have tried rebuilding initramfs with dracut -f but it doesn't affect /state/dev/shm. # cat /proc/cmdline BOOT_IMAGE=/vmlinuz-4.4.0-0.rc6.git1.1.fc24.x86_64 root=/dev/mapper/fedora-root ro rd.lvm.lv=fedora/root rd.luks.uuid=luks-0ae4f23d-42c1-41d8-b6cc-ce1a7fbbff0c rd.lvm.lv=fedora/swap LANG=en_US.UTF-8
Created attachment 1109475 [details] dracut output
Created attachment 1109476 [details] fstab
Created attachment 1109477 [details] dmesg
Created attachment 1109478 [details] mtab
dracut-shutdown.service doesn't do anything during boot, the message from systemd is misleading. Most likely it's fedora-import-state.service that messes up /dev/shm. Does it help if you do 'systemctl mask fedora-import-state.service'?
It is an issue in the dracut module 'fcoe'. Dracut debug was showing this: ///lib/dracut/hooks/cleanup/90-cleanup-fcoe.sh@7(source): mkdir -m 0755 -p /run/initramfs/state/dev/shm ///lib/dracut/hooks/cleanup/90-cleanup-fcoe.sh@8(source): cp /dev/shm/lldpad.state /run/initramfs/state/dev/shm/ ///lib/dracut/hooks/cleanup/90-cleanup-fcoe.sh@9(source): echo 'files /dev/shm/lldpad.state' ‘./dev/shm/lldpad.state’ -> ‘/dev/shm/lldpad.state’ The code for the cleanup script looks ok to me: # cat /lib/dracut/modules.d/95fcoe/cleanup-fcoe.sh #!/bin/sh # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh if [ -e /var/run/lldpad.pid ]; then lldpad -k mkdir -m 0755 -p /run/initramfs/state/dev/shm cp /dev/shm/lldpad.state /run/initramfs/state/dev/shm/ > /dev/null 2>&1 echo "files /dev/shm/lldpad.state" >> /run/initramfs/rwtab fi ------------- The interesting part is that I am not running lldpad.service and no lldpad.pid exists, but the code still executes for some reason. # systemctl -all | grep lldp lldpad.service loaded inactive dead Link Layer Discovery My temporary solution is to add 'fcoe' and 'fcoe-uefi' as ignored modules to /etc/dracut.conf
The bug is really in fedora-readonly.service or maybe fedora-import-state.service from initscripts. But dracut should simply stop using those obsolete services.
https://github.com/haraldh/dracut/commit/e93ff1cf9aac8f97131b3101a5da240ce5f45239
The latest dracut update has fixed the issue on my computer: Version : 044 Release : 17.git20160108.fc24