2

I have been using Ubuntu for over 1 year but now I want to change it with Windows 10. I created a bootable USB but when I went into the boot menu my USB didn't show even though legacy boot is enabled and safe boot is turned off.

Lorenz Keel
  • 8,905
  • 2
    @guiverc: The people on this site should know more about removing Ubuntu than people on Windows sites. The best way to reinstall Windows involves Ubuntu. We should be offering an OS back guarantee so we don;t look sleazy. People will think better of Ubuntu for it. – C.S.Cameron May 12 '21 at 13:18
  • 1
    Your answer has proven (in my opinion) the question can be answered and remain on-topic within site rules regardless of what I feel. Well done @C.S.Cameron (Excellent answer!) – guiverc May 12 '21 at 13:55
  • 1
  • @karel The number one answer on your link uses WinUSB which has not been supported in many years. Most of the other answers are also obsolete. Why do you want to waste the OP's time? – C.S.Cameron May 12 '21 at 14:15
  • @C.S.Cameron duplicate questions (and answers) can be merged by the moderators. I am still voting to close it as a duplicate. – user68186 May 12 '21 at 20:23
  • @user68186: How can you advocate recommending a question like karel linked above? Most of the answers are pre 2016 and obsolete, Ubuntu 16.04 and prior are off-topic on Ask. The answers with the highest reputation are the oldest and most obsolete, there are a few answers toward the bottom that might work on Windows 10, 1909 and later, but the OP will have likely given up and moved to Mint before he reaches them. If you are going to recommend closing as a duplicate, at least recommend a "duplicated" question with answers that work. – C.S.Cameron May 13 '21 at 09:52
  • @C.S.Cameron I am recommending your answer belongs to that question, rather than this one. Once this one is closed as duplicate, your answer should be migrated to that question by the moderators. – user68186 May 13 '21 at 11:27
  • @user68186 That question is filled up with obsolete, off-topic answers that all have high numbers of votes, It will never be seen. (Plus I have already put it there). That question should be removed as off-topic as it involves 13.04 and most all the answers use 16.04 and prior. Most people are no longer using Windows XP. What worked for XP and Win 7, does not work for Windows 10 1909 and later. – C.S.Cameron May 13 '21 at 11:58

1 Answers1

4

Reinstalling Windows 10 from Ubuntu

Windows can be installed to boot in BIOS, (Legacy), mode or in UEFI mode. I will describe each method.

BIOS, (Legacy), mode, MSDOS Partition Table

  • Boot Ubuntu in Legacy mode.

  • Using GParted, create a 8GB NTFS partition for the installer and a 50GB or larger partition for Windows.

  • Mount the Windows ISO using sudo mount -t udf /{Path to ISO}/Win.iso /media/iso, Copy the contents of /media/iso/ to the 8GB partition.

  • In Terminal run sudo update-grub to add the Windows installer to Ubuntu's GRUB menu.

  • Edit the grub.cfg Windows menuentry, to add ntldr /bootmgr on the line after chainloader +1

  • Reboot and select Windows Recovery Environment from the Boot menu.

  • Proceed with Windows 10 installation as normal.

UEFI mode, GPT Partition Table

  • Boot Ubuntu in UEFI mode.

  • Using GParted, create a 8GB NTFS partition for the installer and a 50GB or larger NTFS partition for Windows.

  • Mount the Windows ISO using sudo mount -t udf /{Path to ISO}/Win.iso /media/iso, Copy the contents of /media/iso/ to the 8GB partition.

  • It should not be necessary to Update GRUB to boot in UEFI mode. (Please let me know if you find otherwise).

  • Reboot, The Windows installer should start. At this point you can close the installer to open the GRUB menu.

UEFI Notes:

UEFI properties may vary among vendors.

It may be necessary to add Windows Recovery Environment menuentry by hand.

Some instructions for installing Windows recommend the ISO be extracted to a FAT32 partition. If there are problems using the ISO extracted to NTFS see: https://www.dedoimedo.com/computers/windows-10-usb-media-linux.html, (thanks to oldfred).

I was not able to install as UEFI mode from Legacy Ubuntu on GPT disk.

C.S.Cameron
  • 19,519
  • 1
    UEFI requires boot from FAT32 partition. You used to be able to extract Windows ISO, Microsoft made newer versions of the .wim file over 4GB, so too large for FAT32. Microsoft tools split .wim file into two parts to have it work for UEFI. Any of the old instructions that extract ISO or use tools to extract ISO will not work. Split .wim with Linux tools. https://www.dedoimedo.com/computers/windows-10-usb-media-linux.html The .wim too large, Windows commands to split https://www.dell.com/support/article/en-us/sln313422/windows-10-iso-contains-wim-file-that-is-big-for-fat32-file-system?lang=en – oldfred May 12 '21 at 16:28
  • @oldfred: Have you tried the above lately? I have been creating Windows installers extracting to NTFS as shown. I have also found that the Windows 1909 ISO is small enough to extract to Fat32, Win10_20H2 is not. In researching I read that exFAT also works for a Windows installer, but I have not tried it yet. – C.S.Cameron May 13 '21 at 01:23
  • @oldfred UEFI is not very consistent between computer vendors. The links you posted offer a great workaround if the user has problems extracting the Windows ISO to NTFS. Do you mind if I reference them in the UEFI Notes in the answer? – C.S.Cameron May 13 '21 at 02:00
  • I regularly post links to your instructions. Please add anything you find useful. The only thing I have done lately to create a Windows bootable ISO was to use Windows. That is where I noticed it split the .wim file. I used to promote the extraction of ISO to FAT32 for UEFI boot, but both Windows & then Ubuntu had various issues. Have not tried either, recently. I regularly install Ubuntu, but directly boot ISO with grub's loopmount into RAM. And even that requires a few extra terminal commands so not easy to do, for most users. – oldfred May 13 '21 at 02:32