Wednesday, April 22, 2015

boot - How can I have bootable windows installation disk on a hard disk partition?



How can I install windows installation ISO to a partition on an external hard disk?



The hard disk already has a Ubuntu installation and grub on it, and another NTFS partition I use to store personal files. I want to start the windows installation process from the hard disk, but windows windows USB download tool only allows pen drives.




What I think so far is to make a NTFS partition and copy contents of the ISO to the partition and edit the grub boot loader to include the partition. But can someone mention the steps that would be needed to do this, I don't know how.



Edit:
Why I want to do this is because I don't have a pen drive and want to install windows to a computer that does not have any windows installation on it. otherwise I can just run setup from within windows itself.


Answer



You need just a boot entry in BCD which starts "install.wim" or "boot.wim" - a so called recovery loader.



Then you chainload bootmgr from grub (bootmgr and \boot\BCD should be on active partition)



Bootmgr reads BCD and loads "install.wim".




By default Windows creates three loaders for every Windows 7/8/10 installation:




  • Windows loader

  • resume from hybernation loader

  • recovery loader



You can use Visual BCD Editor to view and edit complete BCD.




By adding the GUID of Recovery loader to element "Display order" of {bootmgr} you add the recovery loader to boot menu. You can rename this loader by changing its "Description" element.



Then you can change drive(ApplicationDevice and OSDevice) and path(ApplicationPath and SystemRoot) of loader to adjust to concrete partition and folder.



Windows Recovery loader



A recovery loader has also a corresponding device object - which loads "boot.sdi", so you have also to adjust the sdi_drive and sdi_path of this device object.



Device object for recovery loader




Install.wim, boot.wim and boot.sdi can be placed in any folder.



Note for ApplicationPath:



For loading on BIOS/MBR you use Windows\System32\Winload.exe.



For loading on UEFI/GPT you use Windows\System32\Winload.efi



Next version of Visual BCD Editor can create recovery/wim loader on click but is still not available to general public :(



No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...