How to Fix a Corrupted Savefile?

Booting, installing, newbie
Post Reply
Message
Author
Atreyu
Posts: 1
Joined: Sun 26 Apr 2020, 15:45

How to Fix a Corrupted Savefile?

#1 Post by Atreyu »

Hi, how can I repair, or extract important files from, a corrupted savefile?

I'm a long-time Puppy user currently running Xenial. Yesterday, Firefox got into a bad state after a long day of use or perhaps a script had a problem, and started consuming 100% CPU usage. I right-clicked the icon in the task bar to close it and went to bed; this has happened once before and eventually Firefox closes and performance returns to normal. Unfortunately, this morning that did work and I had to reboot my laptop. Now the savefile will not load and trying to open it from a different instance of puppy gives a generic "Cannot open savefile" error. The savefile is encrypted with the "light" option.

Edit- When starting I get the message "Dumping last four lines of bootinit.log
mount -t ext4 -o noatime /dev/mapper/savefile /pup_rw
mount : mounting /dev/mapper/savefile on /pup_rw failed
Warning: setting PUPSAVE=""
Device savefile is not active.

Thanks,
Matt

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#2 Post by bigpup »

You can try this:

To test for and repair errors in Linux file system, use "e2fsck".

You need to boot some version of Puppy, so it is not using the broken save.

You do not say how Puppy was installed and on what device or what exact Puppy version.
I assume, when booting, you see some kind of boot menu.
Usually there is a boot option to boot not using the save.
May say RAM only or no save.

The save file can not be in use.

Mount the partition the save is on.

Open a terminal, and enter:

e2fsck /path to savefile

For example:
The save is named pupsave.2fs and is on sda1 partition.

Code: Select all

e2fsck /mnt/sda1/pupsave.2fs
Save is in directory xenialpup on partition sda1

Code: Select all

e2fsck /mnt/sda1/xenialpup/pupsave.2fs
To check a save folder use the method for checking a partition.
Check the partition the save folder is on.

To do the whole partition:
Need to boot from a live Puppy or a Puppy on a different partition to do a partition check.
(the partition must be unmounted)
Example:
partition sda1

Code: Select all

e2fsck /dev/sda1
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

williams2
Posts: 337
Joined: Fri 14 Dec 2018, 22:18

#3 Post by williams2 »

You need to create a mapped device to the encrypted save file first.
something like this:

Code: Select all

# losetup -f /mnt/home/bionicpup64save_luks.4fs
#
# losetup
/dev/loop3: [2052]:311081 /mnt/home/bionicpup64save_luks.4fs
#
# cryptsetup luksOpen /dev/loop3 luks123
Enter passphrase for /mnt/home/bionicpup64save_luks.4fs:
Now you can fsck /dev/mapper/luks123

Code: Select all

fsck.ext4 -f /dev/mapper/luks123
losetup -d /dev/loop3
.
Maybe LotsaLuk might be useful? or not.
http://www.murga-linux.com/puppy/viewtopic.php?t=117984
.

enrique
Posts: 595
Joined: Sun 10 Nov 2019, 00:10
Location: Planet Earth

#4 Post by enrique »

I hope NOT to confuse OP. And forget me if I am hijacking.
Encrypted!, I personally stay away of that. Only brings troubles.

Now I been prove to be wrong many times, and I was last time amazed about pack-it and unpack manage of save files.

But can we really do

Code: Select all

e2fsck /mnt/sda1/pupsave.2fs
That is a squashfs I do not think e2fsck can do sfs.

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#5 Post by bigpup »

The save file is a special type of file that has a complete Linux filesystem inside it.
.2fs --it is ext2 file system
.3fs --it is ext3
.4fs --it is ext4

e2fsck will work on them, to check the file system, inside the save file.

A normal sfs it will not check. There is nothing to check. No file system in a normal sfs.

A save folder it will not check. It is just directories and files.
For save folders, you check the file system of the partition, it is on.
Last edited by bigpup on Tue 28 Apr 2020, 04:15, edited 1 time in total.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#6 Post by nic007 »

bigpup wrote:The save file is a special type of sfs that has a complete Linux filesystem inside it.
.2fs --it is ext2 file system
.3fs --it is ext3
.4fs --it is ext4

e2fsck will work on them, to check the file system, inside the save file.

A normal sfs it will not check. There is nothing to check.
Really?

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#7 Post by bigpup »

Yes.

Try it with a save file.

Also right click on a save file.
Select properties.
It will give info.

Example:
A test save file I made as a .3fs.
Attachments
Screenshot(4).jpg
(42 KiB) Downloaded 165 times
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#8 Post by bigpup »

Well, I guess saying the save file is a special sfs is not exactly true.
It is more a special file.
What is a 3FS file?

File containing a file system snapshot saved in the third extended file system (EXT3) in Puppy Linux; stores the state of the file system at a certain point in time and can be used for resetting the file system back to that state; saved to an external file system partition
Last edited by bigpup on Tue 28 Apr 2020, 17:11, edited 1 time in total.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#9 Post by nic007 »

It's totally wrong. SFS is an archiving format, got nothing to do with a savefile.

enrique
Posts: 595
Joined: Sun 10 Nov 2019, 00:10
Location: Planet Earth

#10 Post by enrique »

nic007

I am so sorry for creating confusion. bigpup is 100%.
Puppy save files end like 2fs 3fs but that has NOTHING to do with squashfs. Puppy saves are just a file witch data has been formatted as Linux ext.

I feel like an idiot I know this, I do not know what I was thinking last night. I guess to much coffee.

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#11 Post by nic007 »

enrique wrote:nic007

I am so sorry for creating confusion. bigpup is 100%.
Puppy save files end like 2fs 3fs but that has NOTHING to do with squashfs. Puppy saves are just a file witch data has been formatted as Linux ext.

I feel like an idiot I know this, I do not know what I was thinking last night. I guess to much coffee.
I was correcting bigpup who thought a savefile was an sfs file at first.

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#12 Post by MochiMoppel »

enrique wrote:I am so sorry for creating confusion. bigpup is 100%.
Puppy save files end like 2fs 3fs but that has NOTHING to do with squashfs. Puppy saves are just a file witch data has been formatted as Linux ext..
I'm utterly confused.

BK wrote in his How Puppy works:
"The initial ramdisk file remains fixed in size, and everything under "/" goes into pup_save.3fs, the squashfs file that gets attached later in the boot process." (emphasis by me)

NOTHING to do with squashfs?

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#13 Post by nic007 »

NOTHING to do with squashfs?
YES.

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#14 Post by nic007 »

everything under "/" goes into pup_save.3fs
:shock:

I actually did a system search for this file just to make sure it's not something hidden somewhere.

enrique
Posts: 595
Joined: Sun 10 Nov 2019, 00:10
Location: Planet Earth

#15 Post by enrique »

MochiMoppel wrote:...NOTHING to do with squashfs?
I am sorry for the confusion. It is all in your link

Puppy Save
pup_save.3fs
The ".3fs" means that the file contains a ext3 filesystem.

Puppy system files are a different story, they are squash
pup_xxx.sfs
The ".sfs" means the file contains a squashfs compressed filesystem.

User avatar
Moose On The Loose
Posts: 965
Joined: Thu 24 Feb 2011, 14:54

#16 Post by Moose On The Loose »

Sometimes this is the best way to go:

boot with "puppy pfix=ram" (no quotes)
You will be running with no save file.
Browse to and click on the save file.
It should open to show its contents.
Make a temporary directory on some disk and copy all the contents in there.
At this point, you should have all your valuable files saved away.

If you can't fix the save file with any of the methods:

Copy the files in the temporary directory into the file system of the running puppy so that the files are once again where expected. If a file is messed up you may end up with new trouble in the new save file you will make in the next step.

Shut down and make a new save file with an easy to remember name.
Start up and choose that new file.
Try out all your stuff

User avatar
tallboy
Posts: 1760
Joined: Tue 21 Sep 2010, 21:56
Location: Drøbak, Norway

#17 Post by tallboy »

That may be difficullt when you have a problem like mine; a savefile with a corrupted ROX, which don't let me run X. I now run from the bkup, but it was made some time, and many modifications, ago...

Yes, I know, I know! :roll:

Finding that single fault in ROX is difficult.
True freedom is a live Puppy on a multisession CD/DVD.

Post Reply