How to Create a Live Ubuntu USB Drive With Persistent Storage

How to Create a Live Ubuntu USB Drive With Persistent Storage

Creating a Live Ubuntu USB drive with persistent storage is an excellent way to carry the entire operating system in your pocket, allowing you to run Ubuntu from almost any computer without leaving a trace. This method also enables you to save your data, installed applications, and configurations between sessions, making your experience seamless. In this article, we will guide you through every step of this process, ensuring that you have a fully functional Live USB drive that meets your needs.

Requirements

Before you begin, ensure you have the following:

  1. USB Drive: A USB drive with at least 4 GB of storage; however, 8 GB or more is recommended for persistence.
  2. Ubuntu ISO File: Download the latest version of Ubuntu from the official website.
  3. Rufus (or Equivalent Tool): If you’re on Windows, Rufus is a popular tool for creating bootable drives. For Linux users, tools like Startup Disk Creator or mkusb can be used.
  4. A Stable Internet Connection: For downloading the ISO and any additional applications you may need.
  5. Computer: A computer to perform the creation of the Live USB drive.

Step 1: Download the Ubuntu ISO File

Head over to the Ubuntu downloads page and select the version you wish to install. Click on the "Download" button to get the ISO file. Make sure to note the location where the file is saved, as you’ll need to reference it later.

Step 2: Choose a Tool to Create the Live USB

Depending on your operating system, pick one of the following tools for creating the Live USB with persistent storage:

  • For Windows:

    • Rufus: Rufus is known for its speed and flexibility. Download it from the Rufus website.
  • For Linux:

    • Startup Disk Creator: This is pre-installed on Ubuntu distributions. Search for it in the applications menu.
    • mkusb: Another tool for creating bootable USB drives with persistent storage. Install it from the terminal using the command: sudo add-apt-repository ppa:mkusb/mkusb followed by sudo apt update && sudo apt install mkusb.

Step 3: Creating the Live USB Drive

Using Rufus on Windows

  1. Insert the USB Drive: Plug your USB drive into the computer.
  2. Open Rufus: Run the Rufus executable that you downloaded.
  3. Select Your USB Drive: In the "Device" dropdown menu, select your USB drive.
  4. Select the ISO File:
    • Click on the "Select" button next to the "Boot selection" and navigate to the Ubuntu ISO file you downloaded earlier.
  5. Partition Scheme: Choose “MBR” for older BIOS systems, or “GPT” for UEFI systems (most modern systems).
  6. Persistence:
    • In Rufus, set the “Persistent partition size” slider to allocate space for persistence. The more space you allocate, the more data, applications, and settings you can save.
  7. Start the Process: Click on “Start” and agree to any prompts. This will format your USB drive and create the Live USB with persistent storage.
  8. Wait for Completion: Once the process is finished, you will receive a confirmation message. Your Live USB is now ready for use.

Using Startup Disk Creator on Ubuntu

  1. Insert the USB Drive: Connect your USB drive to the computer.
  2. Open Startup Disk Creator: You can find it in the applications menu.
  3. Select the Source Disk Image:
    • Click on "Other" and navigate to your downloaded Ubuntu ISO file.
  4. Select the USB Drive: It should automatically detect your USB drive. Ensure that the correct USB drive is selected.
  5. Persistent Storage: Allocate space for persistent storage using the slider (if this option is available). The available space for persistence will depend on the size of your USB drive.
  6. Make Startup Disk: Click the “Make Startup Disk” button and confirm any prompts to begin the process.
  7. Completion: Once done, you will receive a message confirming that the Startup Disk has been created successfully.

Using mkusb on Ubuntu

  1. Insert the USB Drive: Connect the USB drive.
  2. Open mkusb: Run the program by typing mkusb in the terminal.
  3. Select the ISO file: Choose the Ubuntu ISO file you downloaded.
  4. Select the USB Drive: When prompted, select your USB drive for installation.
  5. Persistence: Allocate space for persistence by following the on-screen instructions.
  6. Finalize: Confirm and proceed to create your Live USB. Wait for the process to complete.

Step 4: Boot from the Live USB Drive

Once the Live USB has been created, you can boot any computer from it:

  1. Insert the USB Drive: Connect the USB drive to the computer you want to boot.
  2. Access Boot Menu: Power on the computer and immediately press the designated key to access the boot menu (often F12, ESC, F2, or DEL).
  3. Select USB Drive: Use the arrow keys to navigate and select your USB drive from the list of bootable devices.
  4. Choose "Try Ubuntu": Once booted, select the option to “Try Ubuntu” to launch the live environment.

Step 5: Test Persistent Storage

Now that you have booted into the Live Ubuntu environment, it’s essential to test whether the persistence is functioning:

  1. Create a File: Open a terminal and create a temporary file with the command:
    touch ~/persistence-test.txt
  2. Reboot: Reboot your computer while ensuring that you boot from the USB drive again.
  3. Check for the File: After booting into the Live environment, check if the file you created is still there by running:
    ls ~/

    You should see persistence-test.txt listed.

This test confirms that the persistent storage is working correctly. You can now save files, install applications, and customize your environment. All these changes will be retained across reboots as long as you have sufficient space allocated for persistence.

Step 6: Customize Your Live Ubuntu Environment

Now that you have your Live USB with persistent storage, you can start customizing it to fit your needs. Here are some steps to enhance your Ubuntu experience:

Install Applications

  1. Using the Ubuntu Software Center: Open the Ubuntu Software Center, search for the applications you want, and install them. These installations will be saved due to the persistent storage.
  2. Using Terminal: You can also install applications via terminal commands. For instance, to install GIMP, run:
    sudo apt update
    sudo apt install gimp

Update the System

Ensure that your Live USB runs with the latest updates:

  1. Open a terminal and run:
    sudo apt update
    sudo apt upgrade
  2. This ensures that all your installed applications and the system itself are up to date.

Personalize the Desktop Environment

You can customize the desktop environment by changing the wallpaper, themes, and icon sets:

  1. Change Wallpaper: Right-click on the desktop, select “Change Desktop Background” and choose your desired wallpaper.
  2. Install Themes: You can find various themes and icon packs on sites like GNOME-Look.

Save Personal Files

You have the option to save your personal files directly on the USB drive:

  1. Use the File Manager to create directories for documents, pictures, music, etc.
  2. Regularly back up your files to another device to prevent data loss.

Step 7: Manage Storage Space

Over time, the system can consume space on your USB drive. Managing storage is essential for maintaining performance and usability.

Cleanup Unused Files

  1. Use the terminal command to remove unneeded packages:
    sudo apt autoremove
  2. Periodically check your home directory for large files or unused applications and remove them as necessary.

Conclusion

Creating a Live Ubuntu USB drive with persistent storage provides a practical solution for users who require a portable operating system. Whether for troubleshooting, testing, or continuous work on different machines, the persistent storage feature allows users to maintain applications, files, and configurations seamlessly across multiple sessions.

By following the steps outlined in this article, you’ve learned how to:

  • Download the necessary files and tools.
  • Create a Live USB drive using different methods.
  • Test and enhance your Ubuntu experience by installing applications and customizing settings.
  • Manage and maintain data stored on your USB drive.

With this knowledge, you can now carry around Ubuntu and use it on any compatible computer without affecting the native operating system. Enjoy the versatility and power of Ubuntu wherever you go!

Leave a Comment