SFS loading bugfix, continued

I was going to post this as a comment to the previous post, but it's too long.

For the record, the bug in 'init' was a dumb little thing. The path was wrong. In the code below, the 'find' line removes the leading '.' in the path. The current directory had previously been set to $OLFILESMNTPT, which is /pup_rw (or in the case of PUPMODE=13 it is /pup_ro2) which is the save-file. The fix is I needed to put ${OLDFILESMNTPT} in front of ${ONEOPAQUE}:
 #need to cleanup whiteout files if a new .sfs layer has been added...

if [ "$NEWUNIONRECORD" != "" -o "$PPURGE" = "yes" ];then
#find all .wh.__dir_opaque files at the OLDFILESMNTPT layer...
find ./ -noleaf -type f -name ".wh.*" | sed -e 's/^\.//g' |
while read ONEOPAQUE #example: /usr/src/.wh.__dir_opaque
WHBASE="`basename $ONEOPAQUE`"
if [ "$WHBASE" != ".wh.__dir_opaque" ];then
#example, .wh.bin alongside bin directory means it is deleted...
ONEDEL="`echo -n "$WHBASE" | sed -e 's/^\.wh\.//g'`"
BASEDIR="`basename $ONEDIR`"
[ "$BASEDIR" != "$ONEDEL" ] && continue
#if same dir exists lower layer, then wipe the opaque file... v424 fix path...
[ -d /pup_ro3${ONEDIR} ] && rm -f ${OLDFILESMNTPT}${ONEOPAQUE}
[ -d /pup_ro4${ONEDIR} ] && rm -f ${OLDFILESMNTPT}${ONEOPAQUE}
[ -d /pup_ro5${ONEDIR} ] && rm -f ${OLDFILESMNTPT}${ONEOPAQUE}
[ -d /pup_ro6${ONEDIR} ] && rm -f ${OLDFILESMNTPT}${ONEOPAQUE} #v412
[ -d /pup_ro7${ONEDIR} ] && rm -f ${OLDFILESMNTPT}${ONEOPAQUE} #v424
[ -d /pup_ro8${ONEDIR} ] && rm -f ${OLDFILESMNTPT}${ONEOPAQUE} #v424
[ -d /pup_ro9${ONEDIR} ] && rm -f ${OLDFILESMNTPT}${ONEOPAQUE} #v424
cd /

The above fix is only for directories. The problem of files "coming back" can occur for both Unionfs and Aufs. At a version upgrade, the 'init' script also checks that the "official" files are visible on top. So if you have deleted an official .desktop file, it will come back. If you have replaced an official file with another, the official one will only come back if it is a newer modify date.

Posted on 17 Aug 2009, 6:36


Posted on 17 Aug 2009, 14:16 by Terryphi
Upgrade annoyance
I wish there was a solution for this. The most annoying thing about Puppy is the way it ignores my file changes at version upgrade.

Posted on 17 Aug 2009, 15:43 by wuxiandianzi
can you help me ? my teacher
the kernel of the 4.1.2 is
so I want to compile the kernel to the
I have saved my pup_save.2fs file into my disk sda1 and put the devx_412.sfs together,it can runing GCC right.


I download the linux- into /usr/src folder
# cd /usr/src
# tar -zxf linux-
so I got a folder of linux-
# ln -sf linux- linux


# cd /usr/src/linux-
# make clean
# make mrproper
then copy "DOTconfig-K2.6.29.1-17APR09-TICKS-UNIPROC" to the folder of /usr/src/linux- and rename as ".config"
# make menuconfig
I loaded the".config" and I did not change anything,then saved as .config too.
# make bzImage
it was about 40 min later. i got the bzImage in the folder /usr/src/linux-

Posted on 17 Aug 2009, 15:44 by wuxiandianzi
can you help me ? my teacher

# cd /usr/src/linux-
# make modules
# make modules_install
about 50 min later I found a new folder"" in the /lib/modules/
it contains "kernel/ " "modules.alias" ,"modules.dep" and so on about 12 files
the I open the "pup_412.sfs" and copy all to /mnt/sda2/pup412/, I delete the folder /lib/modules/
and put the folder "" there!
# cd /mnt/sda2
# mksquashfs pup412 pup_412.sfs
5 min later. I got the pup_412.sfs

the end:

I copy initrd.gz from ISO into /mnt/sda2/initrd then
# cd /mnt/sda2/initrd
# gzip -d initrd.gz
# cpio -i -d initrd
I got alot of folders
I changed the----"modules.alias" ,"modules.dep" and so on about 12 files and the folder"kernel" in /lib/modules/
then renmae as
# find . | cpio -o -H newc > ../initrd.img
# cd ../
# gzip -9 initrd.img
I got initrd.gz

I copy the pup_412.sfs initrd.gz vmlinuz to make iso by tools
then I boot from cdrom
it dispy:

setting up the layered filesystem..... failed
Dumping last lines of /tmp/bootinit.log..
can not rename "" ,no this folder or file..
mount: /dev/sro is write-protectd, mounting red-only....

and so on
pausing for 60 seconds

Posted on 17 Aug 2009, 15:49 by wuxiandianzi
can you help me ? my teacher
here is the picture:

Posted on 17 Aug 2009, 21:38 by BarryK
Compiling the kernel
You must have done something wrong, I don't know what.

It is far easier to do a full hard drive install of Puppy and use that for compiling kernels.

The live-CD requires the Unionfs 3rd-party driver to work, perhaps you left that out. And the squashfs driver. Neither of these will be needed to boot a full hd installed Puppy.

Posted on 18 Aug 2009, 11:13 by wuxiandianzi
Thank you very much ! my teacher