Is there a way to determine what changes were made that occurred in Puppy Linux and saved to a save folder or file?
Thanks
How to determine changes made to saved file or folder?
Moderator: Forum moderators
-
- Posts: 2509
- Joined: Fri Jul 31, 2020 3:37 am
- Has thanked: 1806 times
- Been thanked: 710 times
Re: Determine Changes Made to Saved File or Folder
Unless there's a log file I am unaware of, my thought is that you could make a backup save folder, then make changes, and reboot without loading a save and run a file compare on the working save and the backup. This would not work on a save file as opposed to folder, as the squashed savefilesystems would need to be unsquashed.
Of course if you mean all cumulative changes from the read-only base system, then anything contained in a save folder would be a change. You would need to navigate to where the save folder is located and examine it from there. But I wouldn't make any changes to it while running from it.
I could be wrong about some of these things so hopefully others will jump in and correct me.
geo_c
Old School Hipster, and Such
Re: Determine Changes Made to Saved File or Folder
I did think doing folder comparison would be a way.
But maybe I don't have the save folder understood correctly. Could you correct me for any wrong thinking I have?
1.
you could make a backup save folder
2.
then make changes
Wouldn't you need to save for the reboot? Which could be automatic unless it was set to request save.
3.
and reboot without loading a save
Wouldn't the rebooting automatically load the last save?
I just want to make sure I understand since this is important.
Thanks for the suggestion and helping me understand this as well.
-
- Posts: 2509
- Joined: Fri Jul 31, 2020 3:37 am
- Has thanked: 1806 times
- Been thanked: 710 times
Re: Determine Changes Made to Saved File or Folder
JusGellin wrote: ↑Thu Apr 18, 2024 6:17 pmI did think doing folder comparison would be a way.
But maybe I don't have the save folder understood correctly. Could you correct me for any wrong thinking I have?
1.you could make a backup save folder
2.
then make changes
Wouldn't you need to save for the reboot? Which could be automatic unless it was set to request save.
3.and reboot without loading a save
Wouldn't the rebooting automatically load the last save?
I just want to make sure I understand since this is important.
Thanks for the suggestion and helping me understand this as well.
1. What I mean is while running in your save, make a backup using pupsave-backup found in the Utilities menu of fossapup (But I don't think you mentioned which pup you're using) The result would be that you have a save you are currently running from and backup of that save.
2. After making the backup, and making changes which would then not be in the backup, immediately reboot and choose the 0-boot-into-ram option not loading a save. You should get that option after making a backup in the same location as the working save.
3. Now that you've booted into ram with no save loaded, then you can navigate to where the save folder and backup save are and compare them. If you don't get an option during the boot process, then either the save folder and backup save folder are not located in the same directory, or you're using a pup without that capability.
Again, others should jump in and correct me if I've got something wrong here.
geo_c
Old School Hipster, and Such
- rockedge
- Site Admin
- Posts: 5748
- Joined: Mon Dec 02, 2019 1:38 am
- Location: Connecticut,U.S.A.
- Has thanked: 2026 times
- Been thanked: 2113 times
- Contact:
Re: How to determine changes made to saved file or folder?
One could write a script/program that looks at the current /initrd/pup_rw
for pupmode 12 or /initrd/pup_ro1
for pupmode 13 and compare using a file difference detector against an earlier snapshot of the state of either one of those directories.
There are whiteout files that determine what was deleted that might be a source that could used also measured against a snapshot of the original boot state.
Maybe start the system in RAM and compare the loaded RAM against the save folder.
Re: How to determine changes made to saved file or folder?
Thanks @geo_c
That really helped me fully understand what you mean. I didn't fully appreciate/understand about the Pupsave Backup using Bookworm Pup64
and how and why use it. I followed exactly what you mentioned for how to do this. Now I realize this better and how that would be a good way to compare the two saved folders. I'm slowly learning better how to do things.
@rockedge
One could write a script/program that looks at the current /initrd/pup_rw for pupmode 12 or /initrd/pup_ro1 for pupmode 13 and compare using a file difference detector against an earlier snapshot of the state of either one of those directories
I understand that pupmode 12 is the default boot using pmedia=atahd for that mode and pupmode 13 is when the boot up is using pmedia=usbflash and displays a button to manually save.
So does that mean if using pupmode 12 that the resulting file used is /initrd/pup_rw? and that if using pupmode 13 the resulting file used instead is /initrd/pup_ro1? I've seen another file that is /initrd/pup_ro2, what is that one related to?
So comparing a snapshot backup with one of these files according to pupmode will better show the difference for what is currently running?
Thanks for this information.
Re: How to determine changes made to saved file or folder?
JusGellin wrote: ↑Fri Apr 19, 2024 1:55 amThanks @geo_c
That really helped me fully understand what you mean. I didn't fully appreciate/understand about thePupsave Backup using Bookworm Pup64
and how and why use it. I followed exactly what you mentioned for how to do this. Now I realize this better and how that would be a good way to compare the two saved folders. I'm slowly learning better how to do things.@rockedge
One could write a script/program that looks at the current /initrd/pup_rw for pupmode 12 or /initrd/pup_ro1 for pupmode 13 and compare using a file difference detector against an earlier snapshot of the state of either one of those directories
I understand that pupmode 12 is the default boot using pmedia=atahd for that mode and pupmode 13 is when the boot up is using pmedia=usbflash and displays a button to manually save.
So does that mean if using pupmode 12 that the resulting file used is /initrd/pup_rw? and that if using pupmode 13 the resulting file used instead is /initrd/pup_ro1? I've seen another file that is /initrd/pup_ro2, what is that one related to?
So comparing a snapshot backup with one of these files according to pupmode will better show the difference for what is currently running?
Thanks for this information.
In pupmode 12, the changes are constantly updated and saved automatically. In this mode there is only /initrd/pup_rw for the saving. In pupmode 13 the changes are either made in specifically chosen time intervals or when the user chooses to do so. In this mode there are /initrd/pup_ro1 which is the existing save file/folder and /initrd/pup_rw for changes. When ever the user choose to save the changes, the changes are stored (carried over) in /initrd/pup_ro1. /initrd/pup_ro2 is the mounting point of the base sfs.
Re: How to determine changes made to saved file or folder?
@amethyst
Thanks for the great concise answer. I think I'm getting it. There sure is some thought that went into this! What a smart puppy this is.
-
- Posts: 2509
- Joined: Fri Jul 31, 2020 3:37 am
- Has thanked: 1806 times
- Been thanked: 710 times
Re: How to determine changes made to saved file or folder?
amethyst wrote: ↑Fri Apr 19, 2024 6:17 amIn pupmode 12, the changes are constantly updated and saved automatically. In this mode there is only /initrd/pup_rw for the saving. In pupmode 13 the changes are either made in specifically chosen time intervals or when the user chooses to do so. In this mode there are /initrd/pup_ro1 which is the existing save file/folder and /initrd/pup_rw for changes. When ever the user choose to save the changes, the changes are stored (carried over) in /initrd/pup_ro1. /initrd/pup_ro2 is the mounting point of the base sfs.
This information I did not know. That's a valuable thing to understand.
I've always been a little scared to poke around in that area of the file system, because my guess is altering something while running could inadvertently break things.
geo_c
Old School Hipster, and Such
Re: How to determine changes made to saved file or folder?
geo_c wrote: ↑Fri Apr 19, 2024 12:47 pmamethyst wrote: ↑Fri Apr 19, 2024 6:17 amIn pupmode 12, the changes are constantly updated and saved automatically. In this mode there is only /initrd/pup_rw for the saving. In pupmode 13 the changes are either made in specifically chosen time intervals or when the user chooses to do so. In this mode there are /initrd/pup_ro1 which is the existing save file/folder and /initrd/pup_rw for changes. When ever the user choose to save the changes, the changes are stored (carried over) in /initrd/pup_ro1. /initrd/pup_ro2 is the mounting point of the base sfs.
This information I did not know. That's a valuable thing to understand.
I've always been a little scared to poke around in that area of the file system, because my guess is altering something while running could inadvertently break things.
Well you can actually make changes in /initrd/pup_ro1 and /initrd/pup_rw because it's read/write but the sfs's are read-only. It's useful to see the contents of these system files and you can also copy files from it to another location which is useful.