Or load one after booting if you started without?
Can you load a different pupsave after booting?
Moderator: Forum moderators
Re: Can you load a different pupsave after booting?
Yes, You remove the top layer, append the save layer as the top layer, then re-add the previous top layer ( I.e. Ram) and finally revaluate all layers. You will also likely want to edit your PUPSTATE file.
I don't think that anyone wrote code to do this yet though.
- JASpup
- Posts: 1653
- Joined: Sun Oct 04, 2020 10:52 am
- Location: U.S.A.
- Has thanked: 70 times
- Been thanked: 89 times
Re: Can you load a different pupsave after booting?
s243a wrote: ↑Fri Nov 27, 2020 2:11 pmYes, You remove the top layer, append the save layer as the top layer, then re-add the previous top layer ( I.e. Ram) and finally revaluate all layers. You will also likely want to edit your PUPSTATE file.
I don't think that anyone wrote code to do this yet though.
Ok, yes for possible. More detailed instructions out there?
On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.
Re: Can you load a different pupsave after booting?
JASpup wrote: ↑Fri Nov 27, 2020 2:37 pms243a wrote: ↑Fri Nov 27, 2020 2:11 pmYes, You remove the top layer, append the save layer as the top layer, then re-add the previous top layer ( I.e. Ram) and finally revaluate all layers. You will also likely want to edit your PUPSTATE file.
I don't think that anyone wrote code to do this yet though.
Ok, yes for possible. More detailed instructions out there?
It looks like if you have at least Linux Kernal 2.5.1 (see mount manpage) you can do something like the following:
Code: Select all
# mount the temp file system and move real root out of the way
mount -t tmpfs aufs-tmpfs /rw
mount --move ${rootmnt} /ro
if [ $? -ne 0 ]; then
echo root-aufs error: ${rootmnt} failed to move to /ro
exit 0
fi
https://help.ubuntu.com/community/aufsR ... OnUsbFlash
https://serverfault.com/questions/69379 ... ctory-tree
http://www.murga-linux.com/puppy/viewto ... f796e676b6
So for instance, if you built a sandbox using my psandbox script "${rootmnt}", then in theory you could use the sandbox constructed as the new rootfs.
I want to look into this method and other ways of doing it. Note that if you move a new root over the existing root it will hide the existing root (see post). You could probably still view the existing root if you do a bind mount to somewhere in the new root.
P.S. the psandbox.sh script is based on sandbox.sh. I provided some details on how this works (in another thread). It is probably more technical/detailed then most people want to read.
- JASpup
- Posts: 1653
- Joined: Sun Oct 04, 2020 10:52 am
- Location: U.S.A.
- Has thanked: 70 times
- Been thanked: 89 times
Re: Can you load a different pupsave after booting?
I'll reference this, but bear in mind I'm a beginner. When something's too technical I'm inclined to look for another way, but willing to tackle if it's the only way.
If it's not normal to load new pupsaves, I should probably reboot.
On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.
Re: Can you load a different pupsave after booting?
I'll try to build some tools to make it easier but sometimes people want to know how the tools are built.
Let's forget the question about whether or not it's a normal thing to do. If it happens to work well then perhaps it will become more normal but first someone needs to try it, presuming that it hasn't been tried already.
Rebooting takes longer and sometimes One can't find the save file that they wants to use. So if we can do this without too many issues then perhaps there will be a use case.
- JASpup
- Posts: 1653
- Joined: Sun Oct 04, 2020 10:52 am
- Location: U.S.A.
- Has thanked: 70 times
- Been thanked: 89 times
Re: Can you load a different pupsave after booting?
s243a wrote: ↑Sat Nov 28, 2020 7:30 amI'll try to build some tools to make it easier but sometimes people want to know how the tools are built.
Let's forget the question about whether or not it's a normal thing to do. If it happens to work well then perhaps it will become more normal but first someone needs to try it, presuming that it hasn't been tried already.
Rebooting takes longer and sometimes One can't find the save file that they wants to use. So if we can do this without too many issues then perhaps there will be a use case.
I think that's a positive way to look at it, but I also believe you have to be intrepid to be the first or only one doing something if it's not your forte. My choice of useful knowledge without committing to a technical orientation is conscious, though I'm still marveling at this creation that I've newly dug into, not just for its integrity, but the flexible possibilities. It's always a cagey line.
On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.
Re: Can you load a different pupsave after booting?
JASpup wrote: ↑Sat Nov 28, 2020 10:44 ams243a wrote: ↑Sat Nov 28, 2020 7:30 amI'll try to build some tools to make it easier but sometimes people want to know how the tools are built.
Let's forget the question about whether or not it's a normal thing to do. If it happens to work well then perhaps it will become more normal but first someone needs to try it, presuming that it hasn't been tried already.
Rebooting takes longer and sometimes One can't find the save file that they wants to use. So if we can do this without too many issues then perhaps there will be a use case.
I think that's a positive way to look at it, but I also believe you have to be intrepid to be the first or only one doing something if it's not your forte.
I've started working on some tools and I understand the intrepid aspects which my be present if one is using an environment not suitable for testing. Fortunately, there is an existing tool that you can use which should meet your needs:
rootfs-skeleton/usr/bin/sandbox-rw.sh
This tool should be up to date in the newest puppies. In older puppies you can add and/or update this script by copying the github code onto your system and making it executable. Assuming that works as should, try the following.
1. Exit the window manager cntrl-alt-backspace
2. Run sandbox-rw.sh
3. Use the spacebar to unselect any layers you don't want (e.g. existing save layer)
4. Type xwin to restart the desktop.
Note that in the terminal you will have a menu system that uses a program called dialog. In this program you press spacebar to select/change a menu item, tab to switch between sections, and enter to complete the selection. In the file chooser you can actually type the path that you want. If you want to see the files in the directory, add the trailing forward slash to the path.
Keep in mind that sandbox-rw.sh has some limitation which I discuss here:
sandbox-rw.sh modificaitons in progress
**Need a better name for this script though.
My choice of useful knowledge without committing to a technical orientation is conscious, though I'm still marveling at this creation that I've newly dug into, not just for its integrity, but the flexible possibilities. It's always a cagey line.
If you want to learn how these scripts work then I would start with the following post:
https://forum.puppylinux.com/viewtopic.php?f=136&t=1554]how the sandbox.sh script works
However, one doesn't need to know how a script works to use it.
- JASpup
- Posts: 1653
- Joined: Sun Oct 04, 2020 10:52 am
- Location: U.S.A.
- Has thanked: 70 times
- Been thanked: 89 times
Re: Can you load a different pupsave after booting?
That could be useful someday.
The script I'm most jazzed about is ROX-filer's "Unmount ALL mounted partitions" for use in any WM or even JWM sans partition icons.
On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.