Giter Site home page Giter Site logo

windows-usb's Introduction

Motivation

A modern windows 10 ISO is larger than 4GB, specifically the install.wim file which is incompatible with a FAT32 partition. We can use NTFS or exFAT to bypass this limitation. Rufus solves this, but, it's unavailable on Linux. Its creator pbatard provide the binaries to chain load our Windows partition from a bootable FAT16 one.

Formating the USB

Identify your USB device using lsblk or fdisk -l, mine is /dev/sdb so I'll be using it as example.

Overwrite the partition table

parted /dev/sdb mklabel gpt

Create FAT16 partition of 1MB, I'm using FAT16 because the required binaries are stored in this format

parted /dev/sdb mkpart primary fat16 1MiB 2MiB

Set the bootable flag

parted /dev/sdb set 1 boot on

Create a NTFS partition with the remaining space of the disk

parted /dev/sdb mkpart primary ntfs 2MiB 100%

Set the flag Microsoft Basic Data to the partition

parted /dev/sdb set 2 msftdata on

Format the ntfs partition

mkfs.ntfs -f /dev/sdb2

Trasnfering Files

Download the .img that contains the custom binaries to chain load our installation files

wget 'https://raw.githubusercontent.com/pbatard/rufus/master/res/uefi/uefi-ntfs.img' -O ~/Downloads/uefi-ntfs.img

Write the image to the partition

dd if=~/Downloads/uefi-ntfs.img of=/dev/sdb1 status=progress

Download the Windows ISO and mount it

mkdir /mnt/iso && mount /path/to/iso /mnt/iso

Mount the NTFS partition

mkdir /mnt/ntfs && mount /dev/sdb2 /mnt/ntfs

Transfer the ISO contents to the NTFS partition. This process can take some time, after the command finish the device can still be in a locked state.

rsync -av /mnt/iso/* /mnt/drive

windows-usb's People

Contributors

brunowollinger avatar

Stargazers

Renan Zamboni Gomes avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.