usbinstall.sh: set correct prefix to fix EFI boot; fix unmounting ISO image at the end
This commit is contained in:
parent
94e31d7735
commit
2755d67869
@ -242,7 +242,7 @@ fi
|
|||||||
|
|
||||||
# create EFI grub 32 and 64 bit images
|
# create EFI grub 32 and 64 bit images
|
||||||
mkdir -p $MOUNTDIR_EFI/EFI/BOOT/
|
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 \
|
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 || {
|
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
|
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
|
# 32bit EFI optional because untested and curently missing in x86_64 arch
|
||||||
if [ -d /usr/lib/grub/i386-efi ]; then
|
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 \
|
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 || {
|
help gfxterm gettext png efi_gop efi_uga search search_label search_fs_uuid || {
|
||||||
errorAndExit $"Error: unable to create GRUB i386-efi image" &>>$LOGFILE
|
errorAndExit $"Error: unable to create GRUB i386-efi image" &>>$LOGFILE
|
||||||
@ -294,14 +294,14 @@ else
|
|||||||
ps $CPPID >/dev/null
|
ps $CPPID >/dev/null
|
||||||
while [ $? -eq 0 ]; do
|
while [ $? -eq 0 ]; do
|
||||||
if [ -e $DEST_FILE ]; then
|
if [ -e $DEST_FILE ]; then
|
||||||
DEST_SIZE=$(stat -c %s $DEST_FILE)
|
DEST_SIZE=$(stat -c %s $DEST_FILE)
|
||||||
percentuale=$((30 + ( 50 * $DEST_SIZE ) / $ORIG_SIZE ))
|
percentuale=$((30 + ( 50 * $DEST_SIZE ) / $ORIG_SIZE ))
|
||||||
set_pbar $percentuale
|
set_pbar $percentuale
|
||||||
fi
|
fi
|
||||||
sleep 2
|
sleep 2
|
||||||
ps $CPPID >/dev/null
|
ps $CPPID >/dev/null
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -e $ISOMOUNTDIR/boot/isolinux/isolinux.cfg ]; then
|
if [ -e $ISOMOUNTDIR/boot/isolinux/isolinux.cfg ]; then
|
||||||
# basic extlinux.conf -> grub.cfg conversion
|
# basic extlinux.conf -> grub.cfg conversion
|
||||||
# Legacy for old openmamba iso images with isolinux bootloader
|
# Legacy for old openmamba iso images with isolinux bootloader
|
||||||
@ -352,13 +352,12 @@ search --no-floppy --label --set=root openmamba_live
|
|||||||
|
|
||||||
mkdir boot/grub
|
mkdir boot/grub
|
||||||
cp $MOUNTDIR_EFI/EFI/BOOT/grub.cfg boot/grub/grub.cfg
|
cp $MOUNTDIR_EFI/EFI/BOOT/grub.cfg boot/grub/grub.cfg
|
||||||
umount $ISOMOUNTDIR
|
|
||||||
rmdir $ISOMOUNTDIR
|
|
||||||
else
|
else
|
||||||
cp -a $ISOMOUNTDIR/boot/grub boot/
|
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
|
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
|
fi
|
||||||
|
umount $ISOMOUNTDIR
|
||||||
|
rmdir $ISOMOUNTDIR
|
||||||
fi
|
fi
|
||||||
set_pbar 85
|
set_pbar 85
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user