Creating a bootable Windows Install USB using Linux

Talk about anything, including games and servers not affiliated with The Mana World.
Post Reply
User avatar
Ledmitz
Developer
Developer
Posts: 371
Joined: 17 Aug 2011, 23:40
Contact:

Creating a bootable Windows Install USB using Linux

Post by Ledmitz »

My daughter recently acquired a Thinkpad with Win10 on it, but there were many errors and no install disc. The larger problem was that there was no CD/DVD-ROM drive and I do not own an external USB DVD-ROM. She wanted a particular game to play, but I was not able to get it installed via wine/playonlinux after installing Debian to the laptop. I have Windows 7, but creating an install disc using dd is not possible without a lot of tinkering and also may not boot from certain devices. I post this here for developers stuck in a similar situation trying to work in both Linux and Windows.

I use a very customized Debian stable, with some unstable elements where required, that I built from CLI server install. Unfortunately the only thing that worked for me was to use a deb file from an unofficial Ubuntu repo that I had to download manually as adding this repo to sources.list could cause later more problematic issues. The deb file I found, the only thing that worked, is called woeusb. Here are the basic steps without needing to compile anything:

  • Download the Ubuntu woeusb deb file.
  • Install with

    Code: Select all

    dpkg -i woeusb-SOMESTRING.deb
  • If the install fails it won't correct dependencies as the distribution is wrong, but it will tell you what you need. Check for it in the repo with

    Code: Select all

    apt-cache search DEPENDENCY
    and install with

    Code: Select all

    apt-get install DEPENDENCY
    . Do this until all dependencies are installed. If you can't find what you need in Debian or whatever OS you are using, you can check the Ubuntu repo website manually for it and install in the same manner, but I only had to install 1 library.
  • After all dependencies are installed again,

    Code: Select all

    dpkg -i woeusb-SOMESTRING.deb
  • Code: Select all

    mount
    to see listed devices.

    Code: Select all

    umount /dev/DEVICE
    to unmount both of them first. woeusb will mount when/if required.
  • Using woeusb is simple, but you must specify by device or file using the "-d" option.

    Code: Select all

    man woeusb
    once installed for detailed info.
  • Command requires a sudo prefix or in my case, login to root with

    Code: Select all

    su
    .
  • woeusb -d /dev/ROMDRIVE /dev/USBDRIVE is the format to convert the entire USB device. e.g.:

    Code: Select all

    woeusb -d /dev/sr0 /dev/sdi
  • A message appears when complete. Now you should be able to install Windows from the USB.

This was a pain to figure out. I hope it saves someone some time. I still had to get network drivers and more and add them to the USB afterwards which seemed to be writable only if logged in as root and changing permissions did nothing since it is an NTFS filesystem.
If you encounter problems it could be due to wrong format type, etc. I already had the USB formatted with NTFS before I used woeusb, so IDK if it reformats it, itself or not. Files over 4GB will require NTFS so do this only if you run into problems:

Code: Select all

mkfs.ntfs -f /dev/USBDRIVE
Ledmitz = Mystic = Mystical_Servant = Ardits = BoomBoom = KillerBee
User avatar
Livio
Novice
Novice
Posts: 249
Joined: 26 Feb 2019, 20:08

Re: Creating a bootable Windows Install USB using Linux

Post by Livio »

Ledmitz wrote: 07 Jul 2020, 19:12

My daughter recently acquired a Thinkpad with Win10 on it, but there were many errors and no install disc.

Never, ever let n00bs choose technology if left without any expertise on it.
Lots of sellers may push on their ignorance or aesthetic sense of appreciation and give them crappy or privacy harmful devices.
Refer to manufacturers, h-node.org or other freedom-certified traders.
Cheap laptops tend to have OEM licenses without installation disks, underpowered batteries or CPUs, small RAM and mass memories and shitty hinges that will broke after some operations on the lid (usually that's not the case of Lenovo Thinkpad series).

Ledmitz wrote: 07 Jul 2020, 19:12

The larger problem was that there was no CD/DVD-ROM drive and I do not own an external USB DVD-ROM. She wanted a particular game to play, but I was not able to get it installed via wine/playonlinux after installing Debian to the laptop.

Debian GNU/Linux is meant to be a stable distro while not being on bleeding-edge of updates. That usually means that's not the right distro for games until you get non-free firmware or latest sources of everything that game requires that may undermine system stability. Definitively not a user-friendly choice.

Ledmitz wrote: 07 Jul 2020, 19:12

I have Windows 7, but creating an install disc using dd is not possible without a lot of tinkering and also may not boot from certain devices. I post this here for developers stuck in a similar situation trying to work in both Linux and Windows.

Do not install deprecated OS on real hardware: that's may lead to security breaches.
https://www.fsf.org/blogs/community/tel ... et-it-free

Ledmitz wrote: 07 Jul 2020, 19:12

I use a very customized Debian stable, with some unstable elements where required, that I built from CLI server install. Unfortunately the only thing that worked for me was to use a deb file from an unofficial Ubuntu repo that I had to download manually as adding this repo to sources.list could cause later more problematic issues.

You better use a light (k/x)ubuntu distro.

Ledmitz wrote: 07 Jul 2020, 19:12

The deb file I found, the only thing that worked, is called woeusb. Here are the basic steps without needing to compile anything:

  • Download the Ubuntu woeusb deb file.
  • Install with

    Code: Select all

    dpkg -i woeusb-SOMESTRING.deb
  • If the install fails it won't correct dependencies as the distribution is wrong, but it will tell you what you need. Check for it in the repo with

    Code: Select all

    apt-cache search DEPENDENCY
    and install with

    Code: Select all

    apt-get install DEPENDENCY
    . Do this until all dependencies are installed. If you can't find what you need in Debian or whatever OS you are using, you can check the Ubuntu repo website manually for it and install in the same manner, but I only had to install 1 library.
  • After all dependencies are installed again,

    Code: Select all

    dpkg -i woeusb-SOMESTRING.deb
  • Code: Select all

    mount
    to see listed devices.

    Code: Select all

    umount /dev/DEVICE
    to unmount both of them first. woeusb will mount when/if required.
  • Using woeusb is simple, but you must specify by device or file using the "-d" option.

    Code: Select all

    man woeusb
    once installed for detailed info.
  • Command requires a sudo prefix or in my case, login to root with

    Code: Select all

    su
    .
  • woeusb -d /dev/ROMDRIVE /dev/USBDRIVE is the format to convert the entire USB device. e.g.:

    Code: Select all

    woeusb -d /dev/sr0 /dev/sdi
  • A message appears when complete. Now you should be able to install Windows from the USB.

This was a pain to figure out. I hope it saves someone some time. I still had to get network drivers and more and add them to the USB afterwards which seemed to be writable only if logged in as root and changing permissions did nothing since it is an NTFS filesystem.
If you encounter problems it could be due to wrong format type, etc. I already had the USB formatted with NTFS before I used woeusb, so IDK if it reformats it, itself or not. Files over 4GB will require NTFS so do this only if you run into problems:

Code: Select all

mkfs.ntfs -f /dev/USBDRIVE

Rufus is a tool for doing such images. You should try it as well, probably is suited for such needs.

Edited by Reid: Please, no gender stereotype.

Matt
Grand Knight
Grand Knight
Posts: 1756
Joined: 07 Aug 2004, 11:47
Location: Germany->Bavaria

Re: Creating a bootable Windows Install USB using Linux

Post by Matt »

Just use the official windows media creation tool to create an USB install media.

User avatar
Ledmitz
Developer
Developer
Posts: 371
Joined: 17 Aug 2011, 23:40
Contact:

Re: Creating a bootable Windows Install USB using Linux

Post by Ledmitz »

Livio wrote: 09 Sep 2020, 19:16

Never, ever let n00bs choose technology if left without any expertise on it.

No choice. It was a gift for her.

Livio wrote: 09 Sep 2020, 19:16

not the right distro for games until you get non-free firmware or latest sources of everything that game requires that may undermine system stability.

i already tried that route with wine. Even if I had of gotten it working, which I didn't, it would have been missing features and using deprecated software according to winehq. Virtualisation was out of the question since half the resources would have gone to that. Keep in mind the device was to be used for school and the google crap they have to connect to and that she really wanted to get the Sims working.

Livio wrote: 09 Sep 2020, 19:16

Do not install deprecated OS on real hardware: that's may lead to security breaches.

Again, no choice as the only licensed Windows copy I had was Win7 and I certainly wasn't going to buy Windows. Also Win7 would be much faster and has less privacy issues than Win10, but getting the missing drivers and updating was a nasty task. There are still security fixes for Win7, I think?

Livio wrote: 09 Sep 2020, 19:16

You better use a light (k/x)ubuntu distro.

Debian unstable is unstable enough, but for gamers, it may help, yes. I don't doubt there's an auto config for a popular game like that.

Matt wrote: 10 Sep 2020, 20:56

Just use the official windows media creation tool to create an USB install media.

Couldn't because I only had a Debian machine to make a USB to set up windows on a thinkpad.

Ledmitz = Mystic = Mystical_Servant = Ardits = BoomBoom = KillerBee
BenFinn
Newly Registered User
Posts: 0
Joined: 18 Nov 2020, 09:45

Re: Creating a bootable Windows Install USB using Linux

Post by BenFinn »

Matt wrote: 10 Sep 2020, 20:56

Just use the official windows media creation tool to create an USB install media.

Brasero is able to do that,show its download link.
https://www.malavida.com/en/soft/brasero/linux/#gref
And about creating Windows 10 bootable USB on Linux,this tutorial is also very detailed.
https://www.uubyte.com/create-windows-1 ... buntu.html

Last edited by BenFinn on 23 Nov 2020, 07:22, edited 1 time in total.
User avatar
Ledmitz
Developer
Developer
Posts: 371
Joined: 17 Aug 2011, 23:40
Contact:

Re: Creating a bootable Windows Install USB using Linux

Post by Ledmitz »

BenFinn wrote: 20 Nov 2020, 09:33

Brasero is able to do that.

It can make a bootable USB, but I had to create a bootable Windows install with the proper windows formatting and such. Can it do that? Pretty sure it was one of my first attempts.

Ledmitz = Mystic = Mystical_Servant = Ardits = BoomBoom = KillerBee
User avatar
SudoPlatypus
Novice
Novice
Posts: 220
Joined: 06 Jun 2011, 18:53
Contact:

Re: Creating a bootable Windows Install USB using Linux

Post by SudoPlatypus »

I am writting this on "Black Friday" and a few days before "Cyber Monday". I recomend you break down and get an external USB DVD-ROM on sale :idea:
I bought my one and only external USB DVD-ROM back in 2009 or so, without even really having a use for it at the time. I remember asking myself why am i buying this, other than it is on sale :lol:
I first started distro hopping on a EEE PC Asus 701 that did not have a dvd/cd drive kind of just to use it 8)
Over the years, I have not used it much, and have kept it in storage, but when I do use it, it is usually the quickest simplest solution with using a dozen or so second hand bought computers, that all have unique issues: some do not have cd/dvd drives, some do but do not work, and oddly I have a few that refuse to boot from their builtin cd/dvd but boot from the external usb cd/dvd with ease :roll:

SudoPlatypus Level 79 Mage
:arrow: viewtopic.php?f=5&t=20549&p=157733#p157733
ImageImageImage
Post Reply