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 Mon 20 Oct 2014, 13:59
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
Renaming .2fs files
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [7 Posts]  
Author Message
cichlasoma

Joined: 12 Sep 2009
Posts: 69

PostPosted: Thu 17 Sep 2009, 04:29    Post subject:  Renaming .2fs files  

Hi. I'd just like to make sure, it shouldn't be a problem to rename a saved .2fs files changing the part of the file name following the hyphen.
(I do believe, I lost some of the changes I made in my session after rebooting to a renamed .2fs file and I don't know whether I should associate it with the renaming action. After rebooting, Puppy reported something about not finishing correctly last time, unfortunetally I closed the window too hastily before reading it carefully, yet I'm sure, there didn't seem to be anything special about the last shut-down.)
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6447
Location: Auckland, New Zealand

PostPosted: Thu 17 Sep 2009, 05:47    Post subject:  

Don't rename, delete or replace a save file while it is in use - the space it occupied on your hard drive will disappear, and you won't be able to get it back until you defragment your hard drive.
If you do so, I presume something weird will happen at shutdown or whatever, although I wouldn't have thought you'd lose much.

If you need to rename, delete or replace a save file, do it when it isn't in use, e.g. by booting using a different save file, with pfix=ram, or into a different operating system.

You can safely copy a save file that is in use - when you boot from the copy it will just tell you X didn't exit correctly and type xwin to start it.

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
cichlasoma

Joined: 12 Sep 2009
Posts: 69

PostPosted: Thu 17 Sep 2009, 06:00    Post subject:  

Thank you for assurance, disciple!
(I renamed (and moved) the .2fs file when it wasn't in use, of course. The mentioned message I closed was probably the one about X having not exited correctly. I don't know why I lost part of the changes (if it actually happened as I'm convinced it did), yet I'm glad I really can freely move and rename save-files not being in use.)
Back to top
View user's profile Send private message 
cichlasoma

Joined: 12 Sep 2009
Posts: 69

PostPosted: Sun 27 Sep 2009, 11:08    Post subject:  

disciple wrote:

You can safely copy a save file that is in use - when you boot from the copy it will just tell you X didn't exit correctly and type xwin to start it.

Is it really safe even in case of a frugal install on a hard drive, especially when other processes run at the same time (which, as far as I can understand the matter, means, the savefile can change while being copied)?
Back to top
View user's profile Send private message 
Pizzasgood


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

PostPosted: Sun 27 Sep 2009, 17:21    Post subject:  

I used to do that a lot and never had any problems. But that's not the same as saying it's safe. There's always the chance that something could go wrong. The thing to consider is whether any programs are running that might write to the disk, such as the browser, email client, any program that autosaves, etc. If there are, close them. Also, run sync to flush any buffered writes down into the pup_save.2fs file (not the same as what happens with Flash drives and Puppy - that's a different sort of buffering). That way there should be little chance that any files are being written. You may also want to use the pfix=fsck option when booting the new 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 
cichlasoma

Joined: 12 Sep 2009
Posts: 69

PostPosted: Tue 29 Sep 2009, 12:25    Post subject:  

Pizzasgood wrote:
I used to do that a lot and never had any problems. But that's not the same as saying it's safe. There's always the chance that something could go wrong. The thing to consider is whether any programs are running that might write to the disk, such as the browser, email client, any program that autosaves, etc. If there are, close them. Also, run sync to flush any buffered writes down into the pup_save.2fs file (not the same as what happens with Flash drives and Puppy - that's a different sort of buffering). That way there should be little chance that any files are being written. You may also want to use the pfix=fsck option when booting the new save file.


I've tried to check md5 of the copied file (I ran no sync) and in the both cases, I've got different results then for the original, (Unfortunately, I'm afraid, I copied the savefiles I use in this way... Sad )
Back to top
View user's profile Send private message 
Pizzasgood


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

PostPosted: Fri 02 Oct 2009, 15:44    Post subject:  

The pup_save.2fs file is a filesystem image. That means that it isn't only storing the files themselves. It's also storing all their metadata, such as access times. If you access any file or directory, the access time will be updated, which will result in an update to the pup_save.2fs file. So I think it is probably impossible to both create an md5 sum of the pup_save.2fs file and also an exact copy of the file as it was prior to the md5sum use, unless you copy the 'cp' and 'md5sum' programs out into the harddrive and use those copies for the tasks (because running a program results in accessing the program's executable). And there's still the possibility of some daemon or running process to access a file...

The only surefire method to make and verify an exact copy is to not try copying a mounted image - i.e. using pfix=ram instead.

_________________
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 
Display posts from previous:   Sort by:   
Page 1 of 1 [7 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.0629s ][ Queries: 12 (0.0075s) ][ GZIP on ]