Boot Ubuntu from USB with Persistence

Boot Ubuntu from USB with persistence: Easily create a bootable Ubuntu USB with persistence for saving changes. The following segment covers how to use YUMI as an Ubuntu bootable USB media creator tool from within Windows or in Linux via WINE. Once finished, you should be able to successfully boot from the Live USB. You can also use the removable device to install Ubuntu to a hard drive.

Bootable Ubuntu USB

Boot Ubuntu from USB with persistence

  • Distribution Home Page: Ubuntu Project Page
  • Developer: Founded by Mark Shuttleworth (Canonical Ltd)
  • Distribution Release Date: First released October 20, 2004
  • Persistent Feature: Yes (writable or casper-rw persistence)

What is Ubuntu Linux?

Ubuntu is a very popular open-source operating system (OS) based on the Linux kernel, developed and maintained by Canonical Ltd. It is designed to be user-friendly, secure, and versatile, making it suitable for a wide range of computing needs, from personal desktops to servers and cloud environments.

It was originally based on Debian Linux. Over time, Ubuntu has evolved into one of the most well-known Linux distributions, widely loved by its users.

Some of its most notable key features include:

  • Open Source Operating System: Distributed under an open-source license, allowing users to modify, distribute, and contribute to its development.
  • Debian Based: Inherits the stability of Debian while adding its own features, improvements, and easy to use application interfaces.
  • Live Desktop and Server Editions: Available in two main editions; Live Desktop (for personal/business use) and Server (designed for server environments without a GUI).
  • Unity and GNOME Desktop Environments: Unity was used until 2017, after which Ubuntu switched back to the GNOME desktop environment.
  • Software Center: Simplifies the installation and management of applications, allowing users to search and install both free and proprietary software.
  • Package Management: Ubuntu uses the Debian package management system, with APT as the primary tool for installing and updating software.
  • Security: Known for its robust security, it benefits from the Linux security model with regular security updates.
  • Community Support: A large and active community contributes to troubleshooting, knowledge sharing, and continuous development.
  • LTS Releases: Long Term Support releases provide security and updates for five years, ensuring stability.
  • Cloud Integration: Ubuntu is widely used for cloud computing, supporting major platforms like AWS, Microsoft Azure, and Google Cloud Platform.

Essentials to Boot Ubuntu from USB

How to Create a Bootable USB Ubuntu with Persistence

There are several ways to create a bootable USB Ubuntu. This section covers using the YUMI software, which utilizes the casper-rw persistence feature. This allows you to store configuration changes and restore them on subsequent boots using a persistent overlay image or block file.

Make a Ubuntu Bootable USB using YUMI

Here's how to use YUMI software from within Windows or from Linux via WINE to create a bootable USB Ubuntu:

  1. Download and launch YUMI
    1. Select your thumb drive from the dropdown list, and check the box to prepare the device.
    2. Choose Ubuntu as the distribution.
    3. Browse to and select your ISO file.
    4. Optionally, set the "persistent file" size to store changes, then click Create.

    Make a bootable Ubuntu USB with YUMI

  2. Once the YUMI script has finished, restart your PC.

Create a Bootable Ubuntu USB Using Etcher

In addition to using tools like YUMI or dd, another simple and user-friendly way to create a bootable Ubuntu USB with persistence is by using Etcher. Etcher is a powerful, open source tool available for Windows, macOS, and Linux that simplifies the process of creating bootable USB drives. Below, we'll walk you through the steps to use Etcher to make a bootable USB with persistence.

What is Etcher?

Etcher is a cross platform tool used to create bootable USB drives by flashing disk images, such as an Ubuntu ISO, onto USB drives. It has a simple and intuitive interface, and it’s especially useful for users who prefer a straightforward approach.

Note: Etcher doesn't have built in support for creating persistent storage. However, it's a great tool for creating a bootable USB. For adding persistence, you'll need to manually configure persistence after creating the bootable USB.

Steps to Create a Bootable Ubuntu USB with Etcher:

  1. Download Etcher: Visit the official Etcher website to download the appropriate version of Etcher for your operating system.
  2. Prepare the USB Drive: Insert your USB drive (ensure that all data is backed up as the process will overwrite the drive).
  3. Download Ubuntu ISO: Go to the Ubuntu download page and download the desired ISO file.
  4. Flash Ubuntu to USB Using Etcher: Open Etcher and select the downloaded Ubuntu ISO by clicking "Flash from file." Choose your USB drive under "Select target." Click Flash! to start the process. Etcher will automatically write the Ubuntu ISO to the USB drive and verify the flash process.

Etcher will make a bootable USB, but this will not include persistence. If you wish to add persistence, you will need to use another tool to partition the USB or follow additional steps.

Adding Persistence to Your Ubuntu USB (Optional):

After using Etcher to create the bootable Ubuntu USB, you can add persistence manually:

  1. Create a Persistent Partition: Use a partitioning tool (e.g., GParted) to create a second partition labeled casper-rw on the USB drive. Format the partition to ext4 and ensure it is set up for persistence.
  2. Configure the Boot Loader: Modify the bootloader settings to ensure Ubuntu recognizes the persistence partition. You'll need to edit the boot parameters by adding persistent to the boot options, which ensures Ubuntu loads from the persistent partition.
  3. Reboot and Test: Once configured, reboot the system from the USB drive. After booting into Ubuntu, any changes you make will be saved across reboots.

Using Etcher to create a bootable Ubuntu USB is an easy and effective way to get Ubuntu up and running on a USB drive. Although Etcher doesn't directly support persistence, adding a persistence partition and configuring the bootloader allows you to retain your changes across sessions. This method is ideal for creating a portable Ubuntu system that you can use for troubleshooting, system repair, or as a lightweight OS for everyday use.

Make a Ubuntu Bootable USB from Linux

If you prefer using the dd command in Linux, here’s how you can create a bootable Ubuntu USB. This method is great for those comfortable with terminal commands, and it also allows you to add persistence using a separate partition.

How to Create an Ubuntu Bootable USB using dd

  1. Prepare the USB Drive: Insert your USB drive and use a tool like lsblk or fdisk -l to identify the device name (e.g., /dev/sdX, where X is your USB drive letter).
    Warning: Using dd will overwrite all data on the selected drive.

    lsblk
  2. Download an Ubuntu ISO: Download Ubuntu from the official site.
  3. Create a Persistent Partition (Optional but recommended): For persistence, create two partitions on the USB: one for the Ubuntu system (ext4) and one for persistence (e.g., casper-rw).
    • /dev/sdX1 (ext4) for the Ubuntu operating system
    • /dev/sdX2 (ext4) for persistence (casper-rw)
  4. Write the Ubuntu ISO to the USB with dd: Use the dd command to copy the Ubuntu ISO to the USB. Replace /dev/sdX with your actual USB path and ubuntu.iso with the path to the ISO.
    sudo dd if=ubuntu.iso of=/dev/sdX bs=4M status=progress && sync
  5. Create the Persistence File: If you’ve created a partition for persistence, mount it and create the casper-rw file.
    sudo mkdir /media/usb
    sudo mount /dev/sdX2 /media/usb  # Assuming the second partition is for persistence

Set BIOS to Boot Ubuntu from USB

To boot from the Ubuntu USB drive:

  1. During startup, press the appropriate key (F1, F2, F10, F12, Del, etc.) to enter BIOS setup. Learn more about accessing BIOS.
  2. Use the arrow keys to set the first boot device to your USB drive.
  3. Save changes and reboot.

Once the system reboots, you should be able to boot from the Ubuntu Live USB.

Install Ubuntu from USB

You can also use the bootable Ubuntu USB to install Ubuntu onto an internal hard drive or another storage device.

Install Ubuntu From USB

Once booted, click the installer shortcut on the desktop to begin installing Ubuntu from the USB drive to another device.

Final Thoughts on Ubuntu USB Creation

Creating a bootable Ubuntu USB with persistence is an excellent way to bring a portable and versatile operating system wherever you go. Whether you're using YUMI on Windows or the dd command in Linux, this process empowers you to boot, troubleshoot, recover, or even install Ubuntu seamlessly. Adding persistence takes it a step further, enabling you to save your configurations and files across sessions for a more tailored experience.

With your bootable Ubuntu USB, you have a dependable companion for exploring Linux, rescuing systems, testing hardware, or setting up Ubuntu on new devices. Whether you're a curious beginner, a seasoned Linux enthusiast, or a developer in need of a lightweight, portable environment, Ubuntu delivers flexibility and reliability. Happy booting and discovering the power of Linux on the go!