Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Read-only Persistence?
Please read the whole post because I approach this from several angles:

I'm trying to figure out how to do something and I have a few related questions.  I want to be able to make a live Linux that will persist, but then I can set it to use the persistence file as read-only, so that it will still keep all the changes that I've made to that point, but not make any new ones, so I can save on wear and tear for my USB stick, and lock in the settings that I want.

First of all, when exactly does Ventoy update its persistence file - during shutdown or at any arbitrary time?  So if I yank the USB drive before shutting down then will that prevent it from writing?

But more importantly, how can I make the file read-only, so that once I have it all set up the way that I want it, I can prevent further changes, and also save on wear and tear for my USB stick?  Is there some line I can put into the .json file to just prevent it from writing anything to the drive?

I've tried disabling persistence in the .json file but that seems to ignore the file completely, thus reverting everything to defaults, but I need to be able to read and use the customizations that I've made.  And I've also tried making the persistence file itself read-only (I disabled all write capabilities for all users), but it still somehow keeps updating, without even changing the date modified information!

Alternatively, is there a way that I can take all of the data in the persistence file and just put that into the ISO itself, to update it and build a new ISO or modify the existing one, so that I can just boot from that and turn off persistence?

And if none of this stuff is possible then PLEASE consider making an update for a new .json parameter to make persistence read-only!  It should be very easy to implement - just use whatever function is for writing to the drive and make it conditional.  I even tried looking into the source code myself but there are so many files and folders that I can't figure out how to fix it, much less how to even compile it so that I can redeploy it onto a USB stick (I'm new to Linux, btw).
Persistence is a feature supported by the specified linux distros (ubuntu/debian/MX......).
The change is not saved by Ventoy. Ventoy just map the persistence data file as a partition after boot and that's all.
It's the specified distro to decide how to use the persistece parition, how and when to save changes back and ...

As I known, what you think is NOT supported by any linux distro. The persistence can NOT be read-only.
Oh, well that's bad news.  In that case, is there anything that writes only when I shut down, so that I can unplug the stick before that and be sure that it won't write?  Otherwise I'd have to customize my ISO, and I'm having trouble with figuring out how to do that.

EDIT: Or actually, it would also be fine if I could make the persistence file or even the whole drive/partition read-only, so that it would be unable to write, except the way that I tried that didn't work for some reason, but is there a different way?
Well that's interesting, but how is it relevant?
As I known, there is no such linux distro that support read-only persistence.
If you make the persistence file or partition read-only there will be error during boot.
Idea You could just backup the persistence file when it has your desired settings in place, then just restore it after further use, thus discarding any posterior changes.
Idea When a post helps you in any way, please rate it. Thank you. [Image: rateit.png]
(11-17-2020, 12:31 PM)Midas Wrote: Idea You could just backup the persistence file when it has your desired settings in place, then just restore it after further use, thus discarding any posterior changes.

That's not going to work, because it needs to not write in the first place, to save on wear and tear on the drive, and I don't know of a secure way to back it up in this case, so I'm now trying to edit the ISO file to make it run in a live mode which is augmented from the original, but without persistence.

Forum Jump:

Users browsing this thread: 1 Guest(s)