Skip to content

Instantly share code, notes, and snippets.

@m4scosta
Created February 10, 2017 17:32
Show Gist options
  • Save m4scosta/779f67291a1dc3648396e4ef385b77aa to your computer and use it in GitHub Desktop.
Save m4scosta/779f67291a1dc3648396e4ef385b77aa to your computer and use it in GitHub Desktop.

Install dependencies

Install gparted and lilo

sudo apt-get -qy install gparted lilo
sudo liloconfig

Check disk

Plug usb stick and check its address with fdisk, it might be something like /dev/sd*

fdisk -l

Format disk

Using gparted:

  • format disk
  • create a new partition table with msdos type
  • create a new partition NTFS partition

Copy files

Open a terminal on the same directory your .iso is and run:

mkdir ./winiso
mkdir ./usb
# fill with your disk address
dev="<disk address>"

# replace win.iso by your iso filename
sudo mount -o loop win.iso ./winiso

sudo mount ${dev}1 ./usb
rsync -aP ./winiso ./usb
sudo umount ./winiso ./usb
sudo lilo -M /dev/sdb mbr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment