diff --git a/alpine-install-on-disk.sh b/alpine-install-on-disk.sh index 4869b5e..7068401 100755 --- a/alpine-install-on-disk.sh +++ b/alpine-install-on-disk.sh @@ -25,7 +25,7 @@ rootfs_tmpdir=$(mktemp -d) rootfs_url="http://dl-cdn.alpinelinux.org/alpine/v$MAJOR_VERSION/releases/x86_64/$IMAGE" run_root () { - sudo chroot $rootfs_tmpdir + sudo chroot $rootfs_tmpdir /usr/bin/env \ PATH=/sbin:/bin:/usr/sbin:/usr/bin \ /bin/sh -c "$*" } @@ -95,7 +95,7 @@ run_root grub-install --target=i386-pc ${DISK} # Cleanup run_root rm -f /etc/resolv.conf for dir in dev proc sys; do - sudo mount --bind /${dir} ${rootfs_tmpdir}/${dir} + sudo umount ${rootfs_tmpdir}/${dir} done sudo umount $rootfs_tmpdir