Persistence for Fedora ISO using Ventoy

I succeeded in getting a Fedora live/installer ISO to boot with persistence in Ventoy. But I’m still confused about many of the issues I kludged around along the way.

I am using the KDE spin of Fedora 44 if that makes a difference.

Secure boot:

Online info said none of this would work with secure boot. Don’t know if that is true. I’m not a fan of secure boot and didn’t try with that enabled. But I would like to understand that issue better.

selinux:

I’m not a fan of selinux anyway. In my experience, it is far more effective at stopping you from doing legitimate things than stopping you from doing stupid things that leave your system exposed. Online info states that Ventoy persistence for Fedora fails with selinux enabled. Having done that many time accidentally, I can report it hangs with a black screen when you fail to disable selinux.

/boot/grub2/grub.cfg:

To disable selinux (and for some other tweaks) I needed to replace that. The documented Ventoy command to replace that each time Ventoy loads the ISO, did nothing and I have no guess what I did wrong. So I used xorriso to patch the ISO file to change grub.cfg.

All online discussions I’ve seen of that change say there are two versions of that in different directories in the ISO and both need selinux=0 in the appropriate places. But I can’t find the other and apparently that hasn’t mattered yet. The other grub.cfg I know about in the ISO is used a bit earlier in the boot sequence and is a redirect to this one, not a different version of this one.

/etc/shadow: (What I would most like to understand)

Initially booting with persistence, the /etc/shadow file disabled all accounts, so I was logged in as liveuser, but no su nor sudo commands could work.

I looked inside the EROFS (which is still named as if it were a squashfs) inside the ISO and saw that shadow file does disable all accounts.

What fixes that when you don’t have persistence? If you boot the ISO without persistence that file is OK (doesn’t match the copy in the EROFS in the ISO). But if you boot with persistence it does match the original, so not OK. Why is the original not OK? What fixes that when booting without persistence? Why does it stay broken when booting with persistence?

Anyway, once that was understood, persistence can fix what was broken by having persistence: I just added a corrected copy of that file to the persistence image.

What I have done is to install from the live USB on to a USB disk.
This works for USB sticks and for USB SSD.

Then I have a ordinary Fedora setup to work with to repair and rescue my systems.
This allows me to dnf update, dnf install apps, etc, etc.

I have also (long ago) used the install ISO to install an ordinary (not “live”) Fedora onto a USB drive, then used that as portable Linux.

IIUC (correct me if I’m wrong) that can’t be used as a platform to install from. I have read (but not understood) why the Fedora installer can’t run from an ordinary boot and must run from something like an ISO. So I can have a customized boot or an installer but not both together.

Also, I used that on some older systems with very slow USB. That mode was far slower than using a live boot using squashfs. I haven’t used it enough to know, but I understand the point of erofs is to be even faster.

(I also read, didn’t understand, tried and failed the instructions for making my own completely customized ISO live/installer. That also would seriously miss some of the advantages of Ventoy persistence for a live ISO).

There are lots of ways to spin something similar. BUT Ventoy persistence with a live/installer ISO Fedora seems like something that should work and something I think I have kludged to work. So I’d like to understand why I needed to kludge things, what I might do better, and maybe what further issues there will be that I don’t know about yet from my very limited use.

I saw past threads in this forum and elsewhere, showing others have also wanted Ventoy persistence for a Fedora ISO. None of those threads contained any answer or solution to tell you how. I hope my first post here is enough to tell someone more than any of those threads did. I’m happy to provide more detail of what I did. But I didn’t want to distract from the topics I was hoping to get explained. I assume any Fedora expert who could explain any of that, would understand the basic description I gave without distracting extra detail.

That is correct. It would require additional work to be able to run an install.
But out of the box cannot install.

The installation is basically recursive rsync from the live system to the target system, and then configure the boot loader on the target system.