This commit is contained in:
Marcus 2023-05-01 03:42:40 +02:00
parent 175818ffc3
commit 4d5ee707b3

View file

@ -8,6 +8,7 @@
CHROOTCMD="chroot /mnt/" CHROOTCMD="chroot /mnt/"
target="$1"
message () { message () {
echo "== " $1 echo "== " $1
@ -45,8 +46,6 @@ Options:
exit 1 exit 1
fi fi
target="$1"
if [ ! -b "$target" ] if [ ! -b "$target" ]
then then
message "$target does not exist or is not a blockdevice." message "$target does not exist or is not a blockdevice."
@ -68,16 +67,14 @@ test "$DOINSTALL" == "YES" || error
message "... GOOD LUCK!" message "... GOOD LUCK!"
message "mounting $target to /mnt/" message "mounting $target to /mnt/"
mount $target /mnt || error mount $target /mnt || error
message "copy systemfiles"
message "copy systemfiles"
rsync -aHx / /mnt/ || error rsync -aHx / /mnt/ || error
message "bind mount dev proc sys" message "bind mount dev proc sys"
for m in dev proc sys for m in dev proc sys
do do
mount -o bind /$m /mnt/$m || error mount -o bind /$m /mnt/$m || error
done done
message "creating /boot directory" message "creating /boot directory"