Skip to content

Commit cd3864a

Browse files
authored
Merge pull request #460 from haxj/master
Fix issue #459 and #439
2 parents 7c86a2b + 91f494c commit cd3864a

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

data/multibootusb/grub/win.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ if [ ${grub_platform} == "efi" ]; then
3434
}
3535
fi
3636

37-
if [ -e /bootmgr.efi ]; then
38-
menuentry "Microsoft Windows Vista/7/8/8.1 UEFI Boot (bootmgr.efi)" {
37+
if [ -e /EFI/BOOT_WINDOWS/bootx64.efi ]; then
38+
menuentry "Microsoft Windows Vista/7/8/8.1 UEFI Boot (bootx64.efi)" {
3939
insmod part_gpt
4040
insmod fat
4141
insmod search_fs_uuid
4242
insmod chain
4343
# search --fs-uuid --set=root $hints_string $fs_uuid
44-
chainloader /bootmgr.efi
44+
chainloader /EFI/BOOT_WINDOWS/bootx64.efi
4545
}
4646
fi
4747

scripts/distro.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,12 @@ def detect_iso_from_file_list(iso_file_list):
212212

213213
filenames = [f.lower() for f in iso_file_list]
214214
for keys, distro in keys_to_distro:
215-
if all(k in filenames for k in keys):
215+
match = True
216+
for k in keys:
217+
if all(k not in fn for fn in filenames):
218+
match = False
219+
break
220+
if match is True:
216221
return distro
217222
#log("Examined %d %s in the iso but could not determine the distro."
218223
# % (len(filenames), len(filenames)==1 and 'filename' or 'filenames'))

scripts/update_cfg_file.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,13 @@ def fix_desktop_image_in_thema_callback(install_dir_for_grub,
412412
shutil.copy2(resource_path(os.path.join("data", "EFI", "BOOT", "bootx64.efi")),
413413
os.path.join(config.usb_mount, 'EFI', 'BOOT'))
414414
elif gen.grub_efi_exist(efi_grub_img) is False:
415-
gen.log('EFI image overwritten by distro install. Replacing it now...')
415+
if distro == "Windows":
416+
gen.log('EFI image overwritten by Windows install. Moving it now...')
417+
dst = os.path.join(config.usb_mount, 'EFI', 'BOOT_WINDOWS')
418+
os.makedirs(dst)
419+
shutil.move(efi_grub_img, dst)
420+
else:
421+
gen.log('EFI image overwritten by distro install. Replacing it now...')
416422
shutil.copy2(resource_path(os.path.join("data", "EFI", "BOOT", "bootx64.efi")),
417423
os.path.join(config.usb_mount, 'EFI', 'BOOT'))
418424
else:

0 commit comments

Comments
 (0)