Skip to content
This repository was archived by the owner on Sep 8, 2023. It is now read-only.

Commit 9ae32a7

Browse files
committed
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.
1 parent d759ab6 commit 9ae32a7

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

mbusb.cfg

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ fi
2121
# Function to look for boot files
2222
function search_files {
2323
root="$1"
24+
found=""
2425

2526
insmod bitmap
2627
insmod jpeg
@@ -33,6 +34,7 @@ function search_files {
3334
/boot/grub/x86_64-efi/grub.cfg \
3435
/EFI/BOOT/grub.cfg; do
3536
if [ -e "$grubfile" ]; then
37+
found="found"
3638
menuentry "GRUB boot ($grubfile)" "$grubfile" {
3739
grub_file="$2"
3840
configfile "$grub_file"
@@ -52,6 +54,7 @@ function search_files {
5254
/boot/syslinux/isolinux.cfg \
5355
/boot/syslinux/syslinux.cfg; do
5456
if [ -e "$syslinuxfile" ]; then
57+
found="found"
5558
menuentry "SYSLINUX boot ($syslinuxfile)" "$syslinuxfile" {
5659
syslinux_file="$2"
5760
syslinux_configfile -i "$syslinux_file"
@@ -63,6 +66,7 @@ function search_files {
6366
/boot/grub/menu.lst \
6467
/menu.lst; do
6568
if [ -e "$legacyfile" ]; then
69+
found="found"
6670
menuentry "GRUB legacy boot ($legacyfile)" "$legacyfile" {
6771
legacy_file="$2"
6872
legacy_configfile "$legacy_file"
@@ -71,15 +75,22 @@ function search_files {
7175
done
7276

7377
if [ "x$grub_platform" == "xefi" ]; then
74-
for efifile in /efi/boot/bootx64.efi; do
78+
for efifile in \
79+
/efi/boot/bootx64.efi \
80+
/efi/microsoft/boot/bootmgfw.efi; do
7581
if [ -e "$efifile" ]; then
82+
found="found"
7683
menuentry "EFI boot ($efifile)" "$efifile" {
7784
efi_file="$2"
7885
chainloader "$efi_file"
7986
}
8087
fi
8188
done
8289
fi
90+
if [ "x$found" == "x" ]; then
91+
echo "no bootable things found on $root"
92+
sleep -v -i 5
93+
fi
8394

8495
}
8596

0 commit comments

Comments
 (0)