From 9ae32a73ae120bc1698d56ea6ee7e0e9cf81cd1d Mon Sep 17 00:00:00 2001 From: Mark Furland Date: Mon, 26 Mar 2018 19:07:57 -0400 Subject: [PATCH] Find win7 partition; explain if can't find configfile If someone uses "Auto-detect ISO's configfiles" or "Auto-detect bootable partitions" and it doesn't find anything it just blinks and is confusing, so this shows a message and waits 5 seconds. This also searches for `/efi/microsoft/boot/bootdmgfw.efi` which should be the efi boot file for a windows 7 installer. --- mbusb.cfg | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/mbusb.cfg b/mbusb.cfg index a7a0c6c1..579b4a1d 100644 --- a/mbusb.cfg +++ b/mbusb.cfg @@ -21,6 +21,7 @@ fi # Function to look for boot files function search_files { root="$1" + found="" insmod bitmap insmod jpeg @@ -33,6 +34,7 @@ function search_files { /boot/grub/x86_64-efi/grub.cfg \ /EFI/BOOT/grub.cfg; do if [ -e "$grubfile" ]; then + found="found" menuentry "GRUB boot ($grubfile)" "$grubfile" { grub_file="$2" configfile "$grub_file" @@ -52,6 +54,7 @@ function search_files { /boot/syslinux/isolinux.cfg \ /boot/syslinux/syslinux.cfg; do if [ -e "$syslinuxfile" ]; then + found="found" menuentry "SYSLINUX boot ($syslinuxfile)" "$syslinuxfile" { syslinux_file="$2" syslinux_configfile -i "$syslinux_file" @@ -63,6 +66,7 @@ function search_files { /boot/grub/menu.lst \ /menu.lst; do if [ -e "$legacyfile" ]; then + found="found" menuentry "GRUB legacy boot ($legacyfile)" "$legacyfile" { legacy_file="$2" legacy_configfile "$legacy_file" @@ -71,8 +75,11 @@ function search_files { done if [ "x$grub_platform" == "xefi" ]; then - for efifile in /efi/boot/bootx64.efi; do + for efifile in \ + /efi/boot/bootx64.efi \ + /efi/microsoft/boot/bootmgfw.efi; do if [ -e "$efifile" ]; then + found="found" menuentry "EFI boot ($efifile)" "$efifile" { efi_file="$2" chainloader "$efi_file" @@ -80,6 +87,10 @@ function search_files { fi done fi + if [ "x$found" == "x" ]; then + echo "no bootable things found on $root" + sleep -v -i 5 + fi }