One of the easiest ways to try Linux is to create a bootable flash drive. This allows a computer to start Linux directly from the USB drive without installing it onto the computers internal storage.
A bootable USB drive is commonly used to:
- Try Linux before installing it
- Install Linux to a computer
- Repair or troubleshoot an existing operating system
- Run diagnostic or recovery tools
What Do You Need?
To create a Linux bootable USB drive, you need:
- A USB flash drive- 8gb or higher is sufficient usually
- A Linux distribution
- The distributions ISO image
- Software for writing the ISO image to the USB drive
- A computer with a USB port
Important: Creating a bootable USB drive will erase the existing contents of the drive, so back up anything important before you begin.
What Is An ISO Image?
A Linus ISO is a file containing the files and structure needed to create installation or boot media, essentially like a blueprint.
It is sometimes called a disc image because it represents the contents of a bootable disk or drive.
For example, if you want to install Debian, you can download a Debian ISO file from the official Debian website.
The ISO isn’t just copied onto the USB though, it needs to be written to it in a way that makes the USB bootable.
Writing The ISO To The USB Drive
A program such as Rufus, balenaEtcher, or a Linux disk writing utility can write the ISO image onto the USB drive.
The general process is:
- Download the ISO for the distro you want
- Insert the USB flash drive
- Open your USB writing software(i.e Rufus)
- Select the Linux ISO
- Select the correct drive
- Start the writing process
- When finished eject the USB safely(don’t do a me and just pull it out)
Why Can’t You Just Copy The ISO?
Copying the ISO file onto a USB doesn’t normally make the drive bootable, it just sits on the drive like any other file.
The writing program places the data from the ISO onto the drive in the appropriate structure and makes the required boot information available to the computer.
Checking The Download
It is good practice to verify that the ISO you downloaded has not been corrupted or modified.
Linux distributions commonly publish a checksum, such as SHA-256, for their ISO files.
A checksum is a value calculated from the contents of a file. If your calculated checksum matches the value published by the distribution it provides evidence that the downloaded file is the expected file.
What Happens When You Boot From The USB
Once the USB drive has been created, the computer can be told to boot from it.
Instead of loading the operating system from the internal drive, the computer loads the boot files from the USB drive. For me this involved pressing esc on startup followed by F12 but different computers vary.
Many Linux distributions allow you to try the operating system without installing it. This is often called a Live environment.
A live environment runs Linux from the USB drive and usually loads most of the operating system into memory.
This is useful as you can test things like:
- Whether the display works correctly
- Whether Wi-Fi is supported
- Whether keyboard and touchpad are working
- Whether the computer performs well enough
- Whether you like the desktop environment
If you decide to install Linux, the Live environment can normally provide access to the installer.
USB Drives and Data Loss
Be careful when selecting the drive in your USB-writing software.
Writing an ISO to a drive usually overwrites all existing contents.
For example, if you accidentally select the internal drive instead of the USB drive you could overwrite important data.
Always double check the selected drive before starting the writing process.
