Code: Select all
--- init.orig 2015-02-08 22:04:18.591866000 +1000
+++ init 2015-03-18 07:01:59.074300604 +1000
@@ -1022,17 +1025,6 @@
esac
fi
if [ -d /mnt/dev_save$PUPSAVEFILE ]; then
- # Check partition if user calls for savefile check
- if [ "$PFSCK" = "yes" ]; then
- umount /mnt/dev_save
- MOUNTED=$(cat /proc/mounts | grep $PUPSAVEDEV |cut -f 2 -d ' ')
- MNTOPT=$(cat /proc/mounts | grep $PUPSAVEDEV |cut -f 4 -d ' ')
- umount $MOUNTED
- FSCKME="$(echo $PUPSAVE | tr ',' ' ')"
- fsckme_func $FSCKME
- mntfunc $PUPSAVEFS /dev/$PUPSAVEDEV $MOUNTED $MNTOPT
- mntfunc $PUPSAVEFS /dev/$PUPSAVEDEV /mnt/dev_save noatime
- fi
rm -r -f $CREATEPUPSAVE2FS
ln -s /mnt/dev_save${PUPSAVEFILE} $CREATEPUPSAVE2FS
elif [ "$CRYPTO" != "" ] ; then
This code is now in woof-ce and hence Tahrpup 6.0.2 and similar puppies.
Reasoning:
From the source code:
Code: Select all
fsck) PFSCK="yes";; #do a fsck of ${DISTRO_FILE_PREFIX}save file.
Some of us use this facility for savefiles since it doesn't take long, (savefiles are usually not very big compared to the size of partitions). And puppy has a history of not cleanly unmounting savefiles.
With the installed code, if you convert your savefile to a savefolder, suddenly "pfix=fsck" means fsck the whole partition on every boot.
Applying the patch reverts the meaning of "pfix=fsck" to it's original meaning.
With a savefile there are 2 appropriate filesystems, the filesystem in the partition and the filesystem in the savefile.
With a savefolder there is only 1 appropriate filesystem, the filesystem in the partition. The savefolder is just another directory in the partition.
So if we assume that the "fsckme.flg" mechanism provides integretity to the filesystem in the partition, then with a savefolder there is no filesystem for "pfix=fsck" to fsck.
if we don't assume that the "fsckme.flg" mechanism is adaquate, then we need to provide the best possible facility to fsck the partition on every boot.
I suggest that http://www.murga-linux.com/puppy/viewtopic.php?t=97235 is a more appropriate base for providing such a facility.
Any facility to fsck the partition should be independent of "pfix=fsck", so it is available to all puppies not just those that use savefolder.
Note1: I run my puppies on an ext4 partition with a "pfix=fsck4,fsck" boot parameter, so that if I am using a savefile both filesystems get fscked, and if I'm using a savefolder then the partition is fscked.
Note2: The 'init' script can only fsck ext2, ext3 and ext4 filesystems, since 'initrd.gz' contains only 'e2fsck'.
To use the patch:
Cut and paste the patch into a text editor and save it as 'init.diff'
Uncompress the current 'initrd.gz'
Patch the 'init' file with the saved 'init.diff' file.
Compress a new 'initrd.gz' file.
Tahrpup 6.0.2 "initrd.gz" files that contain both tihs and the 'always fsck ext4' patch, can be downloaded from here:
noPAE: http://www.fishprogs.info/puppy/tahr602nopae/initrd.gz
PAE: http://www.fishprogs.info/puppy/tahr602pae/initrd.gz
gyro