From df32ae0a1a7236efc31bc26e0ff42840969899e1 Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Mon, 11 Mar 2019 14:12:23 +0100 Subject: [PATCH] stuff --- Makefile | 2 +- boot/grub/grub-install.sh | 4 ++++ boot/grub/umount.sh | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9383282..7403716 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ ASM=nasm LD=ld ASMFLAGS=-f elf64 -LDFLAGS= -melf_x86_64 +LDFLAGS=-melf_x86_64 #Folders MBRDIR=boot/grub diff --git a/boot/grub/grub-install.sh b/boot/grub/grub-install.sh index 44d591f..cd76028 100755 --- a/boot/grub/grub-install.sh +++ b/boot/grub/grub-install.sh @@ -38,6 +38,10 @@ sudo losetup /dev/loop1 $1 -o 1048576 > /dev/null #mounting the logical partitio echo ${CL2}[grub-install.sh]${NC} Mounting volume... \(mount\)${CL3} ## Mount +if [ -e $2/boot ]  +then + sudo umount $2 > /dev/null +fi sudo mount /dev/loop1 $2 > /dev/null echo ${CL2}[grub-install.sh]${NC} Installing grub... \(grub-install\)${CL3} diff --git a/boot/grub/umount.sh b/boot/grub/umount.sh index cf8035b..0948aba 100755 --- a/boot/grub/umount.sh +++ b/boot/grub/umount.sh @@ -29,8 +29,8 @@ CL3='\033[0m' NC='\033[1;37m' set -e #exit if error -#sleep 3 sync +sleep 1 echo ${CL2}[umount.sh]${NC} Unmounting volume... \(umount\)${CL3} sudo umount $1 echo ${CL2}[umount.sh]${NC} Unmounting image... \(losetup\)${CL3}