I know there are other posts about how to create a live ubuntu usb with persistent memory - HOWEVER, there is no [question / answer] on how to convert a live (ubuntu) usb to one with persistent memory / storage. Is this possible?
3 Answers
Changing Live Pendrive to Persistent Pendrive
This works both with BIOS and UEFI.
Many people prefer a Persistent Pendrive that will save changes;
Create a Live Pendrive using Rufus or similar;
Boot the pendrive toram to make the drive editable:
Press Shift when booting; press Esc from Language; press F6; press Esc;
Type a Space and
toramafterquiet splash ---, and press Enter.Create a casper-rw file:
sudo dd if=/dev/zero of=casper-rw bs=1M count=512sudo mkfs.ext3 -L casper-rw -F casper-rw
(where count=512 is the persistence size in megabytes, with a max of 4GB).
Move the new casper-rw file from home to the root of the Live Pendrive;
Add a Space and
persistentafterquiet splash ---in the following files, (pre-20.04):/isolinux/txt.cfg, (for BIOS boot persistence Rufus);/syslinux.cfg, (for BIOS boot persistence UNetbootin);/boot/grub/grub.cfg, (for UEFI boot persistence).In Ubuntu 20.04 and later add the word persistent one space after file=/cdrom/preseed/ubuntu.seed in grub.cfg.
Shut down and reboot the persistent drive.
It's also possible to turn a Live USB into a Full-Install USB which has some advantages, except it won't install Ubuntu: Can Ubuntu be installed to the pendrive it was booted from?
Nowadays some Live Ubuntu apps will create Live Persistent USB's, Rufus, Ventoy, mkusb and Universal. Others like Startup Disk Creator, dd and Etcher create ISO9660 based USB and are difficult to make persistent.
- 20,530
- 12
- 78
- 125
Add a Persistent Partition to a UNetbootin Live USB, (Ubuntu 19.10+)
No additional USB drive required.
- Boot the USB drive "toram", At the UNetbootin boot menu press the Tab key. type a space then "toram" and hit enter.
Now the computer will boot toram (8GB RAM required for UNetbootin drive). You will be able to edit and overwrite the Live USB.
We will add a persistent partition and an optional NTFS partition for data storage.
Open GParted, select the USB drive and unmount it.
Shrink the FAT32 partition to a minimum.
Add a new ext4 partition for persistence.
Label the ext4 partition "casper-rw".
In the remaining space create a NTFS partition.
Apply all Operations.
Reboot in order to populate the casper-rw partition.
Make drive persistent
- Edit syslinux.cfg, adding a space and the word persistent to default boot, thus: "...quiet splash --- persistent".
- 20,530
- 12
- 78
- 125
If you have a live (live-only) Ubuntu USB drive, there should be nothing saved in it. An exception would be if Ubuntu was extracted from the iso file into a file system (for example: FAT32), and in that case you might have some files saved there, and they should be copied to some other drive or to a location in the internet cloud.
So, there is no system-specific 'custom' file in your live Ubuntu USB drive and therefore, no need to convert it. Instead, you can make a fresh installation of a persistent live system into your USB drive. You can also consider upgrading to a fast USB 3 pendrive (or even a USB SSD).
mkusb is a tool that can create a persistent live drive and use the whole drive. It creates several partitions, including a casper-rw partition with the ext4 file system for persistence. It can also create a usbdata partition with the NTFS file system for exchange of data with computers running Windows.
See the following links:
- 37
- 47,684