usbinstall.sh: set correct prefix to fix EFI boot; fix unmounting ISO image at the end

This commit is contained in:
Silvan Calarco 2022-10-22 13:25:18 +02:00
parent 94e31d7735
commit 2755d67869

View File

@ -242,7 +242,7 @@ fi
# create EFI grub 32 and 64 bit images
mkdir -p $MOUNTDIR_EFI/EFI/BOOT/
grub-mkimage -o $MOUNTDIR_EFI/EFI/BOOT/bootx64.efi -O x86_64-efi -p /efi/boot \
grub-mkimage -o $MOUNTDIR_EFI/EFI/BOOT/bootx64.efi -O x86_64-efi -p "(,msdos2)/boot/grub" \
part_gpt part_msdos ntfs ntfscomp hfsplus fat ext2 normal chain boot linux echo \
help gfxterm gettext png efi_gop efi_uga search search_label search_fs_uuid || {
errorAndExit $"Error: unable to create GRUB x86_64-efi image" &>>$LOGFILE
@ -250,7 +250,7 @@ grub-mkimage -o $MOUNTDIR_EFI/EFI/BOOT/bootx64.efi -O x86_64-efi -p /efi/boot \
# 32bit EFI optional because untested and curently missing in x86_64 arch
if [ -d /usr/lib/grub/i386-efi ]; then
grub-mkimage -o $MOUNTDIR_EFI/EFI/BOOT/bootia32.efi -O i386-efi -p /efi/boot \
grub-mkimage -o $MOUNTDIR_EFI/EFI/BOOT/bootia32.efi -O i386-efi -p "(,msdos2)/boot/grub" \
part_gpt part_msdos ntfs ntfscomp hfsplus fat ext2 normal chain boot linux echo \
help gfxterm gettext png efi_gop efi_uga search search_label search_fs_uuid || {
errorAndExit $"Error: unable to create GRUB i386-efi image" &>>$LOGFILE
@ -352,13 +352,12 @@ search --no-floppy --label --set=root openmamba_live
mkdir boot/grub
cp $MOUNTDIR_EFI/EFI/BOOT/grub.cfg boot/grub/grub.cfg
umount $ISOMOUNTDIR
rmdir $ISOMOUNTDIR
else
cp -a $ISOMOUNTDIR/boot/grub boot/
sed -i "s|root=live:LABEL=[^[:space:]]*|root=live:LABEL=openmamba_live rd.live.overlay=/dev/disk/by-label/openmamba_live:/rwroot|" boot/grub/grub.cfg
cp boot/grub/grub.cfg $MOUNTDIR_EFI/EFI/BOOT/grub.cfg
fi
umount $ISOMOUNTDIR
rmdir $ISOMOUNTDIR
fi
set_pbar 85