Page 1 of 1

Invitation to create Savefile during boot or simplify "Save changes" process

Posted: 21 Sep 2017, 12:08
by postcd
Hello,

i am noob Porteus 3.2.2 user having computer without HDD atm.
I booted Porteus from FAT USB flash disk created in Windows by programs Rufus and Universal USB Installer. The result was always the flash disk that is not writable for persistence by Porteus thanks to the FAT/NTFS. Which is frequently problem (i assume many people needs some kind of persistence), i needed to enable encrypted persistence.

I tried to save changes using .dat savefile from within Porteus Config. Centre, but it told me "To have the changes stored in this file you will need to edit a line in your porteus.cfg file."
Which is very vague explanation on what to do and how the "Save process" works. After a few reboots in which i lost my modifications and after getting "no key available with this passphrase" error in Porteus 3.1 during boot and during creation of the .dat file (later in 3.2.2), i discovered here that i should probably first create .dat file (maybe unecrypted not to face mentioned error), then reboot, and then start using Porteus (which seems too complicated).

It can be better when Porteus detect non-writable boot disk filesystem (FAT/NTFS) and right at first boot, ask user for the .dat file be created so no need to face obstacles which i describe below and reboots later in order to save changes when running from FAT/NTFS USB drive.

Which obstacles i am talking about?
Currently, noob have to
1) boot Porteus (it will boot in Always fresh mode because most Windows users created USB boot flash disk using NTFS/FAT.
2) User discover "Save changes to .dat" option, and receive vague explanation (i qouted above) on what to do to make the "Save changes" feature working - he is invited to modify porteus.cfg (which is nto easy task for noob)
3) He is a noob so after wasting some time googling how to do it exactly, he end up editing the end of the APPEND line, to make it read 'changes=/porteus/save.dat' (without the quotes, using the name i specified when creating .dat and path where i saved .dat is in this case /mnt/porteusbootdrive/porteus/save.dat)
4) because of non helpfull/short description (pop up window after create .dat file) noob like me may think his changes was now already saved in .dat file i created and because i edited porteus.cfg, changes will be restored @boot. (wrong, he may face "no key available" error mentioned above, or this error: When i encrypted .dat savefile and rebooted, all changes was lost, when rebooted one more time... the changes i made in previous session (the one where my data was already missing) was restored)
5. i was wondering and having doubts on the .dat file size, if is enough big so the changes will be saved on next boot, So this is another doubt/worry i am facing. Porteus should advise the right size during creation and resize if it can not write all data to the .dat

I think whole persistence process with the .dat file should be more simple and convenient and the .dat file created/defined upon first boot for newbies OR from within booted Porteus populated + auto configured in porteus.cfg so the process is simple/guided so one have higher level of certainty his changes will be saved&restored.

Invitation to create Savefile during boot or simplify "Save changes" process

Posted: 21 Sep 2017, 13:46
by Ed_P
postcd wrote:
21 Sep 2017, 12:08
1) boot Porteus (it will boot in Always fresh mode because most Windows users created USB boot flash disk using NTFS/FAT.
2) User discover "Save changes to .dat" option, and receive vague explanation (i qouted above) on what to do to make the "Save changes" feature working - he is invited to modify porteus.cfg (which is nto easy task for noob)
There is another way to save changes other than using a save.dat file that a new user should see when searching for a means to save changes. It creates modules, which can be put in the porteus/modules folder and requires no changes to the porteus.cfg file. :happy62:
postcd wrote:
21 Sep 2017, 12:08
5. i was wondering and having doubts on the .dat file size, if is enough big so the changes will be saved on next boot, So this is another doubt/worry i am facing. Porteus should advise the right size during creation and resize if it can not write all data to the .dat
A valid worry. My initial save.dat was 256MB, then 360, then 480, now 1GB. I thought 256MB would be fine for saving configuration tweaks since I planned on saving downloads on the hard drive directly rather than in Porteus. But there is a lot of stuff saved that one doesn't see, browser caches for example.

Be sure to make rc.local_shutdown executable, sudo chmod +x /etc/rc.d/rc.local_shutdown. See http://forum.porteus.org/viewtopic.php? ... 591#p47589
and http://forum.porteus.org/viewtopic.php? ... 614#p47598 for more info.

Invitation to create Savefile during boot or simplify "Save changes" process

Posted: 23 Sep 2017, 20:43
by Bogomips
Ed_P wrote:
21 Sep 2017, 13:46
postcd wrote:
21 Sep 2017, 12:08
1) boot Porteus (it will boot in Always fresh mode because most Windows users created USB boot flash disk using NTFS/FAT.
Formatted USB stick with vfat partition. Could not copy file to it. Had to become superuser in order for copy to go through. Tablet with win10 could access partition and show file. Needed to print file (a pdf), but printer obsoleted (ink no longer made :evil: ). Took stick to copy shop and windoze on commercial machine could not see partition!

As next resort took a problematic USB neither readable on win10 nor Linux, and in Porteus formatted a 2G partition of usb ntfs. As ordinary user was able to copy pdf file from Porteus to stick without problem. And the commercial machine did not have problem reading file from this partition.
So cannot foresee any problem in creating save file on an ntfs partition, in fact everything seems to be easier.

Ed_P wrote:
21 Sep 2017, 13:46
postcd wrote:
21 Sep 2017, 12:08
5. i was wondering and having doubts on the .dat file size, if is enough big so the changes will be saved on next boot, So this is another doubt/worry i am facing. Porteus should advise the right size during creation and resize if it can not write all data to the .dat
A valid worry. My initial save.dat was 256MB, then 360, then 480, now 1GB. I thought 256MB would be fine for saving configuration tweaks since I planned on saving downloads on the hard drive directly rather than in Porteus. But there is a lot of stuff saved that one doesn't see, browser caches for example.
Cannot see why there has to be all these reservations, when one only has to try out the approach using ntfs partion to store the save file, as shown in the post SAVE.DAT, XZM & MLOOP, with subsection Create file providing example of using arbitrarily large save file in an ntfs partiton. Said file being created using the mksavfile.sh script provided here: Save.dat / changes confusion

Invitation to create Savefile during boot or simplify "Save changes" process

Posted: 24 Sep 2017, 04:10
by Ed_P
Bogomips wrote:
23 Sep 2017, 20:43
in Porteus formatted a 2G partition of usb ntfs.
Strongly against ntfs for removeable drives. Extra journaling can cause unsafe removal problems. FAT & exFAT better options IMO.
So cannot foresee any problem in creating save file on an ntfs partition, in fact everything seems to be easier.
Just as easy on FAT & exFAT partitions. :happy62:
Cannot see why there has to be all these reservations, when one only has to try out the approach using ntfs partion to store the save file, as shown in the post SAVE.DAT, XZM & MLOOP, with subsection Create file providing example of using arbitrarily large save file in an ntfs partiton. Said file being created using the mksavfile.sh script provided here: Save.dat / changes confusion
Menu > Administration > Porteus Save File Manager works also, on NON-ntfs partitions. :D

Invitation to create Savefile during boot or simplify "Save changes" process

Posted: 24 Sep 2017, 13:26
by Bogomips
  1. Ed_P wrote:
    24 Sep 2017, 04:10
    Strongly against ntfs for removeable drives. Extra journaling can cause unsafe removal problems. FAT & exFAT better options
    If for some reason user wishes to make save.dat on removable drive, is strongly advised to create linux partition for file as neko has done here: RTL8723bs
    neko wrote:
    17 Sep 2017, 08:37
    @alexhawk2016
    If you have a time, try the new save dara that will be created as follow.

    Code: Select all

    % su
    # dd of=porteussave.dat count=0 seek=40000000
    # mkfs.ext4 porteussave.dat
    Thanks.
    creating a sparse 20G container for the save.dat file:

    Code: Select all

    guest@porteus:~$ dd of=porteussave.dat count=0 seek=40000000
    0+0 records in
    0+0 records out
    0 bytes copied, 0.0204441 s, 0.0 kB/s
    guest@porteus:~$ ls -lh porteussave.dat
    -rw-r--r-- 1 guest users 20G Sep 24 15:02 porteussave.dat
    guest@porteus:~$ df -h .
    Filesystem      Size  Used Avail Use% Mounted on
    aufs            262M   25M  237M  10% /
    
    So then we are looking at hdd where there should be no reservations regarding ntfs partitions.
  2. Ed_P wrote:
    24 Sep 2017, 04:10
    Cannot see why there has to be all these reservations, when one only has to try out the approach using ntfs partion to store the save file, as shown in the post SAVE.DAT, XZM & MLOOP, with subsection Create file providing example of using arbitrarily large save file in an ntfs partiton. Said file being created using the mksavfile.sh script provided here: Save.dat / changes confusion
    Menu > Administration > Porteus Save File Manager works also, on NON-ntfs partitions. :D
    AFAIK Porteus Save File Manager does not create arbitrarily large sparse file containers. Not possible to create on vfat, don't know about exfat, but possible on ntfs as the above links show sparse file being used to hold save.dat, and how statistics on amount of data stored are easily obtained. ;)

Invitation to create Savefile during boot or simplify "Save changes" process

Posted: 25 Sep 2017, 05:34
by Ed_P
Bogomips wrote:
24 Sep 2017, 13:26
AFAIK Porteus Save File Manager does not create arbitrarily large sparse file containers.
True, the GUI allows the user to specify the Savefile size, along with file name and linux file system.
Not possible to create on vfat,
vfat!! Is that still around? But certainly possible on FAT32.
don't know about exfat, but possible on ntfs as the above links show sparse file being used to hold save.dat, and how statistics on amount of data stored are easily obtained. ;)
NTFS is fine for hard drives, it's what it was designed for. Just not a good choice for removable drives.