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.