Here we can see, “How to Create a Live Ubuntu USB Drive With Persistent Storage”
When you boot a Linux live USB drive, it’s usually a blank slate. It can be started, programmes installed, files saved, and settings changed. However, when you reboot, all of your changes are lost, and you’re left with a brand-new system. This is useful, but if you want a system that continues where you left off, make a live USB with persistent storage.
How Persistent Storage Works
- When you make a USB drive with persistence, you can set aside up to 4 GB for a persistent overlay file. Any changes you make to the system will be saved in the overlay file, such as saving a file to your desktop, changing the settings in an application, or installing a programme.
- Your files, settings, and installed programmes will be available whenever you boot the USB drive on any computer.
- If you want to keep alive Linux system on a USB drive and use it on multiple PCs, this is a great feature. You won’t have to reinstall your operating system every time you boot. If you’re installing Ubuntu from a USB drive and then running it from your hard drive, you won’t need persistence.
- There are a few drawbacks. System files, such as the kernel, are not editable. Major system upgrades are not possible. You won’t be able to install hardware drivers either. Most applications, on the other hand, can be installed.
- You can even update most installed applications, ensuring that your persistent USB drive has the most up-to-date version of your preferred web browser.
All Linux distributions don’t support persistence. It works with the most recent versions of Ubuntu, including Ubuntu 18.04 LTS and Ubuntu 19.04. It should also work with Linux distributions based on Ubuntu. We’ve also had success with Fedora in the past. Download the necessary ISO file and follow the steps outlined below.
How to Make a Persistent Ubuntu USB Drive on Ubuntu
- To complete this procedure, you’ll need a computer that already runs Ubuntu. To set up persistence, you’ll also need a USB drive with enough storage capacity.
- We used a 16 GB hard drive, but an 8 GB hard drive would have sufficed. The larger the hard drive, the more long-term storage you can get.
- The grub, boot, and Ubuntu partitions are all under 2 GB in size. The Casper-rw and USB data partitions will take up the remaining space on the USB drive.
- For persistent storage, the Casper-rw partition is used. The software you install and settings files, for example, will be saved here.
- The NTFS file system will be used to format the USB data partition. Linux, Windows, and macOS will all be able to use it. This partition is also accessible from the USB drive’s live Ubuntu installation.
- This means that any files copied from another computer to the USB data partition will be accessible to your live Ubuntu.
- In other words, the USB data partition serves as a “shared folder” for your live Ubuntu and any other computer to which you connect your USB drive. That’s fantastic.
- Although this article was researched using a 16 GB USB drive, an 8 GB drive would suffice. It simply wouldn’t have as much storage.
- To begin, download the Ubuntu ISO file that you want to put on the USB drive.
Note: Before continuing, ensure Ubuntu’s Universe repository is enabled if you’re making a live USB drive from a live disc. Run the following command to accomplish this:
sudo add-apt-repository universe
Second, the programme you’ll use is called mkusb. It isn’t included in the default Ubuntu installation. You’ll have to set it up. To do so, type the three commands below. The first command adds the mkusb repository to Ubuntu’s list of available repositories to know where to get mkusb.
sudo add-apt-repository ppa:mkusb/ppa
The following command causes Ubuntu to update its package lists for the registered repositories.
sudo apt-get update
We can now use the following command to install the mkusb package:
sudo apt install --install-recommends mkusb mkusb-nox usb-pack-efi
The mkusb programme is excellent at detecting USB drives. That’s great, but there’s nothing like experiencing it firsthand. When mkusb says it’ll completely wipe a drive, make sure it’s the USB drive you’re going to use, not another device on your system.
Type the following command in a terminal window. The lsblk command displays a list of your computer’s block devices. A block device is associated with each drive.
The output of lsblk displays the drives that are currently attached to your computer. On this machine, there is one internal hard drive called sda, which has one partition called sda1.
Reconnect your USB drive and run the lsblk command again. The lsblk output will have changed. In the output, the USB drive will now be listed.
In the list, there is a new entry called sdb. It only has one partition, sdb1. That’s a USB flash drive.
If your computer already has multiple drives, the name of your USB drive will be different. The USB drive must be the device not listed in the previous lsblk listing, regardless of its name.
- You can start mkusb once you know which device your USB drive is. Type “mkusb” while holding down the Super (Windows) key. The mkusb icon will appear on the screen. Press Enter or click the icon.
- You’ll be asked whether you want to run the dus (Do USB Stuff) version of mkusb in a dialogue box. Select “Yes” from the drop-down menu.
- A terminal window with a black background will appear, prompting your password in a dialogue box. Click the “OK” button after entering your password.
- This procedure will completely wipe the contents of the USB drive!
- To acknowledge that you understand this, click “OK” in the warning dialogue.
- Click the “OK” button after selecting “Install (make a boot device)” from the list.
- Click the “OK” button after selecting “‘Persistent live’ – only Debian and Ubuntu” from the list.
- A dialogue box with a file browser will appear.
- Select the Ubuntu ISO file you downloaded and click the green “OK” button to proceed.
- We’re selecting the Ubuntu 19.04 ISO image from the Downloads folder in the screenshot below.
- A list of USB drives connected to your computer will appear. This allows you to choose the best USB drive for your needs.
- The test machine for this article had only one USB drive connected to it. It’s called sdb, as we’ve already established. We’ve confirmed that the USB drive we want to use is the one we want to use to move forward with confidence. Select “OK” from the drop-down menu.
- Select the “USB-pack-EFI (default grub from ISO file)” entry in the list and click the “OK” button when the dialogue box appears.
- You still have one more option. In the Casper-rw partition, you can choose what percentage of the storage space is used for persistent storage. The rest will go to the USB data partition, which uses the NTFS file system and can be accessed from Windows and Mac computers.
- Leave the slider at its default value and click the “OK” button if you’re happy to have the available space on the USB drive shared equally between these two partitions.
- Now, all we have to do is tell mkusb that we’re satisfied with all of our choices and that everything should go ahead.
- To be clear, this is the final opportunity to back out.
- Select the “Go” radio button and click the “Go” button if you are certain you want to proceed.
A progress bar indicates how far along the creation process is.
- The file system buffers must be flushed to the USB drive at the end of the process. It’s also a good idea to wait until you see the phrase “Work completed.” This indicates that the procedure is finished.
- You’ll see a dialogue with the phrase “Work done” highlighted in green when the process is finished. Select “OK” from the drop-down menu. If any other dialogues appear, click the “Quit” button to dismiss them.
- The terminal window will scroll through a few more lines of output. When you’re ready, you’ll be prompted to press “Enter.”
The terminal window will close when you press “Enter.” You can either restart your computer and boot from the USB drive or unplug the USB drive and boot it from another computer.
How to Make a Persistent Ubuntu USB Drive on Windows
According to our sources, the method described below (using Linux Live USB Creator) is no longer compatible with the most recent versions of Ubuntu. Instead, you’ll have to use the method described above.
To set up persistence, you’ll need a large USB drive. Ubuntu specifies that the USB drive must have a minimum of 2 GB of storage, with additional space required for persistent storage. So, if you have a 4 GB USB drive, you’ll only be able to store 2 GB of data permanently.
You’ll need a USB drive with at least 6 GB of persistent storage to get the most out of it.
Unfortunately, the Rufus tool, which Ubuntu recommends for creating live Ubuntu USB drives on Windows, does not support creating persistent storage systems. While Rufus is recommended for creating most Ubuntu live USB drives, we’ll need to use a different tool for this task. (Update: Rufus now supports persistent storage in the latest versions!)
- Download the Linux Live USB Creator application and the Ubuntu ISO file you want to put on the USB drive.
- Place the USB drive you want to use in the USB port on your computer and run the “LiLi USB Creator” application you just installed.
- In the “Step 1: Choose Your Key” box, select the USB drive you want to use.
- Would you please upload the Ubuntu ISO file that you downloaded? Under “Step 2: Choose a Source,” click the “ISO / IMG / ZIP” button and browse to the. Double-click the ISO file on your computer.
- Select how much space you want to use for persistent storage on the USB drive using the “Step 3: Persistence” options. To select the maximum amount of storage, drag the slider to the right.
- You’ve completed all of the necessary configurations. Click the lightning icon under “Step 5: Create” to create your live USB drive with persistent storage.
- Allow time for the tool to create the drive. When the process is complete, you’ll see a message that says, “Your LinuxLive key is now up and ready!” You can either restart your computer and boot from the USB drive or unplug the USB drive and boot it from another computer.
Boot the USB drive and create a folder or save a file to the desktop to verify that persistent storage is working properly. Then, restart your computer and boot from the Live USB drive. You should be able to see the folder or file you put on the computer.
I hope you found this information helpful. Please fill out the form below if you have any questions or comments.
- Is the Ubuntu live USB persistent?
You now have a USB drive that can run/install Ubuntu on virtually any computer. Persistence allows you to save changes made during a live session, such as settings or files, and have them available the next time you boot from the USB drive. Choose the live USB device.
- Can Ubuntu be booted from a USB drive?
Running Ubuntu from a USB stick or DVD is a quick and painless way to see how Ubuntu works for you and with your hardware. You can do almost anything with a live Ubuntu that you can do with an installed Ubuntu: Browse the internet without storing any history or cookie data securely.
- Is it possible to install Ubuntu without a USB drive?
Follow these steps to install Ubuntu without a CD/DVD or USB pendrive: Unetbootin can be downloaded here. Execute Unetbootin. Now select Hard Disk from the Type drop-down menu.
- Use Rufus to create a live Ubuntu USB drive with persistent storage.
- How do I create a bootable Ubuntu USB with persistent data?