From f2cc647dae7ebdc7314308e307864cf5b2933860 Mon Sep 17 00:00:00 2001 From: Markos Chandras Date: Mon, 6 Nov 2017 10:04:25 +0200 Subject: [PATCH] diskimage_builder: lib: common-functions: Fix options for devpts mount Commit cebfcf85f9034522a6521c40e1ae9c6d559f585f ("Use -t devpts for /dev/pts mounts") switched from using '--bind' to '-t devpts' for mounting the /dev/pts virtual filesystem. However, mounting devpts to another location also affects the host's /dev/pts mountpoint. Since we are now mounting devpts without options we end up with the following one on openSUSE devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000) instead of the one we want devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) The missing gid=5 options results to boot problems for virtual machines So in order to fix that, we need to use the existing devpts options for /dev/pts so we don't lose them in the new mount. Change-Id: I17f2c2bb96b807f8dbc07185ae0147bff3230f92 --- diskimage_builder/lib/common-functions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/diskimage_builder/lib/common-functions b/diskimage_builder/lib/common-functions index a610474c6..a71fee9b3 100644 --- a/diskimage_builder/lib/common-functions +++ b/diskimage_builder/lib/common-functions @@ -316,7 +316,7 @@ function mount_proc_dev_sys () { # supporting kernel file systems sudo mount -t proc none $TMP_MOUNT_PATH/proc sudo mount --bind /dev $TMP_MOUNT_PATH/dev - sudo mount -t devpts /dev/pts $TMP_MOUNT_PATH/dev/pts + sudo mount -t devpts -o $(mount | grep devpts | sed 's/.*(\(.*\))/\1/') devpts $TMP_MOUNT_PATH/dev/pts sudo mount -t sysfs none $TMP_MOUNT_PATH/sys }