What's the best way of placing a bootable ISO on a USB drive, such that the drive is bootable? ISOs such as a live Linux preview disk, Windows installation ISO, etc.
Some ISO images already have the appropriate boot sector; for example, Arch Linux ISOs. In this case, all you need is to write the image using
dd ... of=/dev/sda or similar. (Using a partition,
sda1, will not work.)
But if the ISO image is not specially prepared to be used from a USB drive, you will have to copy the
.iso file to the disk as an ordinary file –
cp, all that – and install a bootloader such as Syslinux or lilo or GRUB. (There already are several pages on the Internet on this topic.)
To create a bootable USB drive from Windows (any) installation disks, use WinToFlash.
It doesn't get any easier.
WinToFlash is freeware and portable.
If you only have the ISO image, mount it as a virtual CD/DVD drive (e.g. with WinCDEmu).
For Linux distributions, use the previously recommended UNetbootin.
Check out the Windows 7 USB/DVD Download Tool. This is a Microsoft-produced tool on CodePlex for mastering USB flash drives for Windows 7 and Server 2008 R2 from a DVD ISO.
The Windows 7 USB/DVD Download tool allows you to create a copy of your Windows 7 ISO file on a USB flash drive or a DVD. To create a bootable DVD or USB flash drive, download the ISO file and then run the Windows 7 USB/DVD Download tool. Once this is done, you can install Windows 7 directly from the USB flash drive or DVD.
UNetbootin allows you to create bootable Live USB drives for Ubuntu, Fedora, and other Linux distributions without burning a CD. It runs on Windows, Linux, and Mac OS X. You can either let UNetbootin download one of the many distributions supported out-of-the-box for you, or supply your own Linux .iso file if you've already downloaded one or your preferred distribution isn't on the list.
Look at UNetbootin,
UNetbootin can create a bootable Live USB drive, or it can make a "frugal install" on your local hard disk if you don't have a USB drive. It can load distributions by automatically downloading their ISO image (CD image) files, or by using existing ISO files, floppy/hard disk images, or kernel/initrd files, for installing other distributions.
UNetbootin is freely available from Sourceforge (that's the link I gave). If you need additional binaries you can either repackage the ISO image you are using or (if it's not required at boot time) pick it up after the boot completes from another partition made on the same flash drive.
A couple of links that might be a useful as reference,
Create a Bootable Ubuntu Live USB (Ubuntu Feisty reference)
Instructions on how to update the Live CD and modify its contents are also given.
Melux is a Bash script which automates the creation of custom Ubuntu ISO images. It does nearly everything you would ever need to do: creates necessary working directories, mount-loops the original Ubuntu ISO image, copies its contents, mount-loops the squashfs file, copies its contents in a new dir and chroots in it where it modifies sources.lists and resolv.conf so that the chroot system is usable, and then presents a nice menu for the user to select which package groups to add.
YUMI is a MultiBoot Live USB Creator that can be used to quickly and easily build custom bootable USB Flash Drives containing multiple Live Linux distributions, Windows installers, Antivirus tools, system diagnostic, and troubleshooting software of your choosing.
More info can be found here:
Then boot from this USB drive in "UEFI mode".
The UEFI BIOS seems to know the FAT32 format and is able to find the file "efi\boot\bootx64.efi" and boot from that just fine. I don't know about the details.1
Note that under Windows, you will have to use diskpart to format a large (e.g. 64 GB) memory stick to FAT32, the GUI will not let you. The Mac GUI lets you do it.
1 Well, here's a reference just in case: http://wiki.osdev.org/UEFI
The (U)EFI system does not look for a boot sector, instead it looks for a file located on a FAT formatted disk. ... Some (U)EFI implementations just boot from the file /EFI/BOOT/BOOTX64.EFI."
For Linux Live USB drives, I'd recommend using Pen Drive Linux. They tell you how to make pretty much every distribution bootable from a pen drive, and they link you to the tools needed.
For Windows-based bootable USB drives, you'll need to add the bootmgr compatible code with
bootsect.exe, then you can simply copy an entire Windows CD/DVD to the USB drive. Guide for Windows 7 found here.
Easy2Boot will also boot Windows Install ISO images and allow you to install Windows to a hard disk directly from the ISO image. It also has automatic F6 mass storage floppy generation, so you can install Windows XP from an install ISO image to an AHCI or SCSI target system from an unmodified Microsoft Windows XP install ISO image.
It also will cope with ISO images like Hirens Boot CD and Ophcrack. Easy2Boot also can support booting of Linux live CD's with persistence too (e.g. Backtrack 5, Ubuntu, Fedora, etc.) by adding a .mnu file (example files are supplied in the download).
For Linux distributions specifically, I've used LiLi (Linux Live USB Creator). It's pretty user-friendly and optimized specifically for Linux Live images.
From their website:
Free and Open-source
LinuxLive USB Creator is a completely free and open-source software for Windows only. It has been built with simplicity in mind and it can be used by anyone. All you have to do is to pick up a Linux in the list and give it a try. No reboot needed
No reboot needed
Are you sick of having to reboot your PC to try Linux? No need with LinuxLive USB Creator. It has a built-in virtualization feature that lets you run your Linux within Windows just out of the box!
Supports many Linux distributions
Wow! Did you see that never-ending list? They are almost all there: Ubuntu, Fedora, Debian, OpenSUSE, Mint, Slax, CentOS, ArchLinux, Gentoo, PCLinuxOS, Sabayon, BackTrack, Puppy Linux ..
Having a Live USB key is better than just using a Live CD because you can even save your data and install software. This feature is called persistence (available only on selected Linux).
SmartClean & SmartDownload
SmartClean uninstalls properly any previous Live USB installations and SmartDownload lets you download any supported Linux in 2 clicks automatically selecting the best mirror to download from.SmartClean also lets you clean your USB key in one click.
And a lot more!
Intelligent processing: LiLi works with many Linux, even if they are not officially supported
Hidden installation: LiLi hides the Linux installation, your USB key stays clean
File integrity: tells you if your ISO is corrupted
Keeps your data on your USB device (formats only if needed)
Intelligent formatting: can format disks bigger than 32 GB
Auto-update: automatic updates when new Linux distributions are available
Also works with .IMG files (experimental)
If you want to get really fancy, the Sandisk Cruzer U3 emulates a USB CD-ROM drive for its "U3" utilities, in addition to being a standard thumbdrive (yes, it shows up as two different USB devices).
Of course, people have subsequently figured out how to install custom ISO images into the virtual CD device.
In any event, it's really awesome, because it is even recognized by the BIOS as a CD drive.
On Linux, you could use
bootiso -d /dev/sdd filename.iso
bootiso will check that selected device
/dev/sdd is connected through USB and fails if it doesn't, which is a big security plus.
It will also autodetect USB device if there is exactly one USB drive connected to your system, see it in action:
If you want to install syslinux bootloader for ISO files which are not meant to target USB drives, use
bootiso -b -d /dev/sdb filename.iso
To install it:
curl -L https://rawgit.com/jsamr/bootiso/latest/bootiso -O chmod +x bootiso
WiNToBootic for Windows:
WiNToBootic is a freeware that allows you an easy creation of bootable Windows USB hard or flash disk from an ISO image, CD/DVD or Folder. This product is focused on creation of boot disks based on Microsoft Windows NT 6.x OS family (Vista, 7, 8, Server 2008, Server 2012).
This is my favorite program for this task as it has lots of options and does not require installation.
- When you start up Rufus any pen drives you have plugged in to the computer should automatically appear in the Device box at the top. You can plug in a USB stick and it will find it after a couple of seconds-without you having to restart the program.
- Leave the second box as it is and change the third one to NTFS.
- Leave the cluster size as default and change the volume label to whatever you want to call it.
- After you have done that make sure the check-box saying 'Create a bootable disk using:' is checked and select ISO Image. Then click the little button on the right of it to choose your ISO image.
- If you want to see what's happening during the process click the log button at the bottom.
- Now you can click Start and hopefully your USB drive should be formatted and the ISO should be extracted to it.
I needed to copy an ISO to USB to update my BIOS; using
unetbootin did not work for that type of ISO image. In Linux, the
geteltorito worked for me.
apt-get install genisoimage
geteltorito -o bios.img g2uj18us.iso
cat bios.img > /dev/sdb
ISO to USB is another program I am using. I used UNetbootin, but when I restart I see not an interface for heroncd, but an interface for UNetbootin.
To be able to do this,
firstly you can also rip the DVD to iso file,
and then can rip to iso file to USB.
This may be an easier way.
You can also use GUI app called Etcher. Etcher seems to be faster (read/write speeds to the device directly) than other GUI apps like rufus, and it can also write RAW image files to USB drives. It's got a simple interface, give it a try.
Also it's cross-platform :)
TRANSFORM AN ISO INTO A BOOTABLE USB DRIVE (PENDRIVE):
We have several answers in forums out there, but I recommend this approach for these reasons...
- You just need "GParted";
- Ensures correct formatting for USB drive (pendrive) (fat32, boot, lba);
- Rely on the native ISO's boot scheme;
- "UNetbootin", "dd" and others fail in various situations;
IMPORTANT I: In order for the USB drive (pendrive) be bootable the ISO needs to be bootable. Use the same reasoning for UEFI ("BOOT/UEFI") compatibility.
IMPORTANT II: If the ISO is not compatible with UEFI ("BOOT/UEFI") method it may be necessary to enable the "Launch CSM", disabling "Secure Boot Option" and enabling some other legacy suports on machine bios.
NOTE: This answer focuses on users of the Linux platform.
Prepare the USB drive (pendrive)...
- Install and open "GParted";
- Select the USB device (pendrive) (e.g. /dev/sdb);
- Follow "Device" -> "Create Partition Table..." -> "msdos" -> "Apply";
- Create a new "fat32" partition table (use default options);
- Open "Manage Flags" and enable "boot" and "lba".
Mount the "iso"...
mkdir -p "/run/media/<YOUR_USER>/<ISO_NAME>" sudo mount -o norock,loop "<PATH_TO_ISO>" "/run/media/<YOUR_USER>/<ISO_NAME>"
Open the folder
/run/media/<YOUR_USER>/<ISO_NAME> and copy all ISO files to the USB drive (pendrive) including the hidden ones.
Umount the "iso"...
sudo umount -f "/run/media/<YOUR_USER>/<ISO_NAME>" rm -rf "/run/media/<YOUR_USER>/<ISO_NAME>"