diff --git a/molior-deploy b/molior-deploy index 295b063..ff9307d 100755 --- a/molior-deploy +++ b/molior-deploy @@ -524,6 +524,8 @@ done EOM chmod +x $target/usr/sbin/policy-rc.d + mountbind /dev $target/dev + exit_on_error "Error mounting $target/dev" mountbind /dev/pts $target/dev/pts exit_on_error "Error mounting $target/dev/pts" mountbind /proc $target/proc ro @@ -574,6 +576,7 @@ umount_bootstrap() done umount $target/sys umount $target/dev/pts + umount $target/dev umount $target/tmp if [ -e $target/etc/apt/auth.conf ]; then umount $target/etc/apt/auth.conf diff --git a/plugins/installer.plugin b/plugins/installer.plugin index 89a38a2..590d400 100644 --- a/plugins/installer.plugin +++ b/plugins/installer.plugin @@ -134,6 +134,13 @@ prepare_initrd_deployment() # in case of using a base roots, there is no instroot debootstrap left, # copy full rootfs for creating the initrd cp -ar $target $WORK_DIR/instroot + + # mount bind the needed system folders to allow installing without errors + mount --bind /dev $WORK_DIR/instroot/dev + mount --bind /dev/pts $WORK_DIR/instroot/dev/pts + mount --bind /proc $WORK_DIR/instroot/proc + mount --bind /sys $WORK_DIR/instroot/sys + chroot $WORK_DIR/instroot apt-get update >&2 fi @@ -275,6 +282,12 @@ EOF cp -L $WORK_DIR/instroot/boot/initrd.img-$kernel_version $WORK_DIR/out/initrd.img cp -L $WORK_DIR/instroot/boot/vmlinuz-$kernel_version $WORK_DIR/out/vmlinuz + # unmount the previous mounted system folders + umount $WORK_DIR/instroot/sys + umount $WORK_DIR/instroot/proc + umount $WORK_DIR/instroot/dev/pts + umount $WORK_DIR/instroot/dev + cat >$WORK_DIR/out/README.md <