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 Tue 22 Jul 2014, 05:38
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
Setting save file to read only
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [11 Posts]  
Author Message
htnakirs

Joined: 27 Jun 2008
Posts: 9

PostPosted: Sat 28 Jun 2008, 23:25    Post subject:  Setting save file to read only  

I would like to prevent changes made during a session from being saved for the next session. Since the saving does not prompt the user, will setting the file to read only help? I assume this will produce an error, atleast, so is there a more polite way to bypass this step during shutdown?
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 10926
Location: Arizona USA

PostPosted: Sat 28 Jun 2008, 23:49    Post subject:  

It might help if you told us how you're using Puppy (i.e., full install, frugal install, live CD with a save file on hd, etc.)

I would be remiss if I didn't point out that if you ran Puppy from a multisession DVD the answer to your question would be obvious. Very Happy

_________________
Puppy Help 101 - an interactive tutorial for Lupu 5.25
Back to top
View user's profile Send private message 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Sun 29 Jun 2008, 01:52    Post subject:  

There's a thread going on now about something similar. The main idea is to load Puppy ENTIRELY into ram, and optionally save back to the harddrive on shutdown (Puppy currently only loads the original files into ram, not the changes the user makes). I posted some files in it that let you modify a 4.00 install to behave this way, though they're far from properly tested, and require that you either have a frugal install or are willing to modify the iso and burn a new cd. There has also been at least one other method posted in the thread besides mine.

I think a multisession install would let you do this, but you'd have to either have a cd burner on the machine you want to use, or go to the thread I mentioned above and try that alternate method, the one Hairy Will posted, which lets you use multisession on the harddrive.

Another method would be to do (or trick Puppy into thinking you did) an install on flash media, then disabling the daemon that auto-saves periodically along with putting a dialog into the save-on-reboot to make it optional. Then the existing files in pup_save.2fs would be read from the drive normally, but any new ones would be stored in ram until you save. If you don't save, they are discarded.

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send private message Visit poster's website 
Bruce B


Joined: 18 May 2005
Posts: 11080
Location: The Peoples Republic of California

PostPosted: Sun 29 Jun 2008, 04:41    Post subject: Re: Setting save file to read only  

htnakirs wrote:
I would like to prevent changes made during a session from being saved for the next session. Since the saving does not prompt the user, will setting the file to read only help? I assume this will produce an error, atleast, so is there a more polite way to bypass this step during shutdown?


I can't answer beyond the information in your query, which
is limited at best.

If the host file system is a Microsoft file system, I don't
think it supports the Linux attributes necessary to make
the pup_save file Linux read only.

Not knowing what type of file system you put your
pup_save file on, I certainly don't know if you could get to
first base with the idea of making it read only.

IF your pup_save file were on a Linux file system, you could
make it read only. AND IF the pup_save were on a hard disk,
it would not even boot IF read only.
Back to top
View user's profile Send private message 
htnakirs

Joined: 27 Jun 2008
Posts: 9

PostPosted: Sun 29 Jun 2008, 05:33    Post subject:  

I assumed installing to and booting from Flash drives was the most popular method of using Puppy. I apologise.

I' booting from a Flash drive, formatted using the Combo format option ( 128 MB FAT 16 drive with Puppy files and rest of the space as ext2 parition).

Pizza : What is this autosave daemon that you refer to and where can I disable it?
Back to top
View user's profile Send private message 
Bruce B


Joined: 18 May 2005
Posts: 11080
Location: The Peoples Republic of California

PostPosted: Sun 29 Jun 2008, 06:21    Post subject:  

htnakirs wrote:
I assumed installing to and booting from Flash drives was the most popular method of using Puppy. I apologise.


I don't think an apology is in order unless you did something
wrong and I don't think you did.

Flash sticks are common places to put a pup_save file, but
when these devices are used, the most common file system
is FAT - thus throwing a wrench in the works, because who
knows how to set a file Linux read only on a FAT file system?

Thus specificity is required on your part to accomplish
testing your idea.

1) the feasibility of setting pup_save read only

2) the test run, will it work?

---------------------------------------

Anyway, I wanted to see the results of your question in my
environment: A Linux files system which is requisite and the
test.

Results of the proof of concept: Puppy bites hard, punishes
you with bloody red messages and 60 second delays. Then
finishes you off growls followed by a full kennel panic!
Back to top
View user's profile Send private message 
new2puppyinSRQ

Joined: 09 May 2009
Posts: 7

PostPosted: Sun 17 May 2009, 12:40    Post subject:  How to prevent puppy to save any session changes
Subject description: How to make puppy boot from a fixed setup and not write to save files?
 

Hello everyone,
I been struggling to get any straight forward information on how to setup my puppy system to not write anything to the save files.

Here is the problem I am trying to solve:

My puppy system runs on a very small PC ebox that has flash IDE compact flash slot. Once the system is setup, there is no need for making and saving any changes to the flash drive.

The PC runs without a screen or keyboard and can be powered off any time. Hence, often it complains when rebooted that previous session was not properly saved.

I just want it to boot from a "read only" image, so it boot fresh every time even if the power was pulled without proper shutdown.

My application itself may need to save a running logfile every s often but I would rather choose the clean reboot every time over having to save a logfile if the system would have to be made completely read only.

Thanks so much for your help.
JY
Back to top
View user's profile Send private message 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Fri 22 May 2009, 12:58    Post subject:  

Just make a remaster that includes all the changes you need, and maybe disable the part that asks you to create a new savefile on shutdown. Then you don't need a savefile because your changes will be built in.

I can't help much with the actual usage of the remaster script as I never use it. I prefer Unleashed, but unless customizing it is a big long-term project Unleashed is going to be overkill for you. I can warn you that sometimes the remaster script won't include certain changes by default because it tries to make a hardware independent Puppy. So if that happens, there is a moment in the script where it lets you go into a directory in /tmp and manually add anything it missed in case you want to force it to work how you want.

The reason you might want to disable the prompt for creating a savefile is so it will shutdown faster and simpler, and so you don't accidentally creaete one. You can do that by modifying /etc/rc.d/rc.shutdown and changing the lines that look like this:
Code:
#first time booted puppy, there may not have been any persistent storage.
if [ $PUPMODE -eq 5 ];then #ifpupmode5

to be like this:
Code:
#first time booted puppy, there may not have been any persistent storage.
if [ $PUPMODE -eq 555 ];then #ifpupmode5

Puppy never sets $PUPMODE to 555, so that will never evaluate to true.

You have to make that change before remastering, of course, and make sure it's actually included.



If you want to have it save a log, you could tell it to mount the drive (if not already mounted) and save it to that, without a save file.

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send private message Visit poster's website 
AQUAR

Joined: 08 Feb 2013
Posts: 11

PostPosted: Mon 11 Feb 2013, 08:05    Post subject:  

I know this is an old post but hopefully this hint still works.

I was looking at ways to making MacPup a non-persistent OS.

The idea was to only use a secure virgin system for online banking but with ability to store some data created during the session.
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 10926
Location: Arizona USA

PostPosted: Mon 11 Feb 2013, 09:25    Post subject:  

If that's a question, multisession Puppy is the answer. Smile
Burn Puppy onto a DVD, preferably with Menu -> Multimedia -> Burniso2cd, to create a multisession DVD. Other burning programs, such as Pburn, can also burn a multisession DVD, but Burniso2cd is the simplest way for a beginner to make sure you get what you expect. Rewritable DVDs work fine.
Back to top
View user's profile Send private message 
AQUAR

Joined: 08 Feb 2013
Posts: 11

PostPosted: Tue 12 Feb 2013, 03:14    Post subject:  

@ Flash

Not so much a question but thanks for the suggestion.
A multisession DVD can work for me but still needs similar tweaking.

A vanilla puppy multisession dvd saves each session unless you explicitly select not too. This provides opportunity to alter the state of the OS and leaves a saved sessions trail. In turn this compromises the security objective.

I do not ever want to save a session, or even load a saved session.
Only want to work from a virgin OS set up specifically for a purpose and with ability to save some user generated data (eg to a user mounted FAT32 partition).

I'll stick with a USB pen drive as it is quicker, more transportable and can be partitioned. Past experience with multisession CD's also has not been without issues.

There is more info in another thread "How to turn off autosave for USB flash install" that helps me with all of this.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [11 Posts]  
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.0878s ][ Queries: 12 (0.0167s) ][ GZIP on ]