Savefile resizing suggestion

New features which should be implemented in Porteus; suggestions are welcome. All questions or problems with testing releases (alpha, beta, or rc) should go in their relevant thread here, rather than the Bug Reports section.
nanZor
Shogun
Shogun
Posts: 381
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.01 x86-64 LXQT

Savefile resizing suggestion

Post#1 by nanZor » 18 Apr 2019, 10:11

Had the pleasure of using the native gui tool to resize the savefile for fat32 stick use. Very nice.

However, you need to do this in "Always Fresh" mode. No problem. But if you are in another mode, the tool will let you go through the process and then warn you to go Alway Fresh *after* you fill in all the info. Maybe warn you up front instead? Yeah, it's good practice, and when you do it once you'll probably never forget again. :)

My system was getting kind of sluggish, and I thought it might have been me burning up my usb stick with all my Porteus testing - when in fact my default 512mb file was about 87% full. So I resized it no problem, and the random sluggishness went away of course.

But I only saw this watching the shutdown stanza actually finish. Heh, so that's why the led on my stick was constantly active before.

Neither is a big deal but more a tip for new users who may not have led's on their sticks, or just walk away when shutting down. Don't be stingy with your savefile size if you have the space, and just might explain sudden random sluggishness if you aren't really paying attention. Towards the end I wasn't, and the resize got me back in shape.
That's a UNIX book - cool. -Garth

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Savefile resizing suggestion

Post#2 by Ed_P » 18 Apr 2019, 15:15

The savedat file is useful and a great tool but it has to be watched because if it gets too big you can loose everything. My initial file was 256MB then I had it as 320MB then 512MB and at one point 1GB. It's now down to 320MB again with 32% used.

A couple of things to consider; 1. backup the savedat file when the system is setup the way you want, and 2. eliminate some of the stuff that gets saved to the savedat file.

This posting may interest you. cleanup script copy update And these are changes I've got in my /etc/changes-exit.conf file.

Code: Select all

!/var/run
!/var/tmp
!/home/guest/.cache/thumbnails/normal
!/home/guest/.cache/mozilla/firefox/dxsqumip.default/thumbnails/
!/home/guest/.mozilla/firefox/Crash?Reports/pending/
!/home/guest/.mozilla/firefox/dxsqumip.default/storage/default/
!/home/guest/.mozilla/firefox/dxsqumip.default/datareporting/archived
!/home/guest/.java/deployment/cache/6.0/
Obviously I use Firefox as my browser, adjust the lines to your browser.
Ed

nanZor
Shogun
Shogun
Posts: 381
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.01 x86-64 LXQT

Savefile resizing suggestion

Post#3 by nanZor » 18 Apr 2019, 17:24

Thanks Ed! That is *outstanding* !

I've incorporated that since I am now running Firefox as well, along with the EXIT: cheatcode you helped bring to my attention.

Part of the reason I like Porteus is that I got hooked on not running with spinning rust on modern hardware.

I had enough of that with these - TWENTY EIGHT MB - units:

https://www.pdp-11.de/wp-content/upload ... 640102.jpg

Awesome man, thanks again!
That's a UNIX book - cool. -Garth

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Savefile resizing suggestion

Post#4 by Ed_P » 18 Apr 2019, 18:58

:lol: Amazing what you can get at garage sales nanZor.

When you backup your save.dat file save it as porteussave.dat.xzm. Then you can boot in Always Fresh mode and Activate it to recover your changes. ;)
Ed

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Savefile resizing suggestion

Post#5 by francois » 20 Apr 2019, 13:50

@nanZor
Did you think about running porteus on linux file system? This way dat container becomes obsolete. Thus the only thing you need is a folder that will expand itself at will. B)
Prendre son temps, profiter de celui qui passe.

nanZor
Shogun
Shogun
Posts: 381
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.01 x86-64 LXQT

Savefile resizing suggestion

Post#6 by nanZor » 21 Apr 2019, 00:50

Done!

Thanks for the nudge francois. I re-evaluated my use case and decided to let Porteus handle it all with the built-in Live USB creation tool using just the defaults. Easy. Easier done than said! :)

Lurkers:

With the latest Porteus ISO image sitting on my spinning-rust hard drive, (the installer will want to see that), I went for it!

I just used my existing bootable Porteus stick and their own live usb installer program already on it to flash my *second* stick dedicated just for the new stick with the new formatting and filesystem layout. Use of "lsblk" or other method is advised to keep things straight on which device you'll want to flash. The live-usb installer tool shows you as well. In the end you'll have a dinky fat partition, and the rest is an ext4 partition formatted out to the rest of your drive size automatically. I didn't change any options - just accepted the defaults of the creator tool.

Long story short: (well, for me it's never really short is it?)

With the new stick dedicated this way and rebooting solely with it, just to test things out, when the boot splash came up, I hit TAB to temporarily edit my boot stanza. Instead of changes=/porteus, I simply changed that to

changes=/dev/sdb2
<<---- note your device may be different. I also want changes to be on partition 2, the ext4 partition.

I didn't need to get fancy with the cheatcodes. I just pointed out where the changes should go and let Porteus handle the rest.

Done. Now it's saving my changes, although I have to manually tickle the boot stanza. No more resizing of a fat32 file. And yeah, my STOCK Chromebook and other linux devices exchange files with it easily. So my windows notebook won't see the ext4. Yawn.

Proven to work, I wanted to make the changes permanent so that when I'm at the boot splash, I can just let it timeout and walk itself in with no intervention of the tab/boot editing stanza thing ....

So I edited (as root / toor) the APPEND line of the graphical option in this config file:

/mnt/sdb1/boot/syslinux/porteus.cfg
<<--- notice that this config files lives on the first partion sdb1 for me.

I did this even though I'm running EFI and an X86_64. This standard config file works just fine with the edit. So that's where in the config file I put the changes=/dev/sdb2

I also made this editing change to the Copy To Ram and Text Mode options. BUT for Always Fresh - that I left unedited. Obvious there.

Yeah, easier done than said. )
That's a UNIX book - cool. -Garth

User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Savefile resizing suggestion

Post#7 by Ed_P » 21 Apr 2019, 05:35

What happens if you use your USB drive in a system with another flash drive or no hard drive? sdb1 won't work.

Personally I think the ext2-4 formats were fine when flash drives were 2 GB, 4GB and even 8GB but allocating 60GB or 120GB to ext4 that is unreadable by TVs, car stereos, Windows systems, cell phones and just about everything else is a waste of a drive. Just my opinion.
Ed

nanZor
Shogun
Shogun
Posts: 381
Joined: 09 Apr 2019, 03:27
Distribution: Porteus 5.01 x86-64 LXQT

Savefile resizing suggestion

Post#8 by nanZor » 21 Apr 2019, 07:25

And very reasonable opinion too.

I guess it's a call of use-case. I won't be feeding my Porteus into those devices that won't read ext4, but that's just me. OR, like potato chips, have more than one Porteus on hand! One fully FAT32 and one ext4 for the second partition. Or use gparted or other partitioning tools to have both if it's that important.

Re flash / sd card sizes - for me I get the LARGEST that fits my budget. That is 32gb or MORE, even if I'm only storing and playing with a handful of xzm's. Reason being is that the more cells available, the more the stick/card controllers can replace when they fail. A large reserve pool. And bigger sd cards at least have redundant internal controllers when they get large - but I forget if redundant controllers start at 32gb or 64gb devices .....the whole amplified writes thing too...

My Armbian (non-RPI hardware) friends really got me into this subject, but I'll leave the devs to figure out what is a good default. Yeah, systemd and all that, and I'd love to see a Devuan alternative, but we're getting ot...

Or, just make good backup, use EXIT: and copy2ram and buy a new card once in long blue moon :)
That's a UNIX book - cool. -Garth

User avatar
francois
Contributor
Contributor
Posts: 6434
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Savefile resizing suggestion

Post#9 by francois » 21 Apr 2019, 11:44

Porteus on usb with both file systems.
Here is a thread on which where mixed fat32 and linux partitions permits going from one filesystem to the other SOLVED: linux usb key recognized in window 10

Porteus poor man or frugal install (on hdd).
Once completely satisfied, you might go for a porteus frugal install. We have some grub2 incantations for that. Porteus needs a linux partition of its own, but it can share it with debian or manjaro if you want.
Prendre son temps, profiter de celui qui passe.

Post Reply