From b2e96fae1957229fb63649122023f5e0c3d3332a Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 1 Apr 2017 22:42:00 -0300 Subject: Mount /dev /proc /sys only for grub at kvmx-create --- kvmx-create | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/kvmx-create b/kvmx-create index 2e73f94..05d7571 100755 --- a/kvmx-create +++ b/kvmx-create @@ -203,9 +203,6 @@ function kvmx_create_custom { # Initial configuration. echo "Applying initial configuration..." - 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 # Hostname configuration. echo $hostname.$domain | $SUDO tee $WORK/etc/hostname > /dev/null @@ -287,14 +284,17 @@ iface ens3 inet dhcp EOF # Grub + 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 $APT_INSTALL grub-pc -y kvmx_sudo_run chroot $WORK/ update-grub kvmx_sudo_run chroot $WORK/ grub-install $device - - # Teardown kvmx_sudo_run umount $WORK/proc kvmx_sudo_run umount $WORK/sys kvmx_sudo_run umount $WORK/dev + + # Umount image kvmx_sudo_run umount $WORK kvmx_sudo_run rmdir $WORK kvmx_sudo_run losetup -d $device -- cgit v1.2.3