14

Since my ocd (im kidding) prevents me from dual booting Ubuntu and Windows 10 ive decided to create a Windows to go USB (boot the entire Windows from an external drive connected to a USB port). There are countless articles but none of the programs are on Linux, so does anyone know a program on Linux for a Windows to go USB?

Sarcasm:

This definitely isn't windows to go...

Nick
  • 163

3 Answers3

9

I'm addressing the part of your question for having a Windows Installation on a USB that you can plug into any computer, and run Windows. You also wanted to do this from you Ubuntu OS without any special tools. The applications used are available from the Repository.

  • Virtualbox
  • Gparted

You can do this by installing Virtualbox:

$ sudo apt install virtualbox

Follow the GUI to create a Windo Windows 10 Machine.

Connect your Windows 10 ISO to the virtual machine and install Windows 10.

Make sure you the virtual machine is not larger than your USB drive.

Install Windows 10 to the VM.

Then go to the folder of the Windows 10 machine and run this to create an image of the vdi file.

$ VBoxManage clonehd ["Windows 10.vdi"] ["win10.img"] --format RAW

The first parameter is the name of your windows vdi file (not including the brackets). The second parameter is the name you decide to call the image file.

Now run this dd command to write the image to your pendrive.

$ sudo dd if=[win10.img] of=[/dev/sdc] bs=4M status=progress

Again, the names in the brackets are a variable. Replace those names with your actual file and device on your system.

Us Gparted to fix the integrity of your created Pendrive.

$ sudo apt install gparted

It's important to have your Windows Installation drive smaller than your destination pendrive. When the company finishes you will have unallocated space, the difference between the larger drive. You can fix this by running Gparted to resize your Windows Installed partition.

L. D. James
  • 25,036
  • Are you saying to boot into the iso from bootable usb then choose to install to usb instead of the internal hard drive? If so ive already tried this and it says i cant install to usb. – Nick Mar 04 '17 at 02:32
  • 1
    Not to be rude, but I don't think you really know what Windows To Go actually is: https://en.m.wikipedia.org/wiki/Windows_To_Go – You'reAGitForNotUsingGit Mar 04 '17 at 02:39
  • I already know what it is, im asking about making an unofficial windows to go usb with a program avaliable on linux since all of them are on windows, like https://www.onmsft.com/news/create-windows-go-usb-drive-running-windows-10 – Nick Mar 04 '17 at 02:51
  • First, install Windows on the USB. Then boot to the Windows you have installed on the Windows USB. From there you can create your Windows to media. You can do all this from Pendrives. You don't have to touch your Internal hard drive. Are you saying you had trouble with the step of Installing Windows to an USB stick? That is the first step. – L. D. James Mar 04 '17 at 02:56
  • I have a win 10 boot usb but i want to install windows to the us so i can use it whenever by plugging it in. They wouldnt let me install to the usb so i need a 3rd party tool – Nick Mar 04 '17 at 03:37
  • Is your Windows 10 boot USB a full Windows installation? ...not just a installer? – L. D. James Mar 04 '17 at 03:40
  • its the iso file that i used unetbootin to put on the drive and make it bootable, if you dont know what im talking about then you cant help me anyways. thanks for trying though :) – Nick Mar 04 '17 at 04:17
  • 2
    @Nick. You're welcome. .. It is my impression that you want to have Windows 10 installed on a Pendrive so that you can but Windows 10 on different machines. You would also be able to boot to the USB drive from your computer without interfering with your Ubuntu installation. If you think I have it wrong, I'm sure with a clarification I can assist you with your objective for using the tools available in Ubuntu. It's not called Windows to go, but it appears to serve the same purpose. – L. D. James Mar 04 '17 at 21:00
  • Do you have any trick for ethernet adapter working ? I have Intel AsusTEK e1000e ethernet adapter not recognized. Tried to install PROWinx64.exe , no luck – Gilles Quénot Feb 01 '20 at 22:35
  • 1
    I was very hopeful for this but unfortunately it didn't work for me. I wasn't able to boot from partition 1 (or 2, though it should be 1) from firmware. Seems like a clever solution though. – MattHusz Apr 06 '21 at 00:56
  • Well, it doesn't work.. At least, not with a BIOS configured to boot with UEFI. – Alexandre Apr 20 '21 at 13:07
  • Thank you very much. These steps work very well. For those who failed, please check if your PC has a BIOS or UEFI support. By default, Virtualbox installation will create a BIOS supported installation. If your PC only supports UEFI, you have to enable EFI in the VM's settings, and then do the installation again. You can either create a BIOS installation or UEFI installation, but not both in virtualbox as far as I know. – sgon00 Aug 18 '21 at 08:13
1

I have Ubuntu installed in a USB boot drive (actually an SSD in an external box, that can be connected via USB 3 as well as eSATA) such that it can boot from both BIOS and UEFI. It is portable between computers.

In this Ubuntu I have installed VirtualBox, and in VirtualBox I made a virtual machine, where I have installed Windows 10. It works well for me and provides a system where also Windows is portable.


Edit1 : I add a screenshot describing how to connect the virtual machine to an iso file, which makes it possible to boot from it. After booting the virtual machine: press F12 to get a boot menu, where you can select virtual drive to boot from (in this case the virtual internal drive 'w10.vdi' or the virtual optical disk 'Win10_1607...').

choose _virtual_optical_disk

Edit 2: @KarlMorrison suggests to use Windows in the virtual machine as a tool to install Windows into an external drive,

You are actually half-way there with this answer. Install VM on Ubuntu -> Install Win10 in VM -> Boot Win10 in VM -> Install WinToUSB -> Use WinToUSB to install Win10 to External USB

sudodus
  • 46,324
  • 5
  • 88
  • 152
  • Interesting trick. Not what the OP asked, exactly, but would still probably serve the purpose. –  Mar 04 '17 at 06:04
  • I saw "Live USB Install" which says it can install most Linux distributions on a portable storage, I decided to just install Windows on 4/10 of my internal drive. I only want windows for the xbox app since it can be used as a TV and for chats. Virtual box confuses me when I try to use an iso... I'll probably move Ubuntu and Windows to a portable drive if I start to leave my house. You can create a portable windows 10 from windows 8.1+ with rafus by the way ;) – Nick Mar 04 '17 at 07:46
  • VirtualBox lets you boot from an iso file just like it were from an DVD disk. It is very convenient. Create an 'optical drive', connect it to an iso file, and boot :-) – sudodus Mar 04 '17 at 12:33
  • I had an issue creating the virtual drive, everything else was fine – Nick Mar 04 '17 at 17:46
  • Which virtual drive, the vdi drive or the optical drive? – sudodus Mar 04 '17 at 17:49
  • Read this link in order to learn more about drives in VirtualBox, https://www.virtualbox.org/manual/ch05.html – sudodus Mar 04 '17 at 17:53
  • I think its an issue with it not being sudo so I could probably do it from the command line or boot vb with sudo but I don't know how to do either, I'm sure ill figure it out next time I need a vb – Nick Mar 05 '17 at 00:59
  • I never use sudo, sudo -H or gksudo with VirtualBox. But inside (in a virtual machine) I can use sudo like in any machine. – sudodus Mar 05 '17 at 06:43
  • VM !== NATIVE. Jesus. – Karl Morrison Nov 25 '17 at 22:50
  • @KarlMorrison, You don't like this workaround. Please suggest a better alternative to solve the task of the original question, and I will upvote it ;-) – sudodus Nov 26 '17 at 00:27
  • Your actually half-way there with this answer. Install VM on Ubuntu -> Install Win10 in VM -> Boot Win10 in VM -> Install WinToUSB -> Use WinToUSB to install Win10 to External USB ;) – Karl Morrison Nov 26 '17 at 00:54
1

It seems as though there is no WinToUsb like program for Linux so the only way to make a portable Windows is by creating one in a Windows virtual box or on Windows. I decided to install Windows 10 on part of my disk which I resized using the Gpart editor to keep my Ubuntu data. If I decide to make a portable USB I'll use either Rafus or WinToUsb, Rafus can only create a portable USB if your running 8.1+ and WinToUsb is avaliable on most windows os

Nick
  • 163
  • You can use mkusb to create a Windows (all versions 7 - 10) USB boot drive (an installer, not an installed Windows in the USB drive). See this link, https://askubuntu.com/questions/289559/how-can-i-create-a-windows-bootable-usb-stick-using-ubuntu/837380#837380 – sudodus Mar 04 '17 at 08:53