Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 24 Feb 2018, 14:31
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
Hot swapping of savefiles without reboot
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 2 [19 Posts]   Goto page: Previous 1, 2
Author Message
MochiMoppel


Joined: 26 Jan 2011
Posts: 1460
Location: Japan

PostPosted: Fri 19 Jan 2018, 21:26    Post subject:  

I could be wrong, but wasn't this thread in the Users forum until yesterday?

jamesbond wrote:
@s243a: indeed, sandbox.sh (especially rw-sandbox.sh) may be what snayak needs.
For the benefit of members not using Fatdog: Could you briefly explain what it does or post the script? It could well be what I have in mind.

Quote:
You don't even need to run using the RAM layer (aka pupmode=13) if your play your cards right. Once you take the savelayer out, you can replace it with anything (including, for example, an empty tmpfs layer - I'm posting from one of the experiments right now).
I still don't understand why to disconnect the save layer. If you take it out and replace it with an empty tmpfs layer wouldn't you end up with a pristine install without the copied initial ramdisc, which would in effect even be less than starting in PUPMODE 5? I would expect it to be unusable. And if the the objective is to test a new application, an empty test environment is not realistic and maybe not even feasible as the stuff on the save layer may be part of the environment that the application will depend on and on which it finally would have to exist. So the save layer IMO should stay untouched. What may be possible though, particularly when running PUPMODE 12, is to add a tmpfs layer (same functionality as pup_rw) in front of the save layer. Would this be the purpose of rw-sandbox.sh?
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 3144
Location: The Blue Marble

PostPosted: Fri 19 Jan 2018, 22:39    Post subject:  

MochiMoppel wrote:
jamesbond wrote:
@s243a: indeed, sandbox.sh (especially rw-sandbox.sh) may be what snayak needs.
For the benefit of members not using Fatdog: Could you briefly explain what it does or post the script? It could well be what I have in mind.

(rw-)sandbox.sh has been in Puppy since Dec 2015: https://github.com/puppylinux-woof-CE/woof-CE/tree/testing/woof-code/rootfs-packages/sandbox/usr/bin. Grab any recent Puppies and you'll find it inside. PS: If you test this on Puppy please don't run it in PUPMODE=5, see: http://murga-linux.com/puppy/viewtopic.php?p=975023#975023.

Quote:
I still don't understand why to disconnect the save layer.
I won't pretend to know the "why" part. All I said is that it can be done. But even then I said that it may not be practical.

Quote:
If you take it out and replace it with an empty tmpfs layer wouldn't you end up with a pristine install without the copied initial ramdisc, which would in effect even be less than starting in PUPMODE 5?
It is indeed become PUPMODE=5. But that's just an example. Instead of empty tmpfs you can add another existing save layer, and then it goes back to PUPMODE=12 (or 13 depending on your startup conditions).

Quote:
I would expect it to be unusable.
You will be surprised Smile In the case where we exchange the save layer with an empty tmpfs layer, it depends on how you can preserve the "state" information passed from initrd to the main OS. I think that's mainly PUPSTATE file, but I've been away from Puppies for years now, so I may be very wrong. I did my experiments on Fatdog, and Fatdog preserves its "initrd -> main OS" state in a read-only file independent of the save layer or the RAM layer - no extra effort needed on my part.

Quote:
And if the the objective is to test a new application, an empty test environment is not realistic and maybe not even feasible as the stuff on the save layer may be part of the environment that the application will depend on and on which it finally would have to exist. So the save layer IMO should stay untouched.
Indeed, from the perspective you're correct. But again, my "empty tmpfs" is just an example. Instead of that, one could instead add a different save layer (that has been prepared earlier); and that was the original question.

Quote:
What may be possible though, particularly when running PUPMODE 12, is to add a tmpfs layer (same functionality as pup_rw) in front of the save layer.
Yes, that's certainly possible too.

Quote:
Would this be the purpose of rw-sandbox.sh?
No. (rw-)sandbox.sh builds a new aufs root using (selectable) existing layers (including the save layer) and then chroot into it. The "sandbox.sh" uses tmpfs as its top r/w layer (similar to PUPMODE=5) and "rw-sandbox.sh" uses a savefile as its top r/w layer (similar to PUPMODE=12).
_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread.
Back to top
View user's profile Send private message 
snayak

Joined: 14 Sep 2011
Posts: 393

PostPosted: Thu 25 Jan 2018, 07:44    Post subject:  

I see a lot of posts... Many solutions... Many good points...
Thanks a lot for your valuable time and answers.
Let me follow each post and try proposed solutions.
I will be back to discussion after this home work. Smile

_________________
[Precise 571 on AMD Athlon XP 2000+ with 512MB RAM]
[Fatdog 611 on Intel Pentium B960 with 4GB RAM]

Home: http://www.mathmeth.com/sn/
Blog: http://srinivas-nayak.blogspot.com/
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 2088
Location: In The Way

PostPosted: Thu 25 Jan 2018, 08:38    Post subject:  

I attempted this a couple years ago. I hated that the savefile would run out of space during a session! So I made a new larger savefile mounted it and rsynced present savefile, then tried to swap them, but I knew nothing of all the bindings involved.

Reasons why swapping savefiles is desirable at times.
1) Resize in session
2) Use new bigger/different savefile
3) Changing to a previous saved rw work environment
4) Why not?
Back to top
View user's profile Send private message MSN Messenger 
Display posts from previous:   Sort by:   
Page 2 of 2 [19 Posts]   Goto page: Previous 1, 2
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1623s ][ Queries: 15 (0.0354s) ][ GZIP on ]