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
TMW Classic
TMW Classic
Posts: 568
Joined: 17 Aug 2011, 22:40
Location: The Mana World
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 = Ardits = KillerBee = Mystic = Mystical_Servant = Tipsy Skeleton = BoomBoom = Cloak

User avatar
Livio
Warrior
Warrior
Posts: 347
Joined: 26 Feb 2019, 19:08

Re: Creating a bootable Windows Install USB using Linux

Post by Livio »

Ledmitz wrote: 07 Jul 2020, 18: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, 18: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, 18: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, 18: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, 18: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: 1759
Joined: 07 Aug 2004, 10: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
TMW Classic
TMW Classic
Posts: 568
Joined: 17 Aug 2011, 22:40
Location: The Mana World
Contact:

Re: Creating a bootable Windows Install USB using Linux

Post by Ledmitz »

Livio wrote: 09 Sep 2020, 18: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, 18: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, 18: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, 18: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, 19: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 = Ardits = KillerBee = Mystic = Mystical_Servant = Tipsy Skeleton = BoomBoom = Cloak

User avatar
Ledmitz
TMW Classic
TMW Classic
Posts: 568
Joined: 17 Aug 2011, 22:40
Location: The Mana World
Contact:

Re: Creating a bootable Windows Install USB using Linux

Post by Ledmitz »

BenFinn wrote: 20 Nov 2020, 08: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 = Ardits = KillerBee = Mystic = Mystical_Servant = Tipsy Skeleton = BoomBoom = Cloak

User avatar
SudoPlatypus
Novice
Novice
Posts: 220
Joined: 06 Jun 2011, 17: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:

The Mouboo was. The Mouboo is. The Mouboo ever shall be. Drop candies and rejoice.
Most leveled character: Qwerty Dragon is 99
User avatar
Ledmitz
TMW Classic
TMW Classic
Posts: 568
Joined: 17 Aug 2011, 22:40
Location: The Mana World
Contact:

Re: Creating a bootable Windows Install USB using Linux

Post by Ledmitz »

SudoPlatypus wrote: 27 Nov 2020, 11:05

break down and get an external USB DVD-ROM

NEVER!!! :twisted: :lol:

Hey I get it, but think about it. Why did a company make a device that requires a disc to install an OS that doesn't come with disc support and charge more than a device that does? Mo' money. Telling me I need to buy something is just a challenge for me. I won. They get no money from me and I got an OS installed on it which I could do again without the help of Windows. I realize it's sound advice, but maybe I'm not sound. I refuse to give in to obvious attempts at a cash grab.

Ledmitz = Ardits = KillerBee = Mystic = Mystical_Servant = Tipsy Skeleton = BoomBoom = Cloak

User avatar
jesusalva
Moubootaur Legends
Moubootaur Legends
Posts: 1438
Joined: 14 Nov 2016, 22:20
Location: Brazil
Contact:

Re: Creating a bootable Windows Install USB using Linux

Post by jesusalva »

Ledmitz wrote: 05 Dec 2020, 18:51

I realize it's sound advice, but maybe I'm not sound. I refuse to give in to obvious attempts at a cash grab.

What do you mean, you are not sound :shock:
I thought you were doing our sounds :shock:
Does this means rEvolt will have no sounds?? :shock: :shock: :shock:

...Okay, enough trolling.
And yup, installing Windows is only "easy" if you are paying 'em, unfortunately >.<

Jesusalva (aka. Jesusaves)
Donate to the project! ─ (Note: If you want to support me instead, Buy me a coffee!)

Former system administrator, project lead and developer.
Do not contact me regarding The Mana World inquiries.

Post Reply