From cb4d2cc8de2164a2d48e2a80d62af1f557a46eea Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Wed, 5 Feb 2020 22:33:30 +0100 Subject: [PATCH] Bug with makefile that can erase host MBR (3) --- build/install-os-k.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/build/install-os-k.sh b/build/install-os-k.sh index e96a211..cfe6b19 100755 --- a/build/install-os-k.sh +++ b/build/install-os-k.sh @@ -31,8 +31,7 @@ NC='\033[1;37m' set -e #exit if error echo ${CL2}[install-os-k.sh]${NC} Mount image... \(udisksctl\)${CL3} -udisksctl loop-setup --offset 1048576 --no-user-interaction --file $1 -lpblock=$(/sbin/losetup -j $1 | cut -d ':' -f 1) +lpblock=$(udisksctl loop-setup --offset 1048576 --no-user-interaction --file $1 | cut -d ' ' -f 5 | sed 's/\.//g') echo ${CL2}[install-os-k.sh]${NC} Sync image... \(sync\)${CL3} sync @@ -51,9 +50,9 @@ then return 13 fi -echo ${CL2}[install-os-k.sh]${NC} Copying grub.cfg +echo ${CL2}[install-os-k.sh]${NC} Copying grub.cfg to $lpblock as $mountpoint cp $2 $mountpoint/boot/grub/grub.cfg -echo ${CL2}[install-os-k.sh]${NC} Copying kernel +echo ${CL2}[install-os-k.sh]${NC} Copying kernel to $lpblock as $mountpoint cp $3 $mountpoint/boot/kaleid echo ${CL2}[install-os-k.sh]${NC} Sync image... \(sync\)${CL3}