Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@sphrak
Last active April 23, 2019 07:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sphrak/333f4cfdecabcc711b356dca0828f826 to your computer and use it in GitHub Desktop.
Save sphrak/333f4cfdecabcc711b356dca0828f826 to your computer and use it in GitHub Desktop.
Copy windows iso contents to a usb memory and make it bootable

0. Format partition to ntfs somehow

1. Mount usb drive

mount /dev/sdX /media/usb

2. Mount iso

mount windows.iso /media/windows

3. Copy contents of iso

cp -rv /media/windows/* /media/usb/

4. Install grub bootloader

--boot-directory is the boot directory inside the iso.

sudo grub-install --target=i386-pc --boot-directory=/usbflash/boot/ /dev/sdX

5. Add this grub.cfg to /media/<usb>/boot/grub/grub.cfg.

echo "If you see this, you have successfully booted from USB :)"
insmod ntfs
insmod search_fs_uuid
search --no-floppy --fs-uuid <UUID_from_step_2> --set root
ntldr /bootmgr
boot

Reference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment