Win from usb linux

Create a bootable Windows 10 USB drive (UEFI) from Linux

Beside this, I’ve tried creating a GPT partition table and one partition of type ef00 and formatted as fat32, and then copied all ISO contents to it. It boots OK, but when I go to start installation it shows the prompt for media dialog.

  1. Created a GPT
  2. Created a FAT32 at end of drive of 50 MB
  3. Created NTFS at remaining space
  4. Put UEFI:NTFS on FAT32
  5. Copied ISO content to NTFS

The installation starts ok, but at start of progress shows error 0xc0000005 (if i remember correctly).

7 Answers 7

You did all right. Make gpt table with fat32 and copy all data from iso on it. But you also need to set flag «msftdata»(not «boot») on this partition with e.g. parted.

You cannot put all data onto a FAT32 drive as of June 2019. The latest update contains a windows.wim which is larger than 4.1 GiB.

@Ben You can when you compress the install.wim file using dism or wimtools , see tqdev.com/2019-cannot-copy-windows-10-install-wim.

I tried this and didn’t work (and a lot of other things like exFat format for newer Windows 10 isos) So in the end I gave up, went to Windows and downloaded their Media Creator Tool. After that I checked and the USB worked. I checked the flags and they are boot and lba

Windows 10 October 2018 release UEFI bootable USB drive on any Linux distribution.

Notice, that since Windows 10 October 2018 release the installation file sources/install.wim is larger than the maximum FAT32 file size, so we will format USB drive to NTFS . Windows installer also cannot work with an EFI partition (code ef00 ), so we will use Microsoft basic data partition type (code 0700 ).

Variant A (For PCs with NTFS support)

Steps for creating USB drive with name /dev/sdc (Replace all commands with YOUR device name!):

  1. Insert USB drive to computer and make sure it is unmounted. Some distributions like to automount USB drives, so make sure you unmount them. Mounted partitions can be found with mount -l | grep ‘/dev/sdc’ , then unmount with sudo umount /dev/sdcX (where X is partition number).
  2. Open USB block device using gdisk /dev/sdc , configure it as GPT and create Microsoft basic data partition (code 0700 ), then write changes and quit (Next steps will destroy partition table in your USB drive. ).
sudo gdisk /dev/sdc o > This option deletes all partitions and creates a new protective MBR. > Proceed? (Y/N): y n > Partition number . > hit Enter > First sector . : > hit Enter > Last sector . : > hit Enter > Current type is 'Linux filesystem' > Hex code or GUID (L to show codes, Enter = 8300): 0700 p > Should print something like: > Disk /dev/sdc: 15646720 sectors, 7.5 GiB > Model: DataTraveler 160 > Sector size (logical/physical): 512/512 bytes > Disk identifier (GUID): . > Partition table holds up to 128 entries > Main partition table begins at sector 2 and ends at sector 33 > First usable sector is 34, last usable sector is 15646686 > Partitions will be aligned on 2048-sector boundaries > Total free space is 2014 sectors (1007.0 KiB) > Number Start (sector) End (sector) Size Code Name > 1 2048 15646686 7.5 GiB 0700 Microsoft basic data w > Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!! > Do you want to proceed? (Y/N): y q 
mkdir ~/tmp-win10-usb-drive sudo mount /dev/sdc1 ~/tmp-win10-usb-drive 
  1. Download Windows installation ISO, create new temporary directory in your home and mount it there:
mkdir ~/tmp-win10-iso-mnt sudo mount Win10_1809Oct_English_x64.iso ~/tmp-win10-iso-mnt 
sudo cp -rT ~/tmp-win10-iso-mnt/ ~/tmp-win10-usb-drive/ 
sudo umount ~/tmp-win10-iso-mnt/ ~/tmp-win10-usb-drive/ rmdir ~/tmp-win10-iso-mnt/ ~/tmp-win10-usb-drive/ 

Variant B (For PCs without NTFS support)

Steps for creating USB drive with name /dev/sdc (Replace all commands with YOUR device name!):

  1. Insert USB drive to computer and make sure it is unmounted. Some distributions like to automount USB drives, so make sure you unmount them. Mounted partitions can be found with mount -l | grep ‘/dev/sdc’ , then unmount with sudo umount /dev/sdcX (where X is partition number).
  2. Open USB block device using gdisk /dev/sdc
  3. Configure it as GPT
  4. Create first partition of 1GB size and type Microsoft basic data (code 0700 ).
  5. Create second partition of rest of the size and type Microsoft basic data (code 0700 ).
  6. Write changes and quit (Next steps will destroy partition table in your USB drive. ).
sudo gdisk /dev/sdc > o > This option deletes all partitions and creates a new protective MBR. > Proceed? (Y/N): y > n > Partition Number: Enter > First sector: Enter > Last sector: 1G > Type: 0700 > n > Partition Number: Enter > First sector: Enter > Last sector: Enter > Type: 0700 > p # Should print something like: > Disk /dev/sdc: 30031250 sectors, 14.3 GiB > Model: Ultra USB 3.0 > Sector size (logical/physical): 512/512 bytes > Disk identifier (GUID): C657C0AF-3FE2-4152-8BF1-CE3CCA9F3541 > Partition table holds up to 128 entries > Main partition table begins at sector 2 and ends at sector 33 > First usable sector is 34, last usable sector is 30031216 > Partitions will be aligned on 2048-sector boundaries > Total free space is 4061 sectors (2.0 MiB) > Number Start (sector) End (sector) Size Code Name > 1 2048 2048000 999.0 MiB 0700 Microsoft basic data > 2 2050048 30031216 13.3 GiB 0700 Microsoft basic data w > Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!! > Do you want to proceed? (Y/N): y q 
sudo mkfs.fat -F32 /dev/sdc1 sudo mkfs.ntfs -Q /dev/sdc2 
mkdir ~/tmp-win10-fat-usb-drive mkdir ~/tmp-win10-ntfs-usb-drive sudo mount /dev/sdc1 ~/tmp-win10-fat-usb-drive sudo mount /dev/sdc2 ~/tmp-win10-ntfs-usb-drive 
  1. Download Windows installation ISO, create new temporary directory in your home and mount it there:
mkdir ~/tmp-win10-iso-mnt sudo mount Win10_1809Oct_English_x64.iso ~/tmp-win10-iso-mnt 
  1. Copy following files with from mounted ISO to FAT32 formatted USB drive (basically copy everything besides sources/ but include sources/boot.wim ):
sudo cp ~/tmp-win10-iso-mnt/* ~/tmp-win10-fat-usb-drive/ sudo cp -r ~/tmp-win10-iso-mnt/boot ~/tmp-win10-fat-usb-drive/ sudo cp -r ~/tmp-win10-iso-mnt/efi ~/tmp-win10-fat-usb-drive/ sudo cp -r ~/tmp-win10-iso-mnt/support ~/tmp-win10-fat-usb-drive/ sudo mkdir ~/tmp-win10-iso-mnt/sources ~/tmp-win10-fat-usb-drive/ sudo cp ~/tmp-win10-iso-mnt/sources/boot.wim ~/tmp-win10-fat-usb-drive/sources 
sudo cp -rT ~/tmp-win10-iso-mnt/ ~/tmp-win10-ntfs-usb-drive/ 
sudo umount ~/tmp-win10-iso-mnt/ ~/tmp-win10-usb-fat-drive/ ~/tmp-win10-usb-ntfs-drive/ rmdir ~/tmp-win10-iso-mnt/ ~/tmp-win10-usb-drive/ 

Источник

Читайте также:  Linux little endian or big endian

How to Create a Windows Bootable USB on Linux

For those who’ve decided to switch from Linux to Windows, here’s an easy way to create a bootable Windows installation media on Linux.

windows bootable usb in linux

Readers like you help support MUO. When you make a purchase using links on our site, we may earn an affiliate commission. Read More.

Want to make the switch from Linux to Windows? Here’s a guide on creating a bootable Windows USB on Linux, covering everything from downloading a Windows ISO to flashing it to a USB drive using WoeUSB and balenaEtcher.

Grab the Windows ISO First!

Before you begin creating a Windows bootable USB on Linux, you need to download the operating system’s disk image (ISO). The ISO file contains all the necessary setup files required for installing the operating system.

In this scenario, to get the latest Windows 10 ISO, head over to the official Windows download site and get your copy of Windows 10.

Since the ISO file size is roughly 5GB, make sure that your pen drive has at least 8GB of free space. If it doesn’t, you can easily format it using the terminal.

Download: Windows 10 ISO (Free)

Create a Windows Bootable USB on Linux Using WoeUSB

etcher and woeusb

For the first method, you can use WoeUSB, a command-line and, optionally, GUI utility that enables you to make a bootable Windows USB from an ISO. It’s a direct and prominent Linux alternative to Rufus, its Windows counterpart.

With WoeUSB, you can set up a bootable Windows USB on Linux in the span of a few clicks or commands, in case you prefer the CLI.

Читайте также:  Сборка своего ядра linux

Install WoeUSB on Linux

To start off, you need to install a few required dependencies to ensure a smooth and successful installation. Select and run the relevant snippet for your system from the following commands to install all the dependencies.

For Debian/Ubuntu-based systems:

sudo apt install git p7zip-full python3-pip python3-wxgtk4.0 grub2-common grub-pc-bin 
sudo pacman -S p7zip python-pip python-wxpython 

For Fedora/CentOS and other RPM-based distros:

sudo dnf install git p7zip p7zip-plugins python3-pip python3-wxpython4 

Then, clone the WoeUSB-ng repository to your system and navigate to the directory using the cd command.

git clone https://github.com/WoeUSB/WoeUSB-ng
cd WoeUSB-ng

Install WoeUSB using the pip3 package installer:

Create a Bootable Windows USB on Linux With WoeUSB

woeusb flashing usb

  1. Fire up WoeUSB either from the applications menu of your distro or from the command line using:

By the end, you’ll have a Windows bootable USB drive that you can use to install Windows on your computer.

Create a Windows Bootable USB on Linux Using balenaEtcher

Moving on, let us now explore how to create a bootable Windows USB on Linux using balenaEtcher. It is a cross-platform USB flasher that’s available to download on Windows, macOS, and Linux.

Flashing a Windows ISO to a USB on Linux with balenaEtcher is as easy as, if not easier than, the WoeUSB method since you don’t have to typically install balenaEtcher on Linux. You just have to download its AppImage file and run it.

balena etcher download site

To proceed, download the Linux_x64 AppImage file from the official website and save it on your system. Once downloaded, right-click the file and select Run to launch balenaEtcher.

Читайте также:  Linux что тормозит систему

Download: balenaEtcher (Free)

How to Use balenaEtcher on Linux

  1. Fire up the balenaEtcher AppImage.
  2. Choose the ISO file you want to flash.
  3. Carefully select the USB drive because the selected storage device will be wiped clean and all its data will be lost.
  4. Click on Flash​​​​​​ and wait for the process to finish. Soon, you should have a Windows bootable USB that you can use to install Windows on any PC.

Balena etcher flashing ISO

Why You Should Stick to Linux

Linux can feel complicated or even overwhelming to an extent. You might be feeling exhausted and fed up with all the troubleshooting, or maybe the lack of software is a turn-off for you.

Whatever the reason, we truly believe you should take a breath, rethink it, and give Linux another try. Although it can be intimidating to newcomers, Linux surpasses Windows in more ways than one.

Источник

Оцените статью
Adblock
detector