BootManager frugal bug fix
February 22, 2010 —
BarryK
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".
Comments
Consider very big puppiesUsername: BarryK
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: [code] #v405 fast media plus more than 256MB ram then definitely worth copying to ram... SIZESFSK=`du -k ${PUPSFSDEVMNTPT}${PUPSFSFILE} | cut -f 1` 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[/code]
another problems on BOOTCONFIG
Username: shinobar
"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/rc.country 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. [code]#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$' |[/code] Thanks.
snapmergepuppy fixes
Username: BarryK
"shinobar, I put a 'touch /etc/rc.d/BOOTCONFIG' into /usr/sbin/snapmergepuppy. I have put in some more file exclusions: [code]#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 do[/code]
shinobar contact
Username: BarryK
"shinobar, 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?
contact
Username: 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. thanks.
At last!
Username: shankargopal
"I've spent months trying to figure out this bug! See this forum post: http://murga-linux.com/puppy/viewtopic.php?p=364704&search_id=176305195#364704 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?
rc.shutdown and snapmergepuppy
Username: shinobar
"Barry, i found the code for PUPMODE=12 or 2, in rc.shutdown at line 881-886 [code]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[/code] i think it should be the same for PUPMODE=13, that is snapmergepuppy.
Tags: woof