LinuxFinder
How to Create a Bootable Ubuntu USB Flash Drive

How to Create a Bootable Ubuntu USB Flash Drive

Optical disks are a thing of the past. Many notebook models and all netbooks are already available without a built-in optical drive. And increasingly, USB flash drives are used to install operating systems. This is due to their cheapness and the ability to perform overwriting many times.

We’ll figure out how to make a bootable USB flash drive in the environment of a Linux distribution, no matter what – the utilities that are interesting to us are easily installed from official repositories. Also we will consider creating a bootable USB flash drive Ubuntu in Windows.

I will clarify: the image of Ubuntu is what we are talking about in the article, but on the site of this distribution can be any other image of Linux. Nothing will change, except for the size of the USB-drive: at the very end of the article we will touch on the topic of how to install a full-fledged Ubuntu on a USB flash drive and get a fully working system. For these purposes, you will need a device with a large amount of memory.

How to Create a Bootable Ubuntu USB Flash Drive in Windows

In this article, we’ll talk about how to Create a Bootable Ubuntu USB Flash Drive.

Let’s say you downloaded the image of Ubuntu from the official site and want to write it to a USB flash drive. If you need to do this in Windows, then you probably have not used Linux yet and do not know how to burn images. Therefore, I will say that simply copying an image to a USB flash drive does not help, you just need to write the image of Ubuntu on a USB flash drive.

The best program for creating a bootable USB flash drive Ubuntu in Windows, and generally for writing images to a USB flash drive, I believe Rufus. The program works fine, easy to use, and nothing needs to be installed. You can download it from the link.

STEP 1

Connect the USB flash drive to the computer and run the program:

STEP 2

Select the device you want to write to, ie. your flash drive:

STEP 3

Check the box: Quick Format, Create a bootable disk, then in the drop-down list set the ISO image:

STEP 4

Select the Ubuntu or other distro image using the button:

STEP 5

the next step in how to Create a Bootable Ubuntu USB Flash Drive – the beginning of the recording. Press the Start button to start recording:

All, it remains to wait until the end of the recording, and the bootable flash drive is ready. Then you can restart the computer and proceed to installation.

How to Create a Bootable Ubuntu USB Flash Drive

In Linux, we’ll look at several ways to make a bootable USB flash drive. The first method is via the terminal, using the standard dd copy utility.

STEP 1

Connect the USB flash drive and determine the name of its device in the system. Typically, this is / dev / sdb1, but it may be different. To be sure, look at all attached devices with the fdisk command:

fdisk -l

Device Start Boot End Sectors Size Id Type
/ dev / sdb1 * 2048 15693823 15691776 7,5G c W95 FAT32 (LBA)

As you can see, for the USB flash drive there is a FAT32 file system, and there is its size in gigabytes – 7,5G.

STEP 2

Run the copy of the image on the USB flash drive with the command:

dd if = ~ / Downloads / ubuntu.iso of = / dev / sdb1

Here I mean? that ~ / Downloads / ubuntu.iso is an installation image, and / dev / sdb1 is your flash drive.

STEP 3

Wait until the creation of the bootable USB flash drive is complete, and you’re done.

It is much more convenient to record images on a USB flash drive using graphic utilities. In Linux, too, there is a program for creating a bootable USB flash drive Ubuntu. It’s called Unetbootin. It is very easy to install from the official repositories of any distribution, the name of the package is the same.

For example, in Ubuntu:

sudo apt install unetbootin

Let’s look at how to make a bootable USB flash drive Ubuntu.

STEP 1

Connect the USB flash drive and run the utility with the command:

unetbootin

STEP 2

Select the Disk Image option:

STEP 3

Select the installation image by clicking the […

STEP 4

Select the device to record and press OK.

The bootable USB flash drive is ready. You can install the system. But now it is only suitable for this, if you want a full bootable USB flash drive with the ability to install programs and change configuration files on it, you need to install Ubuntu on the USB flash drive.

INSTALLING UBUNTU ON A FLASH

The final step is how to Create a Bootable Ubuntu USB Flash Drive.

In fact, it is not as difficult as it seems to you now. This is Linux – here you can do whatever you want, including installing the system on a USB flash drive.

First, do everything as in a normal installation, until you reach the markup of the disk. In the markup method selection window, select Other option:

Further in the disk layout window you will see two disks connected to the system, one of them is your hard disk, the other is a flash drive. Determine who is who here, you can by the size:

Unlike the usual installation, the bootable USB flash drive Ubuntu does not require a swap partition, it is even contra-indicated, because the system will very often overwrite the data, and so you just shorten the life time of the flash drive. The remaining partitions can also not be divided as in a conventional installation. It is enough to create one root partition with the ext2 file system. You need to choose this particular file system, in order, again, to reduce the number of entries to disk.

Then you perform the installation as usual. A bootable USB flash drive will be successfully created, but after the process is completed, it is important to perform several settings all with the same purpose – to reduce the number of records per disk.

It is necessary for all sections to add options noatime and nodiratime. As well as folders with temporary files to connect to the main memory.

To do this, open the file / etc / fstab and add the following lines to it:

vi / etc / fstab

tmpfs / tmp tmpfs rw, size = 100m 0 0
tmpfs / run tmpfs rw 0 0
tmpfs / var / lock tmpfs rw 0 0
tmpfs / var / log tmpfs rw, size = 10m 0 0

Then for all the partitions located on the flash drive, add the above options. For example, it was:

/ dev / sdb1 / ext4 errors = remount-ro 0 1

Do this:

/ dev / sdb1 / ext4 errors = remount-ro, noatime, nodiratime 0 1

Also, if you do not plan to install programs, you can remount the root in read-only mode.

It’s important to note that the Ubuntu boot drive with the operating system installed on it is not a good idea. The number of entries on the USB drive is limited, therefore, although all the optimizations listed here and will increase the media service lines, no one can predict when the device will fail. This is an option of a working but not reliable system.

CONCLUSIONS

We hope you understand how to Create a Bootable Ubuntu USB Flash Drive.

That’s all, we considered the easiest ways to create a bootable USB flash drive of Ubuntu or any other distribution in both Windows and Linux. Now you can even install a full system on a USB flash drive. If you have any questions, ask them in the comments.

Tonrok1

Add comment