How can I create a Windows bootable USB stick using Ubuntu?

3

1

I have erased the entire HDD and I'm trying to install a dual boot of both Ubuntu and Windows.

  1. First I made one bootable USB drive using an Ubuntu .iso file. I set the boot order in BIOS correctly. After restarting my machine, I correctly sees setup steps for Ubuntu. I installed Ubuntu successfully.
  2. On the second step, I made another bootable USB drive using a Windows 7 .iso file. I set the boot order correctly. When I restarted my machine, I couldn't see anything but Missing Operating System. Then Ubuntu starts to boot and load.

Can anyone help me here to solve this issue of installing Windows?

Vishal

Posted 2017-05-30T07:56:02.320

Reputation: 63

How exactly did you make "another USB drive boot-able using windows 7 .iso file"? Ubuntu iso is deliberately built to support booting from USB (after you dd the iso to it), as well as from CD/DVD (after you burn it). I don't think Windows 7 iso is equally smart. This answer is what I'm talking about. What tool did you use? Also: in my opinion the less troublesome order would be to install Windows first, Linux last.

– Kamil Maciorowski – 2017-05-30T08:22:15.827

I used Unetbootin software to make usb drive bootable using windows .iso file. It slightly remember it has worked for me in past.. However please suggest if i should another effective software for making usb windows boot-able – Vishal – 2017-05-30T08:26:36.730

Answers

2

Although you don't have Windows 7 installed yet, you can also create a bootable USB flash drive for installing Windows 7 from Ubuntu using a USB flash drive. WinUSB is a tool for creating a bootable USB flash drive used for installing Windows. Native UEFI booting is supported for Windows 7 and later images. WoeUSB is an updated fork of the WinUSB project.

Some third-party installers feature Windows installation images (/sources/install.wim) greater than 4GB making FAT32 as target filesystem impossible. NTFS filesystem support has been added to WoeUSB 3.0.0 and later.

To install WoeUSB (updated fork of WinUSB project) in Ubuntu 14.04 and later:

sudo add-apt-repository ppa:nilarimogard/webupd8 
sudo apt update  
sudo apt install woeusb

To install WinUSB in Ubuntu 14.04/16.04/16.10/17.04:

sudo add-apt-repository ppa:nilarimogard/webupd8 
sudo apt update  
sudo apt install winusb  

enter image description here

This will install the WinUSB graphical interface and the WinUSB command line tool. The WinUSB GUI is much easier to use than the WinUSB command line tool.

Installing WinUSB/WoeUSB on EFI-loaded Ubuntu will uninstall the grub-efi packages in order to install the grub-pc packages, so before you reboot run the following commands to repair grub:

sudo update-grub
sudo grub-install /dev/sdX # replace X with the letter of the partition where grub is located
sudo update-grub
sudo reboot

karel

Posted 2017-05-30T07:56:02.320

Reputation: 11 374

2

  1. If using rufus:

    • Make sure partition scheme is MBR (for BIOS or UEFI)
    • NTFS file sytem

Like as shown below

enter image description here

  1. Probably the better to create a Windows (7) bootable disk, is using the tool from Microsoft - Windows USB/DVD Download Tool

or directly from codeplex: Windows USB/DVD Download Tool

The second option has no hassle as the setup is straightforward needing no extra configurations as with rufus.

enter image description here enter image description here

enter image description here enter image description here

xavier_fakerat

Posted 2017-05-30T07:56:02.320

Reputation: 2 191

1

According to onetransistor.blogspot.co.uk

Before starting, let's mention that there are two types of boot methods. There is the MBR code type where the bootable executable is stored in a reserved section at the beginning of the storage device. And there is the EFI type, where the boot loader executable file is stored at a standard path in an FAT32 filesystem.

You must decide in advance what you will use. There are some variables for each boot type. If you have no idea what to use, the most common setup that works with unmodified Windows sources, is msdos partition table with fat32 filesystem and flag the partition with boot. In this way you will get both an MBR and UEFI bootable drive. USB Boot flags MBR/UEFI mods/gpt

  1. Format USB drive

You must re-create the partition table by going to the Device menu then select Create Partition Table. Choose msdos (or gpt if you want an UEFI only bootable drive) and click Apply.

  1. Copy Windows files
  2. Make it bootable

If you used NTFS filesystem and MSDOS table, only method A is available. If you used FAT32 and MSDOS table, you can apply method A, B or both. If you used GPT partition table, only method B should be followed.

  • A. MBR bootable

GRUB will be used for that. Open a Terminal and run:

sudo grub-install --target=i386-pc --boot-directory="/media/<username>/<drive_label>/boot" /dev/sdX

Now, create a text file and write the following in it:

default=1  
timeout=15
color_normal=light-cyan/dark-gray
menu_color_normal=black/light-cyan
menu_color_highlight=white/black

menuentry "Start Windows Installation" {
    insmod ntfs
    insmod search_label
    search --no-floppy --set=root --label <USB_drive_label> --hint hd0,msdos1
    ntldr /bootmgr
    boot
}

menuentry "Boot from the first hard drive" {
    insmod ntfs
    insmod chain
    insmod part_msdos
    insmod part_gpt
    set root=(hd1)
    chainloader +1
    boot
}

That's it. The USB drive is now bootable from BIOS and can be used to install Windows on your PC. The first time you boot from it in MBR BIOS or CSM mode select Start Windows Installation.

  • B. UEFI bootable

Not all Windows versions are supported. Windows 7 on 64 bits, Windows 8 and newer versions should work.

After the copy process is finished, look in the USB root folder for the efi/boot directory. If there's a bootx64.efi or bootia32.efi file there, then you're done. You can boot from your USB in UEFI mode.

If the OS you are making a bootable USB for is Windows 7, browse the efi/microsoft folder and copy the entire boot folder from this path one level up in the efi folder. Merge folders if boot already exists.

Here is what to do if you don't have the bootx64.efi file in efi/boot folder. Browse the mounted Windows ISO image into the sources folder. Open install.wim (or install.esd) with your archive manager (you will need 7z installed). Go to the path ./1/Windows/Boot/EFI and extract the file bootmgfw.efi anywhere you want. Rename it to bootx64.efi and put it on the USB drive, in the efi/boot folder. If you can't find bootmgfw.efi in install.wim then you probably have a 32 bit Windows ISO or other types of images (recovery disks, upgrade versions).

You can now boot from your USB in UEFI mode.

I quote the original website for reliability, But the website is way better in style and details, So use it unless you force not to.

Mahdi Rafatjah

Posted 2017-05-30T07:56:02.320

Reputation: 422

Please see comments inline For 1st point, I do not know much about MBR/GPT setting For 2nd point, I already tried formatting disk with FAT32 and NTFS; unfortunately nothing works For point 3, lets say if booting software has some issue, then how it made ubuntu bootable correctly? For point 4, same USB was tested for ubuntu; works fine. – Vishal – 2017-05-30T08:14:31.257

Try these if you can http://www.wintobootic.com/ And https://rufus.akeo.ie/

– Mahdi Rafatjah – 2017-05-30T08:25:53.623

It looks like both of these softwares are windows supported; unfortunately i have only Ubuntu in hand. Do we have any Ubuntu compatible software for making windows boot-able USB? – Vishal – 2017-05-30T08:29:40.340

tell me what was wrong so i can complete my answer so others can use it – Mahdi Rafatjah – 2017-05-31T11:18:00.603

1

I followed https://onetransistor.blogspot.in/2014/09/make-bootable-windows-usb-from-ubuntu.html, made USB MBR bootable using msdos partition table and followed steps as per guideline.. It prompted me to install windows from USB.

– Vishal – 2017-05-31T11:21:20.937