Remove automatic pupsave for frugal installs

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#16 Post by RSH »

Smithy wrote:Would it be a good idea to put Musher's code before it to close any drives open though?
Yes, surely a good idea.

But something to think of:

- auto-unmount all ISO files in /mnt
- auto unmount all SFS and [2,3,4].fs files in /mnt
- Edit: not to forget to make a sync, to make sure cache is written to USB

Because you can not unmount a drive which contains an mounted ISO, SFS or save file. Do a sync first and then make sure to unmount SFS and save files first, because they could have been mounted from within a mounted ISO file.

I'm using/doing this automatically on every shut-down/reboot in my private LazY Puppy System/s.
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

User avatar
Smithy
Posts: 1151
Joined: Mon 12 Dec 2011, 11:17

#17 Post by Smithy »

Thanks for that info RSH.

Good ideas on those extra layers of mount, they confused me a few times in the past.

I know Lazy is a very slick modular system with various SFS available.

I have noticed that if I write something to a usb stick, and right click "unmount", puppy very graciously will not unmount the stick until it has finished the write that is in the cache. So that is handled very nicely.

My needs are simple.
After a big thread about shutdown, I have settled with a fast shutdown on the taskbar, and the "proper procedures" (save file etc) in the menu.

So far, the combination works a treat.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#18 Post by mikeb »

Because you can not unmount a drive which contains an mounted ISO, SFS or save file. Do a sync first and then make sure to unmount SFS and save files first, because they could have been mounted from within a mounted ISO file.
yes I added sort -r to the end of the unmount loop in puppy so loop mounted files get removed first but I mount them to /mnt/filemnt/.....
so no '+' so a different trick might be needed.

mike

User avatar
casearis
Posts: 6
Joined: Thu 16 Feb 2012, 19:14

menu.lst

#19 Post by casearis »

Have been following instructions, event handler is set to 0. No autosave... however i am having trouble locating the menu.lst file.

I know there is a pet somewhere which has "shutdown no save" option, just can't seem to find it again.

am using macpup 550

`case

User avatar
casearis
Posts: 6
Joined: Thu 16 Feb 2012, 19:14

Link to pet

#20 Post by casearis »


User avatar
neerajkolte
Posts: 516
Joined: Mon 10 Feb 2014, 07:05
Location: Pune, India.

#21 Post by neerajkolte »

Bookmark.
(Just adding post so I can find this thread again)
"One of my most productive days was throwing away 1000 lines of code."
- Ken Thompson

“We tend to overestimate the effect of a technology in the short run and underestimate the effect in the long run.â€￾
- Amara’s Law.


User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#23 Post by MochiMoppel »

neerajkolte wrote:Bookmark.
(Just adding post so I can find this thread again)
Your browser doesn't come with a bookmark manager? :o

Now that you bumped this thread here is more:
Ultra Fast Shutdown
Somewhat related:
How do I remove the save2flash icon on the desktop

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

When SaveFolders rather than SaveFiles are used

#24 Post by mikeslr »

Hi All,

The posts on this tread up until this one were written before the mechanism for saving to a SaveFolder rather than a SaveFile was created. Regarding the removal of automatic pupsaves for a frugal install if and when your Pup supports the SaveFolder option, and you've chosen it or are considering it, see the following thread: http://murga-linux.com/puppy/viewtopic. ... 036#810036.

Please continue to post to this thread if your post concerns SaveFiles, especially if it concerns new insights or new problems. Use your discretion regarding posts relating to SaveFolders. This thread is a "Sticky". The other, over the course of time, may get lost in the woods.

mikesLr

Phyax
Posts: 1
Joined: Thu 05 Feb 2015, 12:27

slackosave problem

#25 Post by Phyax »

Hi all
I'm trying to delete my slackosave file, because after configuring AMD drivers for my radeon <that doesn't work well with windows, it was just a test> the savefile doesn't work anymore... so I'm trying to delete it from ubuntu CD live but I've no permission to do that... What can I do to reset puppy to default?

pfix=ram doesn't work too, so I want to delete this damned slackosave and restart from the beginning

It- possible to do that or I must format the USB key and reinstall puppy on it?

User avatar
LazY Puppy
Posts: 1934
Joined: Fri 21 Nov 2014, 18:14
Location: Germany

#26 Post by LazY Puppy »

- Boot your Puppy
- create a empty text file and name it for your Puppy (e.g slackosave-empty.2fs etc...)
- reboot the Puppy
- when it comes to choose a save file just choose 0 for no save file (should boot into RAM without the save file loaded)
- remove all the e.g slackosave-xxx.xfs files
- reboot

Done! (?)
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:

oui

#27 Post by oui »

or better:

never use some Puppy version creating some save file! it is an historic error of Puppy to seduce to work with save files...

take better a Lazy or LASSIE Pup!

you don't need some save file at all. remaster once with the easy remaster suite and use nothing more...

User avatar
LazY Puppy
Posts: 1934
Joined: Fri 21 Nov 2014, 18:14
Location: Germany

#28 Post by LazY Puppy »

oui wrote:or better:

never use some Puppy version creating some save file! it is an historic error of Puppy to seduce to work with save files...

take better a Lazy or LASSIE Pup!

you don't need some save file at all. remaster once with the easy remaster suite and use nothing more...
One often can't see/think/say the obvious, although it is face to face. :lol: :wink:

Thanks. 8) :)
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#29 Post by rufwoof »

oui wrote:you don't need some save file at all. remaster once with the easy remaster suite and use nothing more...
I frugal with no savefile as well, pfix-ram boot each time (PUPMODE 5) and tend to remaster when I want to preserve any changes. However the 'create savefile' option that I normally click NO to at each shutdown can at times be useful i.e. create/use a savefile for a whille before making the next remaster.

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#30 Post by nic007 »

I also reckon running puppy frugally with add-on SFS's and no savefile is the way to go. I do: install sfs_load > place all extra SFS's in parent directory > make a one-liner script in /etc/rc .d/init.d for loading the SFS's at bootup > do my personalized settings the way I want it >remaster. Save all your work on a partition outside the operating system. If you are one for tinkering a lot with personal settings (like changing icons, backgrounds, etc. on a frequent basis) you still have the option of using a very tiny savefile just for that.

User avatar
rufwoof
Posts: 3690
Joined: Mon 24 Feb 2014, 17:47

#31 Post by rufwoof »

Anyone else noticed that when you ram boot with no save file, the bottom right 'free space' icon shows a similar/same amount of space whether you have puppy sfs more highly compressed or not.

It looks like puppy halves the amount of actual memory and allocates one half to front end and one half to back end - into which puppy sfs is copied. So provided half of total memory is more than the puppy sfs size it doesn't seem to matter whether that puppy sfs size is big or small, you stlll end up with around the same amount of 'front end 'free memory'

Mine typically shows 750MB free on this 1.5GB PC, even if puppy sfs is 100MB or 400MB.

Personnally I'm running with no swap partition and drop my core sfs's into puppy sfs (in a directory I created (/OFFICE) for that purpose. So the sfs's are already in memory after booting and ready to be loaded.

I have a script in my Startup folder that loads those sfs's quickly i.e.

Code: Select all

for i in audacity-1M.sfs LibreOffice-423-1M.sfs skype43-1M.sfs blender259-1M.sfs inkscape-1M.sfs openshot1.4-1M.sfs xvidcap1M.sfs; do
  f=`losetup -f`
  if [ ! -d /initrd/pup_$i ]; then
    mkdir -p /initrd/pup_$i
    losetup $f /initrd/pup_ro2/OFFICE/$i
    mount -r -t squashfs -o noatime $f /initrd/pup_$i
    busybox mount -t aufs -o remount,append:/initrd/pup_$i=ro unionfs /
  fi
done
nice fixmenus
# fire up libre tray icon (doesn't matter if restart as libre handles multi-calls ok
/opt/libreoffice4.2/program/soffice --quickstart &
nice jwm -restart
and another to unload the same (that's called before a remaster so that the sfs's aren't built into the new version

Code: Select all

#!/bin/bash
# Kill libre tray icon
kill `ps | grep quickstart | grep -v grep | awk '{print $1}'`
for i in audacity-1M.sfs LibreOffice-423-1M.sfs skype43-1M.sfs blender259-1M.sfs inkscape-1M.sfs openshot1.4-1M.sfs xvidcap1M.sfs; do
  LOOPDEV=`losetup | grep -w $i | cut -d: -f 1`
  if [ "$LOOPDEV" != "" ]; then
     busybox mount -t aufs -o remount,del:/initrd/pup_$i unionfs /
     busybox umount $LOOPDEV
     #  losetup -d $LOOPDEV
     rmdir /initrd/pup_$i
  fi
done
nice fixmenus
nice jwm -restart
More recently I've tended to keep copies of the extracted initrd and extracted puppy sfs on HDD, so I can copy in/delete that content as I see fit and remaster a new initrd (with puppy sfs contained within that)

On the Wary 5.5 I'm currently using for instance that looks like

Code: Select all

#!/bin/bash
cd MAIN
rm puppy_wary_5.5.sfs
mksquashfs ../EXTRACTEDPUP puppy_wary_5.5.sfs
find | cpio -o -H newc >../initrd
where <path>/MAIN folder contains the extracted initrd content and <path>/EXTRACTEDPUP contains the extracted puppy sfs content and <path> is where my grub4dos looks to find vmlinuz and initrd.

For instance I've just noticed that skype was set to auto-update, so I changed that setting in the running version, copied /root/.Skype i.e.configuration file to (replace the existing)<path>/EXTRACTEDPUP/root/.Skype ... and ran the above script so that a new initrd is created and ready for the next reboot.

Nice being able to remaster that way as once running you can carry on doing other stuff whilst its running without interfering with the remaster

I've highly compressed my sfs's (slow to form) as I'm loading entirely into ram, I'm also using a high compression of puppy sfs (mksquashfs) and in total the initrd produced is around 400MB. When booted that has 750MB of free space showing. If however I don't include the sfs's inside puppy sfs and the initrd is say 100MB, then I still have 750MB being shown as the amount of available free space.

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#32 Post by nic007 »

My method is extremely simple and uncomplicated. Those SFS's that I want to be loaded automatically at startup, I use for example:

Code: Select all

cd /initrd/mnt/dev_ro2/ExtraSFS
sfs_load --cli --skip-fixmenus --quiet  Java4.sfs  Wine4.sfs  WineProgs4.sfs
If you want the menus to be fixed just leave out --skip-fixmenus. To unload make the same script and just add -u to the command-line.
To load and unload all SFS's in a specific location, the wildcard option also works with that base command-line.
To load/unload an SFS on the fly as needed, a script with the same basic command-line can be used for every SFS file.
To load my swapfile automatically I have the following script in my startup folder:

Code: Select all

exec swapon /initrd/mnt/dev_ro2/pupswap.swp
Easy peasy.

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#33 Post by mikeb »

The sfs size only affects the size of the tmpfs when ram space is limited...above a certain point its a blanket calculation that you experience.


By the way do any of you actually use yer computers to do anything other than mess with operating systems.

Not having some form of save option would be a pain in the neck for general use....theres more to computing than browser and network settings :D Certainly the family would be having serious words if their computers forgot what they did every reboot whether they wanted it to or not.
They probably would not consider command line stuff to be easy peasy or convenient either...thought swapfile loading was automatic as long as the name was right.

Just curious

Mike

User avatar
nic007
Posts: 3408
Joined: Sun 13 Nov 2011, 12:31
Location: Cradle of Humankind

#34 Post by nic007 »

Windows XP is the workhorse, Puppy is an interesting plaything. Swapfile, only automatically picked up when you use a savefile in my experience (may be wrong though)... Unless you do some code editing somewhere 8)

User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#35 Post by mikeb »

Ah yes the save file requirement..i forgot that one...not unlike the inability to load sfs automatically that was introduced....hence your workarounds.

I did think a simple gui for creation of save files and they usage would be nice. Makes me wonder when noobies are advised to repartition windows to make swap...
Alternatively a daemon that creates swap files and uses them on demand..like was available for 2.4 kernels.

mike

Post Reply