Optical discs are fading. Many models of laptops and all netbooks are already available without the integrated optical drive. And, increasingly, to install operating systems using a USB stick. This is due to their cheapness and ability to perform the rewriting many times.
We will figure out how to make a bootable USB flash drive Ubuntu environment Linux distribution, regardless of any interest to us utilities are easily installed from the official repositories. We will also look at creating a bootable USB drive of Ubuntu in Windows.
I’ll clarify: the way Ubuntu is what we say in the article, but this distribution can be any other Linux image. Nothing will change except the size of the USB drive: at the very end of the article we will cover how to install a full Ubuntu on a flash drive and receive fully working system. For these purposes, you will need a device with more memory.
- How to create a bootable USB flash drive Ubuntu in Windows
- Step 1. Start
- Step 2. The choice of the stick
- Step 3. Image selection
- Step 4. Start recording
- Step 5. The record type
- Step 6. Ending a recording
- How to make a bootable USB flash drive in Ubuntu Linux
- Step 1. Start
- Step 2. Image selection
- Step 3. The choice of the stick
- Step 4. The end
- Entry Ubuntu on a USB flash drive using dd
- Step 1. The name of the stick
- Installing Ubuntu on a flash drive
How to create a bootable USB flash drive Ubuntu in Windows
Let’s say you downloaded the image of Ubuntu from the official site and want to record it on a flash drive. If you need to do in Windows, then you probably haven’t used Linux and don’t know how to record images. So I would say that just to copy the image to a USB flash drive will not help, you need to burn the Ubuntu image to a USB flash drive.
Best software to create bootable USB drive of Ubuntu in Windows, and indeed to record images on a flash drive, I believe Rufus. The program works well, easy to use and nothing to install. You can download it at the link.
Step 1. Start
Connect the flash drive to the computer and run the program:
Step 2. The choice of the stick
Select the device that will go on the record, that is your flash drive. If your computer is connected only one drive, the utility will define it automatically:
Step 3. Image selection
Field boot Method select Drive or ISO image:
Then click the choose button to select an ISO image. In Explorer, select the image of Ubuntu or any other Linux distribution:
Step 4. Start recording
All other settings can be left default. Click Start to start recording:
If the utility asks if you want to download a new version of the Linux boot loader, as it eliminates possible problems:
Step 5. The record type
Rufus utility supports two modes of recording the image on a flash drive. This mode and DD mode ISO image. In the mode of DD image of all the contents of the ISO file byte-by-byte is copied to the flash drive. On the flash drive is not created any file system or partition table, just tolerated by the structure, which was in the way. This can be useful for recording images with file OS ext, which does not support Windows.
Mode ISO image on the flash drive created partition, then formatted it to FAT32 and copied there all files from the image. The tool then creates and writes its own boot loader, which makes this a boot partition. This can cause problems when recording installers Linux, but it is recommended because you will have access to the flash drive and data on it. First select the first option, and only then, if that doesn’t work try the second:
Step 6. Ending a recording
Confirm record information on the stick, and then wait until the end. When all is done will show ready in the status line.
Then you can restart the computer and go to install.
How to make a bootable USB flash drive in Ubuntu Linux
In Linux the easiest way to make a bootable flash drive with the installer same Linux utility Etcher. Is a graphical utility written in Electron platform that allows you to do all that is necessary. Download it on the link. In the downloaded archive will be AppImage way of program that can directly run from the file Manager.
Step 1. Start
Run the program by clicking twice on the AppImage file:
Step 2. Image selection
Click on Select Image and select your disk image that you want to record:
Step 3. The choice of the stick
Click Change in the middle column of the window and select the drive you want to capture the image:
Step 4. The end
Click Flash and wait until finished recording.
Entry Ubuntu on a USB flash drive using dd
The dd utility allows you to transfer byte-by-byte the contents of the ISO image to a USB flash drive. This recording method is less convenient than using the GUI tools, but sometimes works when not helping others.
Step 1. The name of the stick
First you need to know the name of your stick in the file system. To do this, use fdisk:
In this example, the flash drive is /dev/sdb. Now you can record it on the way:
sudo dd if=~/Загрузки/ubuntu20_04.iso of=/dev/sdb bs=1M
With the option if need to pass the path to the image that should be recorded, and of the device to which it is necessary to record. Option bs helps the tool to run faster. Please note that the data must be written to the flash drive and not the partition on it. No more operations are required, since the entire structure of the image will be transferred to the device.
Installing Ubuntu on a flash drive
Actually, it’s not as difficult as you think now. This Linux – here you can do whatever you want, including to install the system on a flash drive.
First, do everything as in a normal installation, until you reach disk partitioning. In the selection window of the markup, select Another option:
Next in the disk partitioning screen you will see two connected to the system disk, one of them is your hard drive, another flash drive. To determine who is who, can size:
Unlike a typical installation, bootable flash drive Ubuntu does not require a swap partition, it is even contraindicated, because the system will very often overwrite the data, so you only shorten the life time of the stick. The remaining sections is also possible not to share as in a typical installation. Enough to create a single root partition with the ext2 file system. You need to choose this file system in order, again, to reduce the number of writes to disk.
Then perform the installation as usual. Bootable flash drive is created successfully, but after the process it is important to make a few settings all with the same goal – to reduce the number of writes to disk.
Need for all sections add the options noatime and nodiratime. As well as folders with temporary files to connect to the RAM.
To do this, open /etc/fstab and add the following lines:
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 partitions located on the flash drive, add the above option. For example, it was:
/dev/sdb1 / ext4 errors=remount-ro 0 1
/dev/sdb1 / ext4 errors=remount-ro,noatime,nodiratime 0 1
Even if you do not plan to install the program, you can remount the root in read-only mode.
It is important to note that the bootable flash drive with Ubuntu installed on her operating system – not a good idea. The number of records on the USB drive is limited, so although all the optimization and increase the lines of the media, no one can predict when the device will fail. Works, but not reliable system.
That’s all, we reviewed the most easy ways to make a bootable USB of Ubuntu or any other distribution on both Windows and Linux. Now you can even install a complete system on a flash drive. If you still have questions, ask them in the comments.