Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/opt is being deleted in overlayfs build after extra sfs install #4169

Closed
peabee opened this issue Oct 21, 2023 · 7 comments
Closed

/opt is being deleted in overlayfs build after extra sfs install #4169

peabee opened this issue Oct 21, 2023 · 7 comments

Comments

@peabee
Copy link
Contributor

peabee commented Oct 21, 2023

@dimkr ?
BookwormPup32 with a savefolder and an extra sfs with /opt in it loaded - after reboot there is no longer a /opt directory.....
Screenshot

The savefolder upper directory shows /opt has been replaced by "something else":
Screenshot2

@peabee
Copy link
Contributor Author

peabee commented Oct 21, 2023

Further info: BookwormPup64 with a different sfs (but containing /opt) seems to work correctly.

Will make a small test sfs that can be installed on both systems.........

@dimkr
Copy link
Contributor

dimkr commented Oct 21, 2023

The "file" in the save is a whiteout. When you unload a SFS, sfs_load.overlay deletes empty leftover directories, and /opt is deleted because it's 1. present in the SFS and 2. empty.

If you load another SFS that contains /opt, install a package that contains /opt or simply create /opt (through a file manager or mkdir /opt, doesn't matter), you will see /opt again.

@peabee
Copy link
Contributor Author

peabee commented Oct 21, 2023

The extra sfs is loaded by putting it into the frugal install directory and clicking on it.
The extra sfs is never unloaded.
A possible difference between BW64 and BW32 is that BW64 has items in /opt in the puppy.sfs whereas in BW32 /opt is empty....??

@peabee
Copy link
Contributor Author

peabee commented Oct 21, 2023

Confirmed that putting some dummy content into /opt in the main system sfs for BW32 stops /opt being erased after an extra sfs with /opt content is loaded and queued and rebooted.

@dimkr
Copy link
Contributor

dimkr commented Oct 22, 2023

A possible difference between BW64 and BW32 is that BW64 has items in /opt in the puppy.sfs whereas in BW32 /opt is empty....??

Yes, sfs_load.overlay removes every directory present if the SFS during unloading, if it's empty. If /opt was empty before the SFS was loaded and the SFS contains /opt, /opt will be deleted when you unload the SFS.

dimkr added a commit to dimkr/woof-CE that referenced this issue Oct 22, 2023
@peabee
Copy link
Contributor Author

peabee commented Oct 22, 2023

Bit confused about mention of SFS unloading as the activity was not unloading - it was loading and queuing an sfs with /opt contents for use after a reboot - which couldn't happen because /opt was "deleted".
Does "unloading" somehow occur as part of queuing and rebooting??
Will try the proposed fix.

@peabee peabee closed this as completed in 879b76b Oct 22, 2023
@dimkr
Copy link
Contributor

dimkr commented Oct 22, 2023

The leftover directory cleanup procedure happens only if:

  1. You unload a SFS, or
  2. You use PUPMODE 12 and reboot while a SFS loaded by sfs_load is still loaded, or
  3. You use PUPMODE 12 and power is lost (or disk corruption, or something else) while a SFS loaded by sfs_load is loaded, then boot Puppy again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants