Jump to content











Photo
- - - - -

Boot multiple windows (7/10) installers


  • Please log in to reply
18 replies to this topic

#1 spajak

spajak
  • Members
  • 8 posts
  •  
    Poland

Posted 2 weeks ago

Hi,

 

I have my custom USB device with grub 2.02 and syslinux as bootloaders. Now I wonder If there is any chance to also have the bootable Windows 7 and Windows 10 installers on the same device (as grub or syslinux menu items). 

 

My question is: Is it possible to do it without any all-in-one builders like WinSetupFromUSB or YUMI, just with grub or syslinux and maybe some other low level tools. If yes, how it is done technically? I don't need a detailed guide, just the big picture.

 

I know I can boot Windows bootmgr from grub or syslinux, but what next? How to have both Windows installers on the same partition?

 



#2 cdob

cdob

    Gold Member

  • Expert
  • 1392 posts

Posted 2 weeks ago

I know I can boot Windows bootmgr from grub or syslinux, but what next? How to have both Windows installers on the same partition?

.
Can you clarify the boot conditions?
BIOS, UEFI without secure boot, UEFI with secure boot

Can you use Windows 10 (1703 and up prefered) to include the Windows parts?

Core approach:
setup.exe searches the local folder for .\sources\install.wim or .\install.wim.
This can be a sub directory. The Vista and up setup.exe does this.
\Win7_x64\setup.exe finds file \Win7_x64\sources\install.wim.

As for testing:
Copy files to USB
\Win10_1809_x64\setup.exe
\Win10_1809_x64\sources\
\Win7_x64\setup.exe
\Win7_x64\sources\
\Win7_x86\setup.exe
\Win7_x86\sources\

chainload bootmgr, boot a boot.wim/boot.sdi
press shift F10
change directory to a USB setup.exe
and run setup.exe

A old archived example (the batches are at localhost)
https://web.archive....=0

#3 spajak

spajak
  • Members
  • 8 posts
  •  
    Poland

Posted 2 weeks ago

Can you clarify the boot conditions?
BIOS, UEFI without secure boot, UEFI with secure boot

 

BIOS boot

 

As for testing:
Copy files to USB
\Win10_1809_x64\setup.exe
\Win10_1809_x64\sources\
\Win7_x64\setup.exe
\Win7_x64\sources\
\Win7_x86\setup.exe
\Win7_x86\sources\

 

Are there directories names important? Can I name them differently?

 

chainload bootmgr, boot a boot.wim/boot.sdi
press shift F10
change directory to a USB setup.exe
and run setup.exe

 

When I try to chainload Windows 10 bootmrg from grub I get this error:

"Error: invalid signature" 32/64 bit issue? I think I should add here that bootmgr partition is actually NTFS formatted 3rd partition on the disk. Maybe this is important here?

 

My grub entry is:

menuentry "Windows Setup" {
    search --no-floppy --file --set /boot/bootmgr
    chainloader /boot/bootmgr
}

Edited by spajak, 2 weeks ago.


#4 cdob

cdob

    Gold Member

  • Expert
  • 1392 posts

Posted 2 weeks ago

Are there directories names important? Can I name them differently?

Choose any directories names you like, however within reasons.
Even Unicode names should work.
However I'm using and support ASCII chars without spaces only.
 

actually NTFS formatted 3rd partition on the disk.

Bootmgr finds /boot/bcd at certain contions only. Should be a primary active parttion.
A 3rd partition may fail.
Copy /boot/ at primary active and /sources/ at 3rd NTFS partition.

Which USB device do you use? USB hard disk or USB flash?

ntldr does chainlaod bootmgr.
menuentry "$bootmode: Windows" {
if [ "$grub_platform" = "pc" ]; then
  ntldr /bootmgr
else
  chainloader /efi/microsoft/bootx64.efi
fi
}


#5 spajak

spajak
  • Members
  • 8 posts
  •  
    Poland

Posted 2 weeks ago

I use USB Hard Disk. I test it on VirtualBox.

 

 

Now I have (on blue screen):

 

Recovery

 

Your PC/Device needs to be repaired

 

A required device isn't connected or can't be accessed


Edited by spajak, 2 weeks ago.


#6 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14257 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 2 weeks ago

I use USB Hard Disk.

 

 

Now I have (on blue screen):

Yep :), but you should, besides reporting the symptom (the BSOD) also describe the exact setup you are using, "now".

 

:duff:

Wonko 



#7 cdob

cdob

    Gold Member

  • Expert
  • 1392 posts

Posted 2 weeks ago

Now I have (on blue screen):

That's goot, bootmgr is chainloaded.
As indicated already, describe more details. Hard disks layout, do not use

As for testing purposes, make small steps.
Try the basic configuration first:
one windows default files at a primary active partition.
Is grub stored at a primary active partition? Add one windows installation files to this partition, use default folder names. Do not use grub search.
If this works, start to change the layout.

#8 spajak

spajak
  • Members
  • 8 posts
  •  
    Poland

Posted 2 weeks ago

Yes grub2 is installed on the first active partition.

 

After changes my current disk layout is:

1. Primary partition NTFS, active, grub2, windows 10 sources

2. Primary partition EXT4, debian

3. Primary partition NTFS, data

 

As I mentioned earlier this is 500GB HDD in USB case.

I'm using Windows 10 Pro (1709) sources.

 

I was able to execute the Windows installer under Qemu (VirtualBox crashed when loading the installer, don't know why?). I didn't test the whole installation process though, I've stopped at the step of selecting the language to install.

 

VirtualBox crash while loading windows installer:

 

The I/O cache encountered an error while updating data in medium "ahci-0-0" (rc=VERR_ACCESS_DENIED). Make sure there is enough free space on the disk and that the disk is working properly. Operation can be resumed afterwards.

.


Edited by spajak, 2 weeks ago.


#9 cdob

cdob

    Gold Member

  • Expert
  • 1392 posts

Posted 2 weeks ago

1. Primary partition NTFS, active, grub2, windows 10 sources
2. Primary partition EXT4, debian
3. Primary partition NTFS, data
 
As I mentioned earlier this is 500GB HDD in USB case.

.
Which partition sizes do you use?
There are BIOS missing 48bit LBA at USB boot.
Hence the first 128 GiB are available at BIOS level.
The whole 500GB HDD may be available at given hardware, has to be verified.
A classic approach limits boot/installation files within first 128 GiB at HDD.

At which partition do you like to store the windows installation files finally?
/boot/bcd should reside at primary active partition at last.
/boot/bcd can be edited, boot.sdi and boot.wim mapped to other partitions.

#10 spajak

spajak
  • Members
  • 8 posts
  •  
    Poland

Posted 2 weeks ago

First partition is about 100GB, so there should be no problem.

I can have everything under this first partition, both grub and Windows bootloader and Windows sources.



#11 cdob

cdob

    Gold Member

  • Expert
  • 1392 posts

Posted 2 weeks ago

That's good. Time to add other setup.exe and sources folder. Compare post #2.
Boot to current active windows install, press shift F10 and run setup.exe.
Does Windows 7 and Windows 10 setup works so far?


Attached a AIO_directory.zip.
Expand this to a internal hard disk at Windows 10.
This edits boot.wim and adds entries to \boot\bcd.
OS default tools are used (e.g. dism.exe), no third party tools.

Copy Windows installation files to USB device first, example layout:
\boot\boot.sdi
\W7_x86\setup.exe
\W7_x86\sources\
\W7_x64\setup.exe
\W7_x64\sources\
\W8_x86\setup.exe
\W8_x86\sources\
\W8_x64\setup.exe
\W8_x64\sources\
\W10_x86\setup.exe
\W10_x86\sources\
\W10_x64\setup.exe
\W10_x64\sources\
\W10_x86_1809\setup.exe
\W10_x86_1809\sources\
\W10_x64_1809\setup.exe
\W10_x64_1809\sources\

Given a USB hard disk with a primay active 100 GB partiton U:
Run at elevated permissions.
make_boot_wim.cmd U:\


Another example (Windos 10 and up mounts two partitons at USB flash):
Given a USB flash with one FAT32 EFI partition S: and another NTFS datat partiton U:
make_boot_wim.cmd U:\ S:

Attached Files


Edited by cdob, 2 weeks ago.


#12 spajak

spajak
  • Members
  • 8 posts
  •  
    Poland

Posted 2 weeks ago

That's good. Time to add other setup.exe and sources folder. Compare post #2.
Boot to current active windows install, press shift F10 and run setup.exe.
Does Windows 7 and Windows 10 setup works so far?

 

I don't understand this. When to press shift F10?

 

Executing make_boot_wim.cmd finished without errors.

 

After boot in Qemu I get "Your PC/Device needs to be repaired" again, but with an option to try different os (F9), which immediately starts windows 10 installer. Installer hangs with error: "setup.exe not found" (setup_to_search path looks OK).


Edited by spajak, 2 weeks ago.


#13 spajak

spajak
  • Members
  • 8 posts
  •  
    Poland

Posted 2 weeks ago

I've just tested in on a real PC and the result is that windows 10 setup.exe is found and is starting. But earlier BSOD is the same...



#14 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14257 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 2 weeks ago

I don't understand this. When to press shift F10?

 

The "normal" boot.wim from a Windows 7+ install has hardcoded to autostart a shell that allows to install the system (or repair it) when you see that you press SHIFT+F10 and you get a CMD prompt open instead, see:

https://www.tenforum...ndows-10-a.html

 

:duff:

Wonko



#15 cdob

cdob

    Gold Member

  • Expert
  • 1392 posts

Posted 2 weeks ago

I've just tested in on a real PC and the result is that windows 10 setup.exe is found and is starting.


But earlier BSOD is the same...

Is there a default entry at \boot\bcd referencing \sources\boot.wim still. Does the error matches to this entry or to another entry?

Delete the default entry, if you don't use \sources\boot.wim.
Or delete \boot\bcd and run make_boot_wim.cmd again.

#16 spajak

spajak
  • Members
  • 8 posts
  •  
    Poland

Posted 2 weeks ago

I've removed the default entry from \boot\bcd and now it works fine. Now I have a choice between Windows 7 and 10 installations. I haven't tested the whole installation process though.

 

Thank you very much for your help!!

 

As of VirtualBox issue, didn't you have similar issue? I suspect it has something to do with NTFS filesystem.. Similar crash also happened when i tried to mount NTFS partition under Linux.



#17 cdob

cdob

    Gold Member

  • Expert
  • 1392 posts

Posted 2 weeks ago

Now I have a choice between Windows 7 and 10 installations.

Thanks for report.
 

I haven't tested the whole installation process though.

Remember there are no USB 3.0 drivers at a default Windows 7.
A default Windows 7 won't find the USB hard disk at a USB 3.0 port.

-use a USB 2.0 port,
-or include USB 3.0 drivers,
-or copy a Windows 10 entry and call the Windows 7 setup: use 'bcdedit /set {GUID} loadoptions SETUP=\Win7_x64\setup.exe'.
The Windows 10 boot.wim is launched and setup.vbs calls \Win7_x64\setup.exe.
 

As of VirtualBox issue

Sorry, I haven't used USB boot at VirtualBox in years.

#18 BlackDragon

BlackDragon
  • Members
  • 2 posts
  • Interests:Gentoo Linux, Debian Arch and Kali.And Constantly Fixing Winblows, (yes I Said Winblows No Typo.)
  •  
    United States

Posted A week ago

I Have A question, A friend Of Mine Was Trying to Setup Grub4Dos On My Dell (We Got It working With Three Different OS's It took some time but worked.) The problem we encountered was that we also wanted to encrypt said drive with bestcrypt, we found out that bestcrypt gave us a generic error "Missing Helper" No Addition Information, I want encryption on the drive and also want Grub4dos Is there a way to get these two to work in concert with each other? 



#19 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 14257 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted A week ago

I Have A question, A friend Of Mine Was Trying to Setup Grub4Dos On My Dell (We Got It working With Three Different OS's It took some time but worked.) The problem we encountered was that we also wanted to encrypt said drive with bestcrypt, we found out that bestcrypt gave us a generic error "Missing Helper" No Addition Information, I want encryption on the drive and also want Grub4dos Is there a way to get these two to work in concert with each other? 

It depends on how (EXACTLY) you installed the grub4dos, the Bestcrypt and which EXACT commands you used in grub4dos.

See:

http://reboot.pro/to...record/?p=40910

 

:duff:

Wonko






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users