From 654182b614c9065fd8f5a7a642ee03a47d79534e Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sun, 2 Sep 2018 15:50:05 -0300 Subject: Mount /run and /dev/pts on kvmx-create --- kvmx-create | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'kvmx-create') diff --git a/kvmx-create b/kvmx-create index 95d4d53..1ebfe0b 100755 --- a/kvmx-create +++ b/kvmx-create @@ -211,7 +211,7 @@ function kvmx_create_custom { kvmx_sudo_run mount ${device}${partition_prefix}2 $WORK/ # Trap $WORK umount - trap 'if [ -e "$WORK" ]; then umount $WORK/{sys,proc,dev} &> /dev/null; umount $WORK &> /dev/null; rmdir $WORK; fi' INT TERM EXIT + trap 'if [ -e "$WORK" ]; then umount $WORK/{proc,sys,run,dev/pts,dev} &> /dev/null; umount $WORK &> /dev/null; rmdir $WORK; fi' INT TERM EXIT # Non-interactive installation #APT_INSTALL="LC_ALL=C DEBIAN_FRONTEND=noninteractive kvmx_sudo_run chroot $WORK/ apt-get install -y" @@ -261,9 +261,11 @@ function kvmx_create_custom { fi # Mount auxiliary filesystems needed by the bootloader - kvmx_sudo_run mount none -t proc $WORK/proc - kvmx_sudo_run mount none -t sysfs $WORK/sys - kvmx_sudo_run mount -o bind /dev/ $WORK/dev + kvmx_sudo_run mount none -t proc $WORK/proc + kvmx_sudo_run mount none -t sysfs $WORK/sys + kvmx_sudo_run mount -o bind /run/ $WORK/run + kvmx_sudo_run mount -o bind /dev/ $WORK/dev + kvmx_sudo_run mount -o bind /dev/pts $WORK/dev/pts # Initial upgrade echo "Updating list of packages..." @@ -311,6 +313,8 @@ EOF # Umount auxiliary filesystems kvmx_sudo_run umount $WORK/proc kvmx_sudo_run umount $WORK/sys + kvmx_sudo_run umount $WORK/run + kvmx_sudo_run umount $WORK/dev/pts kvmx_sudo_run umount $WORK/dev # Run basic provision -- cgit v1.2.3