Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 375947 - sys-kernel/genkernel: busybox mdev devpts permissions problems in initramfs
Summary: sys-kernel/genkernel: busybox mdev devpts permissions problems in initramfs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2011-07-21 23:24 UTC by Christopher Byrne
Modified: 2011-07-28 06:06 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Byrne 2011-07-21 23:24:51 UTC
The genkernel generated initramfs now mounts devpts however it does with the wrong mount options - it does so with "mode 600" instead of "mode 620". While this doesn't create a booting problem. The initscripts don't fix it, since it sees devpts still mounted so doesn't remount it. This create problems later on with libvirt / qemu - and results in a 'chardev: opening backend "pty" failed'

Either the runmdev function in ./etc/initrd.scripts needs to mount devpts with the correct permissions or devpts needs to be unmounted before switch_root (or both) .
Comment 1 Sebastian Pipping gentoo-dev 2011-07-22 18:02:06 UTC
# fgrep -R devpts .
./defaults/initrd.scripts:	mount -t devpts devpts /dev/pts  || bad_msg "Failed to mount /dev/pts"
./netboot/linuxrc.x:		mount devpts	/dev/pts 	-t devpts		# /dev/pts


In "man mount" I find:

  A value of mode=620 and gid=5 makes "mesg y" the default on newly
  created PTYs.

So is appending "mode=620,gid=5" what you want?
Comment 2 Christopher Byrne 2011-07-23 04:09:53 UTC
Yes - this the way its setup in /usr/share/openrc/runlevels/sysinit/devfs by default (as of openrc-0.8.3-r1), if devpts is not listed in /etc/fstab .
Comment 3 Sebastian Pipping gentoo-dev 2011-07-23 09:51:02 UTC
With this patch

http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commitdiff;h=4c0b4b18f8ceb634097e159d212782569acd3260

I now get

  # mount | grep pts
  devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)

If a soon next release would help, that can be done.
Comment 4 Christopher Byrne 2011-07-24 04:23:15 UTC
I built the latest git with the new patch, the pts permission are now correct and virt-manager now starts up VMs correctly
Comment 5 Sebastian Pipping gentoo-dev 2011-07-24 09:11:41 UTC
Cool, thanks for the feedback.
Comment 6 Sebastian Pipping gentoo-dev 2011-07-28 06:06:08 UTC
genkernel 3.4.18 including the fix has been released, closing.