Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 18 Sep 2019, 13:35
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
psav=....conquering/understanding puppy boot command(s)
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 3 of 3 [44 Posts]   Goto page: Previous 1, 2, 3
Author Message
Sailor Enceladus

Joined: 22 Feb 2016
Posts: 1561

PostPosted: Fri 24 Feb 2017, 10:45    Post subject:  

backi wrote:
Hi belham !

Quote:
Swap?? Hmmm, what??? I thought the whole point of using puppies (in fact, all related pup OSes too) was that a user never had to worry about either setting up a "swap" and/or using one? I nderstand why in bigger Linux OSes what swap does, and dutifully set it up in all the big Linux OSes I run. But who, and I guess more importantly WHY, has anyone in pup & pup-related land ever set up and/or used 'swap" with a pup? Even with 512mb of RAM, puppies won't use "swap" when running a pup OS designed for 512mb of less. Equally, you cannot run pups on 512mb ram or less that are designed for bigger amounts (i.e. the 64-bit pups, fatdog, tahr, etc, etc). I have never in the years since I started using pup back in ~2006-2007 ever set up a swap partition? Apologies if this all is ignorant ramblings and I should have been setting up "swap" partitions for all pups this whole time.


In this case i have to contradict your statement ........i have a whole lot of swapping going on on my old Thoshiba 3000 .......1 core ....1 gig Ram ...

I am using Zram which mostly helps avoiding Swaps to a Swap Partition.....but sometimes Ram gets out of Limits and additional Swap Partition will be used .Not very often.

Yup. I have 1GB Ram and sometimes Firefox freezes and I have to kill it then restart it if I don't have my 2GB swap partition.
Back to top
View user's profile Send private message 
backi

Joined: 27 Feb 2011
Posts: 1729
Location: GERMANY

PostPosted: Fri 24 Feb 2017, 11:02    Post subject:  

Hi Sailor Encaladus !

Did you ever tried Zram ? ......useful if you have only 1 Gig or less Ram .
If not Google for it ....or if you are on Tahrpup .....just install with PPM.....
zram-config ...save.
After reboot it is activ .Almost no configuration .
Don`t know if there is a thread here on the Forum .....if not it would maybe useful.....for Machines with less Ram.
Back to top
View user's profile Send private message 
6502coder


Joined: 23 Mar 2009
Posts: 641
Location: Western United States

PostPosted: Fri 24 Feb 2017, 12:36    Post subject:  

belham2 wrote:
Even with 512mb of RAM, puppies won't use "swap" when running a pup OS designed for 512mb of less.

Well, all my Puppy installations to hard disk are frugal, and I always set up a swap partition. My 412 Retro machine has 96 MB RAM and 384 MB of swap. My Wary 5141 machine has 192 MB RAM and 1 GB of swap. On both of these machines, I do see the swap partition being used from time to time. Even my Precise machine with 1 GB RAM uses its swap partition now and then.
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5623
Location: Republic of Novo Zelande

PostPosted: Fri 24 Feb 2017, 14:47    Post subject:  

belham2 wrote:
Swap?? Hmmm, what??? I thought the whole point of using puppies (in fact, all related pup OSes too) was that a user never had to worry about either setting up a "swap" and/or using one?
I guess it depends on how big your pup is, and how small your ram is - but remembering at all times that we don't just have the pup sitting idle in memory - we DO stuff with it.

eg: browser cache has to increase, calculating space has to be allocated for spreadsheets, word processing etc etc.

Then there's ripping of music and videos, and especially processing of videos - these can easily outstrip our available free ram.

What if your pup was 200MB, your savefile 512MB and your ram was 512MB. Already you have a problem. And what if you then load a decent sized Libreoffice sfs, maybe also Librecad, and then opened Chrome and did some browsing?

Uh-oh, tits up.

The worst situation is where the puppy keeps on running (ie doesn't crash) runs low on free ram and you keep on manipulating data. What gets written back to your savefile?

If you combine two issues - 1) Low ram due to no swap space and 2) long write times to usb stick - you get corruptions that are hard to explain.

I reckon that running without swap space should be limited to sessions where all data will be dumped at end of session, and no write attempts are made to usb or hard disk.

Remastering can use heaps of ram too - so i think swap space is compulsory for that type of operation also.
Back to top
View user's profile Send private message 
bigpup


Joined: 11 Oct 2009
Posts: 12569
Location: S.C. USA

PostPosted: Fri 24 Feb 2017, 20:58    Post subject:  

Why are some people so afraid to setup swap on their computers? Rolling Eyes
It is there to assist ram IF needed. Shocked
All it does is take up some space on whatever storage device you have swap on.

Most of the newer Puppies have swap usage setup to start when ram gets down to 40% free.

Why worry when that happens, just let it happen.

Do you really know what each program is doing with ram at all times?
No! Shocked

_________________
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected Shocked
YaPI(any iso installer) http://www.murga-linux.com/puppy/viewtopic.php?t=107601
Back to top
View user's profile Send private message 
Burn_IT


Joined: 12 Aug 2006
Posts: 3552
Location: Tamworth UK

PostPosted: Sat 25 Feb 2017, 09:57    Post subject:  

It is a bit like when you go into a store you pick up a basket to temporarily hold things. You may well put things back on the shelves before going to the checkout, paying, and tranferring to your own carrier.
_________________
"Just think of it as leaving early to avoid the rush" - T Pratchett
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5623
Location: Republic of Novo Zelande

PostPosted: Sun 30 Jul 2017, 15:11    Post subject:  

Of course you can always set up a separate usb stick which has been formatted with only a swap partition - no data or boot partitions at all. That way if you run out of free ram your system can still run by using the swap space on that separate usb stick - and you can still unplug the other usb stick that contains your boot files and data.

But i think the original question remains - how to force savefile/savefolder to load into ram initially (and completely) during boot?
Back to top
View user's profile Send private message 
Pelo

Joined: 10 Sep 2011
Posts: 12591
Location: Mer méditerrannée (1 kms°)

PostPosted: Sat 19 Aug 2017, 22:24    Post subject: Bookmarked for translation fr.  

Bookmarked for translation fr.
Because of much interest.

_________________
Passenger Pelo ! don't ask him to repair the aircraft. Don't use him as a demining dog .... pleeease.
Back to top
View user's profile Send private message Yahoo Messenger 
Pelo

Joined: 10 Sep 2011
Posts: 12591
Location: Mer méditerrannée (1 kms°)

PostPosted: Thu 24 Aug 2017, 02:33    Post subject: So you need a savefile.  

savefile is the first to be installed..
Savefile=your files storage (menu.lst).
So you need a savefile. Else how to know what to load at boot ? some german users told us to remasterize your ISO before shutdown.. Easy, clever idea.. Sad

_________________
Passenger Pelo ! don't ask him to repair the aircraft. Don't use him as a demining dog .... pleeease.
Back to top
View user's profile Send private message Yahoo Messenger 
greengeek


Joined: 20 Jul 2010
Posts: 5623
Location: Republic of Novo Zelande

PostPosted: Tue 30 Jul 2019, 15:51    Post subject:  

puppyluvr wrote:
Very Happy Hello,
Frugal install?
Two easy ways.
1.
Make your save to a directory.
Boot in ram.
Mksquashfs the directory.
Put the .sfs in your home directory with the Puppy .sfs etc..
Edit initrd to load it at boot.
2.
Make a save to a directory
Boot in ram
Merge the directory, with the original Puppy .sfs.
Swap the new .sfs with the original
Reboot.
I have a 2gb Puppy 5.1.1 that runs in ram..
Wink
Hi Puppyluvr - i am keen to understand the method you use to achieve what you said above re: "Edit initrd to load it at boot."

How is this done? Is it easy to modify initrd so that it accepts a new sfs as the top layer?
Back to top
View user's profile Send private message 
rufwoof


Joined: 24 Feb 2014
Posts: 3439

PostPosted: Tue 30 Jul 2019, 16:41    Post subject:  

Fatdog usb multi-session works well the way you want. Boot from usb, loads saves from the same usb, unplug the usb once booted. You do however have to set the Save Session Interval to zero (only save on demand, never automatically/timed). To save, re-attach USB and click the Save desktop icon.
Code:
title Fatdog
kernel /vmlinuz pkeys=uk waitdev=5 basesfs=ram:uuid:4d054dbd-ff6f-48d7-94ac-e9023c62d0f1:/fd64.sfs savefile=direct:multi:uuid:2d5fb1e2-5276-4950-bc8c-0b3c1ec9cfa6::
initrd /initrd

I've also set up a 16GB encrypted swap partition on HDD for the times when I do something like downloading a massively large iso or music/video file into /root. I don't save that however, move it elsewhere (HDD/server). When swap does get used it runs fine. I did comment out a swapoff in /etc/rc.d/rc.local however as with that left in it could stall during shutdowns/reboots.

Mostly I just boot, use, shutdown (no saving). Except when a new Chrome version comes out when I boot, install chrome, save. So clean system and browser at each reboot. For bookmarks I use tilda drop down terminal (F1 toggles showing/hiding it) and tilda highlights all urls (just click a url to open chrome on that web page). So I have tilda auto-loaded with editing a text file containing my bookmarks so that they're easily accessible at any time (press F1 to show/hide) and easily edited.

I have previously experimented with setting up swap early - within initrd and prior to the saves being loaded, so even with large saves if you have the swap space it would load into ram + swap. Worked OK, but was like a full install i.e. HDD read/write delays rather than running totally in ram.

I've yet to get a Puppy working in a manner where you can boot from usb/load saves from usb/unplug usb once booted. The way Fatdog does that is its like a CD/DVD multi-session, but using usb instead. And instead of save files it uses sfs's. Each new save creates another sfs and on bootup they get loaded into /aufs/pup_multi, whilst changes get stored in /aufs/pup_save. A trick is to boot, delete all of those save sfs's and then run a save action, which in effect re-writes the /aufs/pup_multi content to a single new sfs save file - sort of like defragmenting multiple save sfs's into one . When there are multiple save sfs you can use boot parameters to not load n number of previous saves, or just simply delete/rename them.

Multi-saves are nice when you want to change things, reboot and try them out, but then rollback to undo that (i.e. delete the most recent save sfs and reboot again).

That boot main sfs and saves from usb/unplug usb feature is one of the main reasons I run Fatdog, having your MBR, grldr, vmlinuz, main sfs and save sfs's all on a disconnected usb once booted is very comforting/secure.

_________________
( ͡° ͜ʖ ͡°) :wq
Fatdog multi-session usb

echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh

Last edited by rufwoof on Wed 31 Jul 2019, 05:05; edited 2 times in total
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 13316
Location: Arizona USA

PostPosted: Tue 30 Jul 2019, 21:22    Post subject:  

You might not have to delete the offending saved session to not use it. If Fatdog really works like a multisession DVD, there is a boot option that you can enter to make Puppy skip certain saved sessions. It's been a long time since I used it, so I forget what it is.
Back to top
View user's profile Send private message 
rufwoof


Joined: 24 Feb 2014
Posts: 3439

PostPosted: Wed 31 Jul 2019, 05:00    Post subject:  

Hi Flash

In Fatdog, you just append the number of last saves you want to skip being loaded to the end of the savefile kernel boot parameter, i.e. my previous example grub4dos (menu.lst) boot code of

savefile=direct:multi:uuid:2d5fb1e2-5276-4950-bc8c-0b3c1ec9cfa6::

becomes

savefile=direct:multi:uuid:2d5fb1e2-5276-4950-bc8c-0b3c1ec9cfa6::2

if you want to skip loading of the two last saves.

I believe the last two colons in the savefile parameter aren't actually required when the values they separate are null (empty) i.e. it could be just

savefile=direct:multi:uuid:2d5fb1e2-5276-4950-bc8c-0b3c1ec9cfa6

But I leave the two colons there purely as a reminder of where the skip n saves value should be added.

I used uuid's for disk identification as that's more static (uuid's are revealed by running "blkid" command). Using sda1 or sda2 or whatever type names can otherwise see those change at bootup if other block devices such as a usb have been inserted. If for example your HDD is usually /dev/sda1, but you have a usb inserted during another boot, then the kernel could allocate that usb as being /dev/sda1 and your hdd as /dev/sdb1. That's random, and at another reboot it might be back to the hdd being sda1 and usb as sdb1. Even uuid's can change however, but tend to do so less rarely under usual/general usage.

_________________
( ͡° ͜ʖ ͡°) :wq
Fatdog multi-session usb

echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh
Back to top
View user's profile Send private message 
rufwoof


Joined: 24 Feb 2014
Posts: 3439

PostPosted: Wed 31 Jul 2019, 11:09    Post subject:  

drunkjedi wrote:
Savefolder works great with Fatdog.
Here's my syslinux.cfg entry for Fatdog to load the folder from my hdd to RAM, the base sfs is also loaded in ram but in expanded state which makes it slower to boot but faster in work, Libreoffice, gimp start in an instant and work fast.
Code:
label fatdog
linux /fd64/vmlinuz
initrd /fd64/split/initrd
append rootfstype=ramfs waitdev=0 basesfs=expand:device:sda7:/FD64-710/fd64.sfs savefile=ram:device:sda7:/fd64save
menu label Fatdog64
text help
Start Fatdog normally with small initrd.
endtext

(Belated) thanks drunkjedi

If you're less concerned about the filesize of fd64.sfs, then swapping it to use lz4 compression knocks quite a bit off the boot time.

unsquashfs fd64.sfs
mv fd64.sfs fd64.old.sfs
mksquashfs squashfs-root fd64.sfs -comp lz4
rm -rf squashfs-root

Under grub4dos/menu.lst, booting from usb (small initrd - with no fd64.sfs contained within that) with multisession saves back to usb, but with swap and fd64.sfs on hdd
Code:
title Fatdog
kernel /vmlinuz rootfstype=ramfs pkeys=uk waitdev=5 basesfs=expand:uuid:4d054dbd-ff6f-48d7-94ac-e9023c62d0f1:/fd64.sfs savefile=direct:multi:uuid:2d5fb1e2-5276-4950-bc8c-0b3c1ec9cfa6:: 
initrd /initrd

Boots reasonably quickly, htop shows low memory utilisation, and once booted the usb and hdd can both be unmounted (ensure save session interval is set to zero).

Now making that my default boot settings for my fatdog usb multisession Smile

_________________
( ͡° ͜ʖ ͡°) :wq
Fatdog multi-session usb

echo url|sed -e 's/^/(c/' -e 's/$/ hashbang.sh)/'|sh
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 3 of 3 [44 Posts]   Goto page: Previous 1, 2, 3
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0669s ][ Queries: 12 (0.0107s) ][ GZIP on ]