}
}
+ mkdir "$targetdir/mnt";
+ mkdir "$targetdir/mnt/hostrun";
+ syscmd("mount --bind /run $targetdir/mnt/hostrun") == 0 ||
+ die "unable to bindmount run on $targetdir/mnt/hostrun\n";
+
update_progress(1, 0.05, $maxper, "extracting base system");
my ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size) = stat ($basefile);
die "unable to mount proc on $targetdir/proc\n";
syscmd("mount -n -t sysfs sysfs $targetdir/sys") == 0 ||
die "unable to mount sysfs on $targetdir/sys\n";
+ syscmd("chroot $targetdir mount --bind /mnt/hostrun /run") == 0 ||
+ die "unable to re-bindmount hostrun on /run in chroot\n";
update_progress(1, $maxper, 0.5, "configuring base system");
syscmd("chroot $targetdir /usr/bin/dpkg-query -W --showformat='\${package}\n'> final.pkglist");
}
+ syscmd("umount $targetdir/run");
+ syscmd("umount $targetdir/mnt/hostrun");
syscmd("umount $targetdir/tmp");
syscmd("umount $targetdir/proc");
syscmd("umount $targetdir/sys");
umount -l -n /target >/dev/null 2>&1
umount -l -n /dev
+ umount -l -n /run
umount -l -n /sys
umount -l -n /proc
mount -n -t proc proc /proc
mount -n -t sysfs sysfs /sys
+mount -n -t tmpfs tmpfs /run
parse_cmdline