Add sync statement for efi_create_syructure() + indetation

This commit is contained in:
Yorick Barbanneau 2019-02-25 12:36:55 +01:00
parent 7345b86390
commit e2f41eb862

17
init.sh
View file

@ -167,7 +167,7 @@ fi
# unmount if device is mounted
umount_device (){
local mounted_part=$(mount | grep "${1}[0-9]" | awk '{print $3}')
if [ ! -z $mounted_part ]
if [ ! "$mounted_part" == "" ]
then
for part in $mounted_part
do
@ -181,13 +181,14 @@ fi
}
efi_create_key_structure () {
parted -s $1 mklabel gpt mkpart EFS fat32 1MiB 128MiB set 1 boot on mkpart debian fat32 128MiB 100%
sleep 2
mkfs.vfat ${1}1 -n efi &> /dev/null
mkfs.vfat ${1}2 -n debian &> /dev/null
mount ${1}2 $2
create_dir $2/efi
mount ${1}1 $2/efi
parted -s $1 mklabel gpt mkpart EFS fat32 1MiB 128MiB set 1 boot on mkpart debian fat32 128MiB 100%
sleep 2
mkfs.vfat ${1}1 -n efi &> /dev/null
mkfs.vfat ${1}2 -n debian &> /dev/null
sync
mount ${1}2 $2
create_dir $2/efi
mount ${1}1 $2/efi
}
bios_create_key_structure() {