I have got two entries for /dev in /etc/fstab: udev /dev tmpfs exec,nosuid,mode=0755,size=10M 0 0 server:/ /mnt/server nfs noauto,rsize=8192,wsize=8192,hard,intr 0 0 /dev /mnt/server/dev none noauto,bind 0 0 The second /dev entry is for setting up a chroot for updating my server. udev-mount calls mount -n /dev, which fails, because the mountpoint /mnt/server/dev does not exist when udev-mount is started, resulting in udev-postmount et al. not being run. This breaks the subsequent boot process. A possible fix is to mount /dev in udev-mount with: mount -n udev Alternatively, there should be a check for "noauto" in the mount options and entries with "noauto" set should be skipped by udev-mount. I am using baselayout-2.0.1, openrc-0.4.3-r3 and udev-146-r1.
Why should "mount -n /dev" help, if you have multiple entries in fstab matching the abstract name "/dev"? According to the manpage: -n Mount without writing in /etc/mtab. This is necessary for example when /etc is on a read- only filesystem. The only change is not to write to /etc/mtab. There should be an option to restrict the mount argument to only match devices or only match directories and not both columns of /etc/fstab.
Created attachment 206619 [details, diff] Mount udev by device instead of by mountpoint You did not understand my suggested fix correctly. udev-postmount currently calls: mount -n */dev* I suggested it should call mount -n *udev* That is, change the argument to mount from mountpoint to device. See attached patch.
The problem with the approach of using "mount -n udev" is, that the string udev is just choosen arbitrary. There can be any valid string, so I think we cannot assume the user who adds this to /etc/fstab will use the string "udev" in this place.
Created attachment 206698 [details, diff] use fstabinfo --mount /dev for mounting /dev Another try at fixing this. Now uses fstabinfo --mount /dev instead of mount -n /dev.
udev-146-r2 and newer have new init-scripts that should work in your situation. The logic is this: mount_dev_directory() { if mountinfo -q /dev; then einfo "/dev is already mounted" return 0 fi # No options are processed here as they should all be in /etc/fstab ebegin "Mounting /dev" if ! fstabinfo --mount /dev; then # we mount devtmpfs if supported local fs=tmpfs grep -qs devtmpfs /proc/filesystems && fs=devtmpfs # Some devices require exec, Bug #92921 mount -n -t "$fs" -o "exec,nosuid,mode=0755,size=10M" udev /dev fi eend $? }