How to automatically fsck an encrpyted save file?

Using applications, configuring, problems
Post Reply
Message
Author
seacyd
Posts: 32
Joined: Mon 14 Nov 2011, 12:18
Location: Austria

How to automatically fsck an encrpyted save file?

#1 Post by seacyd »

I would like to have my encrypted save file automatically being checked on boot or shutdown. What is the reason that an encrypted save file (heavy encryption) is not checked on bootup even though I added pfix=fsck on the kernel boot line?

I understand, there is a workaround solution available as documented in this thread: http://www.murga-linux.com/puppy/viewtopic.php?t=41918

Code: Select all

modprobe cryptoloop 
 modprobe aes 
 losetup-FULL -e aes /dev/loop6 pup_save_crypta.2fs 
 e2fsck /dev/loop6
This is not what I want. It should be done automatically, in order to prevent to many errors pile up and possibly get discovered to late for a fix. This happened to me before. So the question for me remains:

HOW TO AUTOMATICALLY FSCK.EXT2 the ENCRYPTED SAVE FILE:


A) Can the check be done on bootup? I assume, in the bootup-script, after the password was provided, it could be possible to add a line of code, just before the full mounting of the partition starts.

B) Can it be done on shutdown? There as well, after save was completed and the partition is unounted, it could work, I assume?


Any ideas are welcome.

Dewbie

#2 Post by Dewbie »

Classic Pup 2.14x does filesystem check at shutdown when you use the pfix=fsck boot parameter. I don't know if this would work with encrypted save files, though.

seacyd
Posts: 32
Joined: Mon 14 Nov 2011, 12:18
Location: Austria

#3 Post by seacyd »

Thanks for your reply.

I have not yet discovered though, which script handles the filesystem checking. I have looked into "rc.shutdown" but could not figure it out.

Dewbie

#4 Post by Dewbie »

seacyd wrote:
I have not yet discovered though, which script handles the filesystem checking.
That would be the init script, which is inside initrd.gz.
Have a look over here.

Unlike the others, Classic Pup 2.14x has part of the filesystem check script in rc.shutdown.

I say "part" because I'm assuming it's triggered by something in the init script, which apparently cannot be accessed in 2.14x.
(at least not with 0_pupbuild_tools)

Also have a look at
this.

seacyd
Posts: 32
Joined: Mon 14 Nov 2011, 12:18
Location: Austria

#5 Post by seacyd »

A late thank you for your reply!

I kept silent first, as I tried to solve the issue based on your hints...no time / success so far. I am inclined now to go for another method, i.e. having the large encrypted file as a separate container outside of puppy.

Thanks anyhow for your comments.

Post Reply