BootManager frugal bug fix

I fixed a bug with a frugal installation. Testing on my new Aspire One netbook, frugal installation, the BootManager started on every boot. It is only supposed to start once automatically, on the boot after a 'pupsave' has been created.

I found a dodgy line in the 'init' script that was writing incorrectly to /etc/rc.d/BOOTCONFIG. Fix commented with "100222".

Posted on 22 Feb 2010, 6:47


Posted on 22 Feb 2010, 7:14 by BarryK
Consider very big puppies
technosaurus has suggested an extra test before copying the pup-xxx.sfs file to RAM, in the case of very big puppies. This was in response to the situation of a 700MB Puppy.

I have modified the 'init' script:

 #v405 fast media plus more than 256MB ram then definitely worth copying to ram...

SIZESFSK=$(($SIZESFSK + 1000)) #some slack.
MINRAM2CPY=$(($SIZESFSK * 2)) #100222 technosaurus: in case of very big puppies.
[ "`echo -n "$FASTPARTS0" | grep "$PUPSFSDEV"`" != "" ] && [ $RAMSIZE -gt 280000 ] && [ $RAMSIZE -gt $MINRAM2CPY ] && COPY2RAM="yes"
if [ "$COPY2RAM" = "yes" ];then

Posted on 22 Feb 2010, 8:32 by shinobar
another problems on BOOTCONFIG
Hi Barry,

I haven't see your fix yet, and think another problem what I am talking about.
I encounterd with frugal install on falsh memories, that is PUPSTATE=13, BOOTCONFIG is not updated in 2 cases.

One is because of the time stamp.

Boot up with pupsave on flash, and once press 'save' button on the desktop.
Register additional sfs by using boot manager.
EXTRASFSLIST is written in the /initd/pup_rw/etc/rc.d/BOOTCONFIG at this point of time.
Then press 'save' button. It should be copied to /initd/pup_ro1/etc/rc.d/BOOTCONFIG, but does not.
Reboot, the additional sfs is not read because BOOTCONFIG was not updated.

The cause is the time stamp of BOOTCONFIG. The solution is 'touch /etc/rc.d/BOOTCONFIG' after hwclock excuted.
'hwclock' appeares both in /etc/rc.d/ and in /usr/sbin/timezone-set.

Second is because of whitelist at the root file system.

I couldn't find when and why, but sometimes created on the top of root file system /.wh..wh.. somewhat i do not remember.
In this case, whole /etc directory is not updated on the /initd/pup_ro1, that is pupsave.

A solution is to exculude '/.wh..*' from listing up files to copy.
The code is at the line 98 or so in /usr/sbin/snapmergepuppy.
I think '/var/run' also to be exculuded.
#Copy Files... v409 remove '^var'. w003 screen out some /dev files. #v431JP do not save /var/run, /var/lock(s), /root/tmp # 11feb10 do not save /.wh*

find . -mount -not \( -regex '.*/\.wh\.[^/]*' -type f \) -not -type d | sed -e 's/\.\///' | grep -v -E '^mnt|^initrd|^proc|^sys|^tmp|^var/run|^ver/lock|^root/tmp|^pup_|^zdrv_|^root/tmp|_zdrv_|^dev/\.|^dev/fd|^dev/pts|^dev/shm|^\.wh\.\.' | grep -v -E -i '\.thumbnails|trash|\.part$' |


Posted on 22 Feb 2010, 8:44 by BarryK
snapmergepuppy fixes
I put a 'touch /etc/rc.d/BOOTCONFIG' into /usr/sbin/snapmergepuppy.

I have put in some more file exclusions:

#Copy Files... v409 remove '^var'. w003 screen out some /dev files. 100222 shinobar: more exclusions.

find . -mount -not \( -regex '.*/\.wh\.[^/]*' -type f \) -not -type d | sed -e 's/\.\///' | grep -v -E '^mnt|^initrd|^proc|^sys|^tmp|^pup_|^zdrv_|^root/tmp|_zdrv_|^dev/\.|^dev/fd|^dev/pts|^dev/shm|^\.wh\.|^var/run' | grep -v -E -i '\.thumbnails|trash|\.part$' |
while read N

Posted on 22 Feb 2010, 8:47 by BarryK
shinobar contact
Awhile ago I sent you a pm on the forum. A few days ago I saw that you haven't read it so I sent you an email, no reply to that either.

You published an email address in your personal details on the Puppy Forum -- is that email address the best one to contact you?

Posted on 22 Feb 2010, 19:29 by shinobar
sorry Barry,
I didn't check the PM (now i realized and replied).
both PM on the forum and the email should be ok.

Posted on 23 Feb 2010, 6:56 by adi
full hd install
When installing on hard disk (full install) from puppy universal installer menu grub appears all the time too and from there I must select linux... not the same on usb.

Posted on 23 Feb 2010, 14:07 by shankargopal
At last!
I've spent months trying to figure out this bug! See this forum post:

And have been struggling with it in every version of Dpup, which I use as my workhorse system but which I am on the verge of ditching to go back to 4.1.2 as a result of this bug. Shinobar / Barry - can you post how to get the fixed scripts?

Posted on 1 Mar 2010, 20:29 by shinobar
rc.shutdown and snapmergepuppy
i found the code for PUPMODE=12 or 2, in rc.shutdown at line 881-886
rm -f /var/log/X*

rm -rf /tmp/*
rm -f /var/lock/LCK*
rm -f /var/run/*.pid
rm -rf /root/tmp 2> /dev/null #...note, not screening this out in any of above save modes.
rm -rf /root/.thumbnails/* 2> /dev/null

i think it should be the same for PUPMODE=13, that is snapmergepuppy.