Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions molior-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions plugins/installer.plugin
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 <<EOF
= Molior Installer for ${PROJECT}_${REVISION} `date -R` =

Expand Down