From cebfcf85f9034522a6521c40e1ae9c6d559f585f Mon Sep 17 00:00:00 2001 From: Andreas Florath Date: Sun, 22 Oct 2017 08:38:15 +0000 Subject: [PATCH] Use -t devpts for /dev/pts mounts Currently a bind is used when mounting /dev/pts in chroot. This leads to problems - especially when running DIB in parallel: It was observed that the /dev/pts mount vanishes from the host system. This patch uses '-t devpts' - as it is done for /sys and /proc - for handling /dev/pts. Change-Id: Id7775ae6fca6502af800e7b73a00862ef320206b Signed-off-by: Andreas Florath --- diskimage_builder/elements/yum-minimal/root.d/08-yum-chroot | 2 +- .../elements/zypper-minimal/root.d/08-zypper-chroot | 2 +- diskimage_builder/lib/common-functions | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/diskimage_builder/elements/yum-minimal/root.d/08-yum-chroot b/diskimage_builder/elements/yum-minimal/root.d/08-yum-chroot index 0e5291e5..d2a3a8a6 100755 --- a/diskimage_builder/elements/yum-minimal/root.d/08-yum-chroot +++ b/diskimage_builder/elements/yum-minimal/root.d/08-yum-chroot @@ -223,7 +223,7 @@ function _install_pkg_manager { sudo mkdir -p $TARGET_ROOT/proc $TARGET_ROOT/dev $TARGET_ROOT/sys sudo mount -t proc none $TARGET_ROOT/proc sudo mount --bind /dev $TARGET_ROOT/dev -sudo mount --bind /dev/pts $TARGET_ROOT/dev/pts +sudo mount -t devpts /dev/pts $TARGET_ROOT/dev/pts sudo mount -t sysfs none $TARGET_ROOT/sys # initalize rpmdb diff --git a/diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot b/diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot index 7d139eb0..c2c8a900 100755 --- a/diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot +++ b/diskimage_builder/elements/zypper-minimal/root.d/08-zypper-chroot @@ -87,7 +87,7 @@ sudo zypper ${ZYPPER_TARGET_OPTS} refresh sudo mkdir -p $TARGET_ROOT/proc $TARGET_ROOT/dev $TARGET_ROOT/sys sudo mount -t proc none $TARGET_ROOT/proc sudo mount --bind /dev $TARGET_ROOT/dev -sudo mount --bind /dev/pts $TARGET_ROOT/dev/pts +sudo mount -t devpts /dev/pts $TARGET_ROOT/dev/pts sudo mount -t sysfs none $TARGET_ROOT/sys # Install filesystem, base and useful tools diff --git a/diskimage_builder/lib/common-functions b/diskimage_builder/lib/common-functions index 31a21046..a610474c 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 --bind /dev/pts $TMP_MOUNT_PATH/dev/pts + sudo mount -t devpts /dev/pts $TMP_MOUNT_PATH/dev/pts sudo mount -t sysfs none $TMP_MOUNT_PATH/sys }