This commit is contained in:
Adrien Bourmault 2019-03-11 14:12:23 +01:00
parent d92266ae34
commit df32ae0a1a
3 changed files with 6 additions and 2 deletions

View File

@ -28,7 +28,7 @@
ASM=nasm ASM=nasm
LD=ld LD=ld
ASMFLAGS=-f elf64 ASMFLAGS=-f elf64
LDFLAGS= -melf_x86_64 LDFLAGS=-melf_x86_64
#Folders #Folders
MBRDIR=boot/grub MBRDIR=boot/grub

View File

@ -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} echo ${CL2}[grub-install.sh]${NC} Mounting volume... \(mount\)${CL3}
## Mount ## Mount
if [ -e $2/boot ] 
then
sudo umount $2 > /dev/null
fi
sudo mount /dev/loop1 $2 > /dev/null sudo mount /dev/loop1 $2 > /dev/null
echo ${CL2}[grub-install.sh]${NC} Installing grub... \(grub-install\)${CL3} echo ${CL2}[grub-install.sh]${NC} Installing grub... \(grub-install\)${CL3}

View File

@ -29,8 +29,8 @@ CL3='\033[0m'
NC='\033[1;37m' NC='\033[1;37m'
set -e #exit if error set -e #exit if error
#sleep 3
sync sync
sleep 1
echo ${CL2}[umount.sh]${NC} Unmounting volume... \(umount\)${CL3} echo ${CL2}[umount.sh]${NC} Unmounting volume... \(umount\)${CL3}
sudo umount $1 sudo umount $1
echo ${CL2}[umount.sh]${NC} Unmounting image... \(losetup\)${CL3} echo ${CL2}[umount.sh]${NC} Unmounting image... \(losetup\)${CL3}