functions: fix unmounting for local builds

When building locally using the auto/build script unmounting fails.

Avoid mounting via bind. Mount mountpoint/dev as devtmpfs file system and
mountpoint/dev/pts as devpts file system.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
use-lxd-installer
Heinrich Schuchardt 3 years ago
parent 91d635d844
commit 1b6b3db5ed

@ -131,7 +131,8 @@ setup_mountpoint() {
chown root:kmem /dev/mem
fi
mount --rbind /dev "$mountpoint/dev"
mount dev-live -t devtmpfs "$mountpoint/dev"
mount devpts-live -t devpts -o nodev,nosuid "$mountpoint/dev/pts"
mount proc-live -t proc "$mountpoint/proc"
mount sysfs-live -t sysfs "$mountpoint/sys"
mount securityfs -t securityfs "$mountpoint/sys/kernel/security"

Loading…
Cancel
Save