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

Commit

Permalink
Find win7 partition; explain if can't find configfile
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mtfurlan committed Mar 26, 2018
1 parent d759ab6 commit 9ae32a7
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion mbusb.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ fi
# Function to look for boot files
function search_files {
root="$1"
found=""

insmod bitmap
insmod jpeg
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand All @@ -71,15 +75,22 @@ 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"
}
fi
done
fi
if [ "x$found" == "x" ]; then
echo "no bootable things found on $root"
sleep -v -i 5
fi

}

Expand Down

0 comments on commit 9ae32a7

Please sign in to comment.