3

The problem: a Linux user on a legacy/BIOS system would like to install Windows 10 alongside Linux (on real hardware, not in a VM). Assume preparation issues such as partitioning hard drives to create space for Windows are already resolved. Also assume that no CD/DVD drive is available. How does one, using only utilities available under Linux, go about creating the Windows 10 installation media?

A Windows 10 iso can be downloaded from Microsoft, which looks like a good start. I presume the easiest way of doing something with that iso under the circumstances described would be to dd it to a USB drive: dd if=/path/to/Win10.iso of=/path/to/USB/drive/ I have not yet tried that but think it likely to work as advertised. But are there other alternatives?

For example this page https://ckirbach.wordpress.com/2016/10/24/how-to-create-a-windows-10-usb-installation-media-on-linux/ indicates that mounting the iso image and copying its contents to an NTFS-formatted USB drive, one that has already been made bootable using syslinux, will also work. However, despite the fact that I have recently created a few syslinux-bootable USB drives and understand well how to do this, the process described there does not work for me. And it's not because the USB drive is not bootable: rather, it seems to me it doesn't work because syslinux can't find something bootable among the files copied over from the loop-mounted Windows 10 iso (that page doesn't go into what seems to me a ciritical step--creation of a syslinux configuration file).

It might also be possible, using syslinux's memdisk, to boot the Windows 10 iso from a USB drive. Just make the drive bootable using syslinux, copy the iso over to it, and create an appropriate syslinux.cfg that lists the iso as a boot item. Something like:

LABEL some_label LINUX memdisk INITRD /path/to/image.iso APPEND iso raw

I've tried that as well but am also not meeting with success ("bad file number"). I suppose this might be the method least likely to succeed since I know, based on past experience, that some iso's simply are not bootable via memdisk.

Input on accomplishing this task will be appreciated.

PS I don't have access to any installed Windows environments, so descriptions of ways to accomplish this task that involve Windows utilities are not being solicited.

  • 1
    I've now tried the dd option but, despite having used a USB thumb drive of more than sufficient capacity, the drive did not boot to the Windows installation environment. I've dd'ed a number of Gnu/Linux ISO's to USB drives in the past, btw, so have a pretty good idea of how the process functions. – MJiller Oct 18 '17 at 19:38
  • What distribution are you using? Mint has mintstick which writes ISOs to USB and makes them bootable... – ivanivan Oct 18 '17 at 19:41
  • Using Arch mostly. Also have Void installed on a couple machines. Have you tried the Windows 10 iso with mintstick? If so, did it result in a successful boot into the Windows 10 installation environment? Just curious if anyone, using any Linux distro, has had success doing something like what I'm aiming to do. – MJiller Oct 18 '17 at 20:34
  • Just ran across this makeuseof.com/tag/try-windows-10-youre-running-linux, which seems to indicate that they accomplished, using unetbootin, the task I'm aiming to implement. Seems the tried anmd true downside of installing Windows still obtains: the article indicates that installing Windows 10 will overwrite the MBR, just as has been true of this process from time immemorial. Will Microsoft ever shed all remnants of its monopolistic past? – MJiller Oct 18 '17 at 21:04
  • I've come to suspect that perhaps the reason the directives linked to did not work for me was because the fellow who wrote them was basing his procedure on using a uefi system, while I've been attempting to do this on a legacy BIOS system. The boot process the two systems use is different enough that the additional step of creating a valid syslinux.cfg file may not apply to uefi systems. That step is, so far as I can discern, crucial for legacy BIOS ystems. – MJiller Oct 23 '17 at 17:02
2

The most painless solution to producing, under GNU/Linux, valid Windows 10 installation media, turns out to be using the woeusb utility. The graphical variant aborted with errors, but the command line version finally enabled me to produce a USB stick that would boot into the Windows 10 installation environment. I'm not sure whether my aim of being able to boot, on occasion, into a Windows environment will be feasible since I've discovered that many of Microsoft's monopolistic proclivities are still evident (not possible to install the OS to removable media, installation will overwrite whatever bootloader may be present on the drive to which it installs itself, etc). But I've at least discovered a means of accomplishing the task about which I asked in the OP. This link https://www.addictivetips.com/ubuntu-linux-tips/make-windows-usb-drive-on-linux-woeusb/ offers a good overview of the process.

Afterthoughts. The woeusb solution is something of a "blackbox" solution--meaning that, rather than explaining how to make a bootable Windows 10 install USB stick, the project simply automates the process for you by providing a utility. I suppose that's to be expected when it comes to software that interfaces with the eptiome all blackbox software, the Windows OS. That said, I'd like to see some documentation explaining woeusb's tactics for accomplishing this end.

After booting from USB drive woeusb produced it was evident that they had used the GRUB bootloader. Further inspection of the USB drive indicates that the project has used a similar tack to the one I linked to above and that uses syslinux. In other words, the utility evidently mounts the Windows 10 iso and copies files to the USB. The grub.conf file looks like this:

echo '------------------------------------' echo '| Windows USB - Loading... |' echo '------------------------------------' insmod fat search --no-floppy --fs-uuid BE49-9C0A --set root ntldr /bootmgr echo -n "Press ENTER to continue booting..." read key_holder boot

The utility puts a FAT file system on the USB stick, makes the drive bootable using GRUB, and copies files from the Windows 10 installation iso to it. Judging from the GRUB configuration file, it appears to load the FAT kernel module at the very beginning of the boot process. Then it locates the USB drive by uuid and sets it as the root file system. The line with ntldr in it should be easily adaptable to syslinux, which has the same switch which could point to the bootmgr file on the USB drive. I have no idea why an additional key press should be needed in order to boot to the installation media.

In any case, there's at least a little documentation of how the woeusb utility accomplishes the task of creating a USB drive that boots to the Windows 10 installation environment. Perhaps it will be of help to someone who wishes to attempt the syslinux solution I was initially pursuing and part of the process for accomplishing which is spelled out in the link provided in the OP?

Finally, I'll just note that, according to some further searching I've done, the only way to boot the Windows 10 operating system from a USB drive requires creating said USB from within an already-installed Windows system. It is a multi-step process that involves downloading the Windows Media Creation Tool. That are used to prepare a new iso. The final step appears to be downloading and using the utility WintoUSB to put the iso so prepared onto a USB drive. The additional hassles appear not to end there, as it seems "You'll . . . need to activate Windows 10 each time you use the USB drive on a different PC." See a full rundown of that process at https://www.pcmag.com/article/352209/how-to-run-windows-10-from-a-usb-drive

Not sure yet whether I'll pursue this project any further since, with all the hassles involved in accomplishing the end at which I'm aiming (having on hand a Windows environment into which I can boot on occasion in order to do things like root an Android device) things are reaching a point of diminishing returns. YMMV.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.