Install Windows on UEFI system manually (without wizard)

0

So, I've upgraded my pc with SSD and want to reinstall Windows 10 on it, HDD has EFI partition, former Windows installation and Debian, I've recreated EFI partition on SSD, moved loaders there (now former Windows loader, GRUB and rEFInd are on SSD, all working fine), and I wan't to install Windows from scratch and move some data from HDD.

Problem

Windows 10 installer on USB stick boots fine, but when it goes to partitioning it fails to install when selecting partition already created by it, and fails when selecting unpartitioned space and clicking "Next", complaining that EFI partition is formated into NTFS (both former partitions are formated into FAT32 and the new one that installer created is FAT32 too with same partition flags).

I've decided to install it with console called by Shift+F10, I remember I've managed to install system this way previously (something to do with dism), but couldn't remember steps nor find a guide I used before.

I can manage partitions with diskpart and format them, but what's next?

Pavlus

Posted 2017-09-09T20:06:30.490

Reputation: 528

You will want to use DISM and apply the .wim image to the partition by hand. – Ramhound – 2017-09-09T20:22:53.087

You may detach the HDD. Then format SSD with GPT partition table and install Windows. EFI partition will automatically installed. Then reconnect the HDD. – Biswapriyo – 2017-09-09T20:51:10.883

@Biswa ok, I've just finished installing Windows, removing HDD helped. But leaving question open for now – Pavlus – 2017-09-09T20:53:06.817

Answers

1

I've heard other reports of the Windows installer complaining that EFI System Partitions (ESPs) created in Linux are NTFS. This appears to be a Windows bug, but I've not encountered it myself and so I haven't investigated it personally. That said, if it is a Windows bug, I can recommend a workaround: Back up, reformat, and restore the ESP. You can do this in just about any OS, but the details depend on the OS you use. A file-level backup (with zip, tar, cp, or similar tools) is fine for this purpose. As the ESP is small, backing it up and restoring it should not take much time. There are some caveats, though:

  • Some OSes make it difficult to access and manipulate the ESP. This includes Windows. I'm not sure offhand how to tell Windows to reformat the ESP, so if you want to use Windows for this task, you'll have to look elsewhere for instructions.
  • Windows 7 expects to see a FAT32 ESP. Depending on the ESP's size, though, some tools may make it FAT16 by default. Thus, you may need to override this default. (I don't know offhand if Windows 8 or later have this same expectation that the ESP will be FAT32.)
  • Depending on exactly what's triggering this bug, re-creating the ESP with Linux tools might lead you back to the same problem. Thus, doing it with Windows tools may be advisable, if you can figure out how to do it.
  • Creating a fresh filesystem on the ESP will change its serial number. In most Linux distributions, this will require adjusting the UUID value in /etc/fstab to ensure that it can be accessed after the change. Alternatively, you could replicate the old serial number with whatever tool you use to reformat the partition.
  • Some tools might change the partition's type code when you reformat it. You must ensure that the ESP has the right type code -- C12A7328-F81F-11D2-BA4B-00A0C93EC93B, which is shown as EF00 in gdisk or as the boot and/or esp "flags" in parted and GParted. Other tools have other ways of identifying the ESP type code.

Another option is to change the type code of the existing ESP, so as to hide it from the Windows installer. You'd then let the Windows installer create a new ESP for itself. The result would be two ESPs on the hard disk. (You could change the original ESP's type code back after installing Windows, if you like. The Windows 7 installer becomes confused by multiple ESPs, despite the fact that such a setup is perfectly legal. I don't know if the same is true of later versions of Windows.)

Rod Smith

Posted 2017-09-09T20:06:30.490

Reputation: 18 427

Yes, problem was with multiple ESPs, solved it by removing HDD, but disabling ESP flag looks like a good way to go. – Pavlus – 2017-10-08T18:08:48.457

0

you can use winntSetup v3.8.7.4 , it's portable , so copy to your usb setup and launch it from Shitft+F10 then choose the install.wim the EFI partition and the Windows partition then Setup then chosse "EFI" boot to create efi boot files.

Gabriel

Posted 2017-09-09T20:06:30.490

Reputation: 1