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.
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
$ 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
Create Persistent Live USB On Ubuntu Using Mkusb
Now, plug-in a USB drive and launch mkusb from the Dash or menu.
It will prompt you whether you want to run mkusb dus version. Dus is short for Do USB stuff. Click Yes to continue.
Mkusb requires sudo permissions in order to write the ISO to the target device. Enter your sudo password and click OK.
As stated already, Mkusb will use the whole target device and the target device will be completely overwritten. Click OK to continue.
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.
- Install (make a boot device),
- Restore to a standard storage device,
- Wipe a device,
- Backup persistent live home,
- Restore persistent live home
Choose the first option (i.e. Install (make a boot device)) to create persistent storage live USB device.
In the next screen, choose "Persistent live - only Debian and Ubuntu" option. Make sure you have inserted the USB drive.
Next choose the ISO that you want to write to the usb drive.
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!
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.
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.
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.
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.
Once the live usb creation is completed successfully, you will be greeted with the following message.
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.
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.
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.
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.
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.
Does it still detect the hardware when it boots? If so I am in, you can plug it in to any computer then…
I tested it on Dell and Acer laptops. It worked.
as it is the Ubuntu live Version it still runs on any comuter, that will run the normal Ubuntu live.
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.
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:
Can you compare and contrast with the article’s “persistence” method?
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.
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!
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.
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.
Please enable Universe repository and try again.
sudo add-apt-repository universe
sudo apt update
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?
Hi, many thanks for this. Can encryption be enabled and if yes can you explain(/refer) how to..?
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”! 😉