Home Bootable USB How To Create Persistent Live USB Using Mkusb On Ubuntu

How To Create Persistent Live USB Using Mkusb On Ubuntu

Mkusb - A tool for creating bootable USB drives in Ubuntu-based systems

By sk
Published: Updated: 34.7K views

This tutorial explains what is Mkusb and how to create persistent Live USB using Mkusb tool on Ubuntu and its variants such as Pop!_OS, Linux Mint and Elementary OS.

Introduction

There are many tools available to create bootable USB drive on Linux. We have already reviewed a few such tools, namely Etcher, Bootiso, and MultiCD.

If you don't want to use these third-party tools, there is a built-in command line tool called dd (Data Duplicator) available to create a bootable USB drives.

Using the live bootable medium, we can test the Linux distributions without having to install them on the hard drive. We can also use the live cd for troubleshooting purposes as well.

When you try the Live USB, you can do all sort of things, such as installing applications, downloading files, playing media, creating files and folders, customizing it as per your liking and a lot more.

However once you reboot the system, all of the said changes will be lost. Because, you are working on a live OS.

What if you want to make all changes remain intact even after rebooted the system? That's what we are going to do now using Mkusb bootable creation tool.

You can use the persistent live USB as the way you use the regular Laptop/Desktop system. You can install applications, save files an folders, customize the system as you wish etc.

All the changes you made in the live system will remain intact even after you reboot or shutdown it.

To put this in simple words, the persistent storage Live USB will act like a portable computer. You can keep it with you all the time, plug it on any system and start using it the OS anywhere.

I tested this guide on Ubuntu 18.04 LTS desktop. I successfully created a persistent live USB drive with Ubuntu 18.04 LTS desktop.

What Is Mkusb?

Mkusb is a graphical utility to make bootable drives on Ubuntu Linux. It uses dd tool under the hood to create boot drives. Not just regular live bootable drives, Mkusb can also create persistent storage live USBs as well.

The target device of Mkusb is not always a USB drive, but a mass storage device. Sometimes it could be an internal drive or an eSATA drive.

But not to worry! It helps you to select the correct target device and avoid overwriting the other devices.

Mkusb will use 'the whole device', actually only the head end (size of the iso file), but the rest of the device is not available.

Install Mkusb On Ubuntu

The developer has created an official PPA for mkusb. So installation won't be a big deal.

First, make sure you have enabled [Universe] repository:

$ sudo add-apt-repository universe

Then run the following commands one by one to install mkusb on Ubuntu and its derivatives like Linux mint.

$ sudo add-apt-repository ppa:mkusb/ppa
$ sudo apt update
$ sudo apt install --install-recommends mkusb mkusb-nox usb-pack-efi

Done!

Create Persistent Live USB On Ubuntu Using Mkusb

Now, plug-in a USB drive and launch mkusb from the Dash or menu.

Launch mkusb from dash on Ubuntu
Launch mkusb from dash on Ubuntu

It will prompt you whether you want to run mkusb dus version. Dus is short for Do USB stuff. Click Yes to continue.

Run mkusb version dus
Run mkusb version dus

Mkusb requires sudo permissions in order to write the ISO to the target device. Enter your sudo password and click OK.

Enter sudo password to run mkusb
Enter sudo password to run mkusb

As stated already, Mkusb will use the whole target device and the target device will be completely overwritten. Click OK to continue.

mkusb will overwrite target usb device
Click Ok to to overwrite target usb device

In the next screen, you will the list of tasks the mkusb can do. Here is the main tasks that mkusb will do for you.

  1. Install (make a boot device),
  2. Restore to a standard storage device,
  3. Wipe a device,
  4. Backup persistent live home,
  5. Restore persistent live home

Choose the first option (i.e. Install (make a boot device)) to create persistent storage live USB device.

make boot device using mkusb
make boot device using mkusb

In the next screen, choose "Persistent live - only Debian and Ubuntu" option. Make sure you have inserted the USB drive.

Choose Persistent live - only Debian and Ubuntu option
Choose Persistent live - only Debian and Ubuntu option

Next choose the ISO that you want to write to the usb drive.

choose iso file to write to usb
choose iso file to write to usb

After choosing the ISO file, you will be presented with the following screen. If you have only one target device, Mkusb will automatically choose it for you. If you inserted multiple drives, choose the one from the list.

Double check the target device and click OK to continue. All data in the selected drive will be lost!

choose target device
choose target usb device

In the next screen, choose "upefi usb-pack-efi (default grub from ISO file)" option. This option will support UEFI bios with secure boot. If you don't know what option to choose, just click "use default" option.

Select upefi
Select upefi

Next, select the percentage of the available space for persistence. The default value is 50%. The rest of the space will be used for storage.

Again, if you don't know what to choose, just leave the default value and click OK to continue.

Select space for persistence
Select space for persistence

Finally, double check if everything is correct (the target device, ISO file etc.) and choose "Go  Yes, I want to go ahead" option from the list and click Go again to start creating persistent storage live USB.

Preparing live persistent usb system
Preparing live persistent usb system

Now, mkusb will start preparing the USb device to create persistent live usb drive. It will partition the USB device and copy all the files from ISO to the usb device. It will take a few minutes.

persistence live usb creation with mkusb in progress
persistence live usb creation with mkusb in progress

Once the live usb creation is completed successfully, you will be greeted with the following message.

Creating Persistent Live USB using mkusb is completed
Creating Persistent Live USB using mkusb is completed

Congratulations! We've just created a persistent storage live USB drive!! Click OK to close this message. And click Quit to close mkusb utility.

You can verify if the USB has been partitioned and ISO files have been copied to USB drive from the file manager.

check partitions in persistent usb drive
check partitions in persistent usb drive

Now, restart your system and boot it with the newly created USB system and start using the persistent live USB system.

Please note that if you have latest UEFI BIOS with secure boot, you may not able to boot the persistent USB. In that case, turn off secure boot from BIOS and try.

And also, when you boot from persistent USB, you will not see the Grub menu of the existing host OS. Because, the persistent live USB has its own GRUB now. You will see separate "Persistent live" and "live" options in the grub menu entries.

mkusb grub menu
mkusb grub menu

As stated already, you can use this USB device like a portable system. You can do whatever you want to do in the persistent USB live system.

Install new applications, download files, create folders and customize the look of the live OS. All changes made in the live OS will remain intact.

To boot back into the host OS, simply remove the USb drive and reboot the system.

Result?

It worked! I created some files and folders, connected to Internet, and installed Vlc player on my Ubuntu 18.04 live system. Then I rebooted the live system to see if the changes are persistence.

Yes, everything was there!! I have all the data and the changes made in the live system again.

Ubuntu 18.04 persistence live usb
Ubuntu 18.04 persistence live usb

Conclusion

Mkusb has made the creation of persistent live usb task much simpler and easier! It will be quite useful for those who wants to have a portable Ubuntu Linux in a thumb drive.

Give it a try, you won't be disappointed.

Resource:

You May Also Like

13 comments

Ed B. October 10, 2019 - 9:01 pm

Does it still detect the hardware when it boots? If so I am in, you can plug it in to any computer then…

Reply
sk October 10, 2019 - 9:03 pm

I tested it on Dell and Acer laptops. It worked.

Reply
kolja February 8, 2022 - 4:41 am

as it is the Ubuntu live Version it still runs on any comuter, that will run the normal Ubuntu live.

Reply
patrick October 12, 2019 - 11:14 am

Inseed a handy tool. The only downside is that it does not encrypt the drive ore the home partition, which is a must for carry on drives.

Reply
David Kra October 14, 2019 - 11:02 pm

How is this better than doing a “normal” installation onto a “disk” which happens to be a USB stick or an SD card?

With that method, the result is not a “live”installation with separate “persistence” and “storage” areas. Instead it is a regular installation that happens to have grub on the stick and be bootable. I think it would allow for encryption, userid’s, passwords, etc.

Yes it takes longer, because first you make a typical live try-and-install-from on stick#1, then you boot that, and do a normal install onto stick#2.

I don’t intend to hijack your excellent article, but below is a slight editing of what I posted elsewhere a year ago. The following guide explains how to do a normal installation onto a USB stick or SDCard:

https://www.quora.com/What-if-I-install-Linux-on-my-USB-drive/answer/David-Kra

Can you compare and contrast with the article’s “persistence” method?

Reply
sk October 15, 2019 - 12:00 pm

Hi David,

Your method may work and it is suitable for advanced users. However, Creating persistence usb with mkusb is much easier, simpler, and faster than your method. You don’t don’t need to manually create partitions. Mkusb wil do it for you. Also, you don’t need to use two USB sticks. Mkusb is GUI, so even an intermediate user can create a live usb in couple minutes.

Reply
Suvhm October 16, 2019 - 6:30 pm

Actually when I tried to boot the device using usb persistent it shows an error that –
I need to load kernel first.
Enter any key to continue…
Any idea why I am getting this error.
I appreciate your support here!

Reply
sk October 17, 2019 - 10:42 am

Please post the full error message. Mkusb can create Ubuntu or Debian live USB only. If you tried any other OS like Linux mint, it may not work. Double check you’ve followed all the steps as described in the guide. Also try from any other branded USB drives.

Reply
pxrxtx November 6, 2019 - 1:25 am

I already have Ubuntu 18.04.3 LTS on a USB and am booted in live mode but I want persistence to save changes. I tried this method and after entering “sudo apt install –install-recommends mkusb mkusb-nox usb-pack-efi” (without the quotes obviously), I get an error message that looks like this:

Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
mkusb : Depends: xterm but it is not installable
Depends: wmctrl but it is not installable
Depends: guidus but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

If anybody could help that would be great.

Reply
sk November 6, 2019 - 12:22 pm

Please enable Universe repository and try again.

sudo add-apt-repository universe
sudo apt update

Reply
borislav December 1, 2019 - 8:21 am

It looks like it is not possible to update the kernel once you are in because trying to fix update-initramfs do not help as long as /etc/fstab file do not point to a real hadrdrive id . So the only solution to have latest kernel is for a source it has to be the a cd image with updated kernel.. In this case, is it possible to save home folder somehow, and restore it into the new persistend live usb?

Reply
ajs December 24, 2019 - 10:25 pm

Hi, many thanks for this. Can encryption be enabled and if yes can you explain(/refer) how to..?

Reply
Jan Altus April 18, 2020 - 2:03 am

Just like Suvhm I got the same response:-
when I tried to boot the device using usb persistent it shows an error that
I need to load kernel first.
Enter any key to continue…

Some Forums suggest I need to add “grub” or “rw” but with no explanation of how this is achieved.

I’ve tried using six different methods of making a persistent USB drive (with three different thumb drives) and none of the methods have worked, to date.

I have no difficulty making non-persistent drives. I’m beginning to understand another reason they may be called “persistent”! 😉

Reply

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More