Return to the main Installation page
Drives - mass storage devices
This page is called 'iso2usb', but the methods described are valid for every kind of drive that is a mass storage device
- USB pendrive
- memory card connected via USB or PCI
- USB hard disk drive, HDD, and solid state drive, SSD
- SATA and eSATA HDD and SSD
- IDE (PATA) HDD
Cloning and extraction
Cloning
Cloning (copying each byte as it is, creating a one-to-one copy) is a very simple and reliable method to create a boot drive (live drive or install drive) from a linux hybrid iso file. All current standard Ubuntu and Ubuntu community flavour iso files are hybrid iso files, so this method works with all these files, the desktop iso files, the Ubuntu Server iso files and the Ubuntu mini.iso files.
Cloning creates a read-only ISO 9660 partition table and file system, so you cannot change anything in the drive (but you can create a new partition table with partitions and file systems). The operating system in the drive will be read-only. You can install program packages and create files, but they will 'live' in RAM and will not survive shutdown/reboot.
Cloning tools
In linux:
Ubuntu Startup Disk Creator in Ubuntu 16.04 LTS and newer versions alias usb-creator-gtk (in older versions of Ubuntu there is a buggy extracting tool)
Disks alias gnome-disks
mkusb (install according to the link)
dd, very powerful but also very dangerous, deserves the nickname 'Data Destroyer'; the other tools are safer because they help you identify the target drive and double-check that it is correct.
In Windows:
Win32 Disk Imager (install according to the link)
Rufus in 'dd-mode' is cloning the content of the iso file to a USB pendrive. This 'dd-mode' may work, when the default extracting mode fails.
Cloning Plus
There is a simplified method to create persistent live systems without extraction in
- Ubuntu 19.10
- Debian 10
and we expect it to work also in future versions of Ubuntu and Debian.
- The iso file (which is a binary file) is modified to include the boot option 'persistent' for Ubuntu and 'persistence' for Debian.
- This iso file is cloned to a USB pendrive or memory card.
- A partition for persistence is created 'behind' the cloned data.
The text mode tool mkusb-minp and the GUI tool mkusb-plug can help you do it.
Extraction
Extraction is a more complicated method, where the content of the iso file is extracted (the directories and files are copied) to a read-write file system in a drive (a mass storage device).
It is enough to
Create an MSDOS partition table and a partition with a FAT32 file system and a boot flag.
- If there is a file that exceeds 4 GiB (when extracted), FAT32 cannot manage it. In this case you can use an NTFS file system (instead of FAT32). Such a drive is bootable in many but not all newer PC computers for example Dell computers with 4th generation Intel i{3,5,7} processors or newer. But for example the Lenovo V130 with a 7th generation i5 processor does not boot from an NTFS partition. The computer's UEFI-BIOS system decides what can be booted (only drives with FAT32 or also drives with NTFS).
Extract the content from the iso file to the mounted FAT32 or NTFS file system to create a drive (live drive or install drive) that boots in UEFI mode.
You must add a bootloader separately, if you want the drive to boot also in BIOS mode.
Extracting tools
Unetbootin is a well-known tool with versions for Linux, Windows and MacOS
Rufus is a recommended tool to install Ubuntu from Windows. The default mode is extracting the content of the iso file to a FAT32 partition.
Do it yourself
When the boot structure is modified in Ubuntu or the booting software, there can be problems until the extracting tools are modified to manage the modification. It is worthwhile to find a method that is as simple as possible and to learn how to use it in order to manage the extraction also when the boot structure is modified.
For an UEFI only boot flash drive you need no installer
Oldfred's advice
Actually if you want an UEFI only boot flash drive you do not need an installer at all.
You just need to format flash drive with FAT32 and set boot flag on. Then use whatever is your favorite extraction tool like 7zip to extract & copy ISO to FAT32 partition. UEFI boots from a FAT32 partition with a very long GUID (if gpt) to identify it. Gparted and some other tools use boot flag to set that GUID. A few UEFI want flash drive as gpt, most will boot with MBR as even MBR has a code for ESP - efi system partition.
Ubuntu has built in /EFI/Boot/bootx64.efi which really is a copy of grub, for booting in UEFI mode.
Normal installers format, extract, and install a BIOS boot loader. To boot only in UEFI mode you need not install a bootloader separately.
See more details in this link, UEFI: Interesting simple method to boot - but how does it work?
Make the drive boot both in UEFI mode and BIOS mode
If your system is running in BIOS mode, you can install a grub bootloader for BIOS mode into the target drive. If your system is an installed system and running in UEFI mode, this does not work, but there is a work-around.
You can extract/clone from a compressed image file to create the head end and a partition with the FAT32 file system and a boot flag. The grub bootloader for BIOS mode will be there already, at the head end and with the necessary files in the FAT32 partition.
This method works with 64-bit desktop Ubuntu iso files and the community flavours of Ubuntu, (Kubuntu, Lubuntu, ... Xubuntu).
It works with 64-bit Windows install iso files too (Windows 8-10 both in UEFI and BIOS mode, Windows 7 only in BIOS mode).
Detailed instructions
Find detailed instructions in the sub-page /diy (extraction method)
Find detailed instructions in the sub-page /isoboot (grub-n-iso method)
Links
UEFI: Interesting simple method to boot - but how does it work?
Detailed instructions for an extraction method to make a USB boot drive in the sub-page: /diy
Detailed instructions for an iso-boot method to make a USB boot drive in the sub-page: /isoboot
Alternatives to and discussion about extracted USB boot drives