Score:6

Making Ubuntu USB pendrive with persistent memory from live USB

br flag

I'm trying to turn live USB into live USB with persistent memory. I'm following this procedure. The procedure says to "Add a Space and persistent after quiet splash --- in the following files" and specifies three files:

/isolinux/txt.cfg

/syslinux.cfg

/boot/grub/grub.cfg

The problem is that I cannot find those files.

Any suggestion what to do?

Additional information:

Operating system: Ubuntu 18.04.2 LTS

Note:

Different setup - live-persistent; missing files?? This is live-persistent setup on different USB pendrive and that works just fine. But neither of the files are there.

Different setup - live-persistent; missing files??

Nmath avatar
ng flag
I'd check again to make sure that you've accurately and completely completed the prerequisite steps in the answer you linked.
lnee avatar
td flag
look at ventoy persistence https://www.ventoy.net/en/plugin_persistence.html
NovHak avatar
cn flag
But it IS persistent by default now, isn’t it ? I remember having discovered a few years ago that upon boot, it checks for free unpartitioned space on the boot device and if there’s some, it automatically creates a new partition for persistent memory. I was outraged, since I consider a live system should **never** have a write behaviour by default, and reported a bug on launchpad, but the developer at the time “really wanted” to do that, and clearly intended to disregard my arguments no matter what. So while I’m outraged, you at least should be happy :)
guiverc avatar
cn flag
You've provided no OS/release details, as releases since 20.10 have varied slightly compared to prior releases so are you following instructions that match your OS/release? Persistence is automatically dealt with using various tools (that get updated to deal with changes in Ubuntu ISOs, which from 20.10 have varied so all platforms are identical as Ubuntu is built for many architectures including *s390, armhf, arm64, ppc64el...* and not just *amd64*) so provide OS/release details. `mkusb` is TESTED for all releases & works if using an updated version that copes with the release being used.
C.S.Cameron avatar
cn flag
@BlueSkies: I will try to remember to update that post to also suit version 22.04. I believe Isolinux has not been used since 19.10. If you are using a later version of Ubuntu, edit /boot/grub/grub.cfg placing the word `persistent` one space after `file=/cdrom/preseed/ubuntu.seed` in the first menuentry. Let me know if this works for you.
BlueSkies avatar
br flag
@guiverc: It's Ubuntu 18.04.2 LTS.
BlueSkies avatar
br flag
@C.S.Cameron: The three files should be there regardless of persistency? I have an USB pendrive with live-persistent setup (OS 18.04.4) and not even one file is there.
sudodus avatar
jp flag
It is often easier and faster to create a fresh persistent live system instead of converting a live (live-only) system to a persistent live system. You can use tools that do it directly instead of tampering with the fine details manually. Use [Rufus](https://rufus.ie) in Windows and [mkusb](https://help.ubuntu.com/community/mkusb) in Ubuntu (or Debian and similar Linux distros).
sudodus avatar
jp flag
@BlueSkies, 1. Please specify [again] which 3 files you are missing (those in the beginning of your question or some other files); 2. Is this a persistent live system of Ubuntu 18.04.4? 3. Which system is running, when you search for the files (the system itself or another system, for example an installed Ubuntu system or another live or persistent live system?
BlueSkies avatar
br flag
@sudodus: The missing files are: (1) /isolinux/txt.cfg (2) /syslinux.cfg (3) /boot/grub/grub.cfg -- Yes, those files are the ones mentioned in the beginning of my question. And yes, the system that is running is Ubuntu 18.04.4 (live-persistent). -- And the same problem (missing files) happens when Ubuntu 18.04.2 LTS is running - doesn't matter which way (live-only, live-persistent, etc).
sudodus avatar
jp flag
Thanks for those details, @BlueSkies, Which tool/method did you use to create the live system(s)? The file `isolinux/isolinux.cfg` is in the iso file, and `boot/grub/grub.cfg` is in the iso file too. So they should appear in the live system when running a **cloned** live system or a system extracted to a FAT32 file system by Rufus. Search for the files with `find`.
sudodus avatar
jp flag
Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/140583/discussion-between-sudodus-and-blueskies).
C.S.Cameron avatar
cn flag
@BlueSkies Answer has been edited to show location of files. Note that syslinux.cfg is the file name used by UNetbootin for booting and is not shown below. Most other installer programs now use grub.cfg for booting.
Score:3
cn flag

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 toram after quiet splash ---, and press Enter.

  • Create a casper-rw file:

    sudo dd if=/dev/zero of=casper-rw bs=1M count=512

    sudo 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 persistent after quiet splash --- in the following files, (pre-22.04):

    /isolinux/txt.cfg, (for BIOS boot persistence Rufus);

    /syslinux.cfg, (for BIOS boot persistence UNetbootin);

    /boot/grub/grub.cfg, (for UEFI boot persistence).

enter image description here File location 20.04 and prior.

  • In Ubuntu 22.04 and later add the word persistent one space after file=/cdrom/preseed/ubuntu.seed in grub.cfg.

enter image description here File location 22.04 and later.

  • 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, Gnome-Disks and Etcher create ISO9660 based USB and are difficult to make persistent.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.