Linux users traditionally burn ISO files to DVD or CD, but many computers no longer have any drives. Creating a bootable USB drive is a better solution ̵
How Bootable Linux USB Drives Work
A Bootable USB Drive Like a Live CD or DVD This lets you run virtually any Linux distribution without affecting your computer. You can also install a Linux distribution from there on your PC – no CD or DVD drive required. You can not simply copy the ISO file or extract it to the USB drive and expect it to work. Although you do not "burn" the ISO file technically to a USB drive, a special process is required to create a Linux ISO file and create a bootable USB drive with it.
There are two ways to do this: Some Linux Versions The distributions include a graphical tool for creating USB startup disks that does it for you. You can also do this with the command
dd from a terminal of any Linux distribution. Whatever method you choose, you need the ISO file of the Linux distribution.
For example, Ubuntu Linux has two built-in methods for creating a bootable USB drive. A bootable USB drive gives the user the same experience as an Ubuntu Live DVD. It lets you try out the popular Unix-like operating system without having to make any changes to the computer. If you want to install Ubuntu, you can use the USB drive as the installation media.
You need an Ubuntu installation ISO image to create the bootable USB drive. So make sure you've downloaded the Ubuntu version you want to use.
To be clear, this bootable USB drive boots into a working copy of Ubuntu Linux, but does not save any changes you make. Every time you launch Ubuntu from this USB drive, it will be a new instance of Ubuntu. If you want to save changes and data, you must create a bootable USB drive with persistent storage.
Simply connect the resulting USB drive to a computer and boot from the USB device. (On some PCs, you may also need to disable Secure Boot depending on the Linux distribution selected.)
While we are using Ubuntu as an example, this works similarly with other Linux distributions.
How to Graphically Create a Bootable USB Drive
The Ubuntu default installation includes an application called Startup Disk Creator, which we will use to create our bootable USB drive. If you are using a different Linux distribution, it may contain a similar utility. For more information, see the documentation for your Linux distribution – you can search online for it.
For Windows users, we recommend Rufus to easily create a live USB drive.
Warning : This will erase the contents of the destination USB drive. To ensure that you do not accidentally accidentally write to the wrong USB drive, we recommend removing all other attached USB drives before proceeding.
For Ubuntu, a USB drive with a capacity of 4 GB or more should be fine. If the Linux ISO you choose is larger, you may need a larger USB drive.
If you are sure that only the correct USB drive is connected to your computer, start Startup Disk Creator. To do this, press the Super button (this is the Windows key on most keyboards) and enter "Startup Disk". The boot disk creation icon is displayed. Click the appropriate icon or press Enter.
The main Startup Disk Creator window appears. The USB device is highlighted in the lower area.
Click the "Other" button. A standard dialog for opening files will be displayed. Navigate to the location of your Ubuntu ISO file, highlight it, and click the Open button.
The main window of Startup Disk Creator should now look similar to the following screenshot. An ISO image should be highlighted at the top and a USB drive at the bottom.
Make sure the ISO image and the USB drive are correct. Click the "Make Startup Disk" button if you want to continue.
A warning reminds you that the USB drive is completely deleted. This is your last chance to cancel without making any changes to the USB drive. Click the "Yes" button to create the bootable USB drive.
A progress bar indicates how far the build process is to completion.
A confirmation message informs you when the creation of the bootable USB drive completes. On the computer we used for this article, the process took about five minutes.
Click on the "Finish" button. You can either reboot your computer and boot from the USB drive, or unplug the USB drive, transfer it to another computer, and boot.
How to create a bootable USB drive with dd
The tool we use To create the bootable drive from the command line, use the command
Warning : This command must be used very carefully.
dd will do exactly as you say it as soon as you say it. There are no "are you sure" questions or withdrawal opportunities.
dd just keep going and follow the instructions you gave him. So we have to be very careful that what we tell him is definitely what we want.
We need to know which device your USB drive is associated with. That way, you know exactly which device identity you want to pass to
dd on the command line.
In a terminal window, enter the following command. The command
lsblk lists the block devices on your computer. Each drive is assigned a block device.
The output from
lsblk shows the drives currently connected to your computer. On this computer there is an internal hard disk with the name
sda and a partition with the name
 Connect your USB drive and re-use the
lsblk command. The edition of
lsblk has changed. The USB drive will now be listed in the output.
The list contains a new entry named
sdb . and it has two partitions. One partition is called
sdb1 and is 1 KB in size. The other partition is named
sdb5 and has a size of 14.6 GB.
This is our USB drive. The identifier we need to use is the one representing the drive, not one of the partitions. In our example this is
sdb . Regardless of what the name is on your computer, the device that was not included in lsblk listing must be the USB drive.
The we command The output from
dd reads as follows:
sudo dd bs = 4M if = downloads / ubuntu-19.04-desktop-amd64.iso from = / dev / sdb conv = fdatasync
Let's resolve that.
- sudo : You must be a superuser to issue
ddcommands. You will be asked to enter your password.
- dd : The name of the command we use.
- bs = 4M : The option
-bs(block size) defines the size of each block read from the input file and written to the output device. 4 MB is a good choice as it provides decent throughput and is an exact multiple of 4 KB, which is the block size of the ext4 file system. This results in an efficient read and write rate.
- if = Downloads / ubuntu-19.04-desktop-amd64.iso : The
-ifoption (input file) requires the path and name of the Linux ISO image that you use as an input file use.
- of = / dev / sdb : The
-of(output file) is the critical parameter. This must be supplied with the device that represents your USB drive. This is the value we identified earlier using the
lsblkcommand. In our example, it is
sdbso we use
/ dev / sdb. Your USB drive may have a different identifier. Make sure you enter the correct ID.
- conv = fdatasync : The parameter
ddconverts the input file as it is written to the output device.
dduses kernel disk caching when writing to the USB drive. The modifier
fdatasyncensures that the write buffers are emptied correctly and completely before marking the build process as completed.
There is no visual feedback from
dd during the build progress. It goes to work and does not report anything until it's done.
When the bootable USB drive was created
dd reports the amount of data written to the USB drive, the elapsed time in seconds, and the average data transfer rate.
You can verify that the bootable USB drive works by rebooting your computer and booting from the USB drive, or you can try to boot from there another one Computer.
You now have a portable working copy of Ubuntu or another Linux distribution of your choice. It's always immaculate when you boot it, and you can boot it on virtually any PC.