Skip to content

Instantly share code, notes, and snippets.

@liathit
Created August 1, 2015 11:19
Show Gist options
  • Select an option

  • Save liathit/e81d55fc6d333c3d340c to your computer and use it in GitHub Desktop.

Select an option

Save liathit/e81d55fc6d333c3d340c to your computer and use it in GitHub Desktop.
Write iso image
Mount the ISO:
sudo mount -t udf -o loop,ro,unhide /path/to/file.iso /mnt
Insert the USB drive.
Run fdisk and specify the device name of the USB drive; for example:
sudo fdisk /dev/sdc
Delete any existing partition table and create a new one.
Create a new partition of at least 4.5 GB. Mark it bootable and set its type to 7 (HPFS/NTFS/ExFAT).
Write changes and exit fdisk.
Create a FAT-32 file system in the new partition; for example:
sudo mkfs.vfat -F 32 /dev/sdc1
Mount this partition to an existing subdirectory; for example:
sudo mount /dev/sdc1 /media/usbstick
Copy all of the files from the mounted ISO into this directory:
sudo cp -rv /mnt/* /media/usbstick
Sync the file systems just to be sure:
sudo sync
Unmount both items previously mounted:
sudo umount /media/usbstick
sudo umount /mnt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment