Knowing your Changes and Save.dat file size and usage

Post here if you are a new Porteus member and you're looking for some help.
User avatar
Ed_P
Contributor
Contributor
Posts: 8343
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Start-up lag on KDE

Post#31 by Ed_P » 21 Apr 2020, 04:48

It sure seems that your /save/save.dat file isn't getting used. When you reboot the files in /guest/ return?

When you boot with the changes=EXIT cheatcode what does:
ls -big /mnt/live/memory/images
look like?
Is there a /mnt/live/memory/images/changes line shown? And if so what does:
ls -big /mnt/live/memory/images/changes
look like?
Ed

meet
Black ninja
Black ninja
Posts: 88
Joined: 31 Mar 2020, 04:37
Distribution: Porteus 4.0

Start-up lag on KDE

Post#32 by meet » 21 Apr 2020, 05:07

Ed_P wrote:
21 Apr 2020, 04:48
It sure seems that your /save/save.dat file isn't getting used. When you reboot the files in /guest/ return?
Well of course they return! :D

I already told you this before! I have various files saved in the /home/guest/ then documents, pictures, etc folders and all of them stay across reboots. All my setting stay across reboots. My wallpapers changed stay across reboots. And everything else also stays across reboots.

And about those path.
Images shows the list of modules that are loaded. I have 5. 4 default and 1 browser.
And no, the changes line doesn't show up.

But there is a changes folder in /mnt/live/memory.
Changes folder is NOT IN the images folder.

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

Knowing your Changes and Save.dat file size and usage

Post#33 by Ed_P » 21 Apr 2020, 06:37

I have a changes folder in both locations. I suspect you're not using the changes=EXIT option. What does:
ls -big /mnt/live/memory/changes show?

What does your /boot/syslinux/porteus.cfg's APPEND look like? And how does it compare to your changes parameter in your porteus-v4.0-x86_64.cfg file.

Added in 21 minutes 45 seconds:
Yup. I just booted without the EXIT option and I have no changes folder in my images folder.

Added in 8 hours 9 minutes 59 seconds:
These are my changes files when using the changes=EXIT cheatcode.

Code: Select all

guest@porteus:~$ ls -big /mnt/live/memory/changes
total 0
 107 drwxr-xr-x  2 root  80 Apr 20 23:03 dev/
 103 drwxr-xr-x  4 root 160 Apr 21 10:40 etc/
   3 drwxr-xr-x  3 root  60 Apr 20 23:03 home/
  98 drwxr-xr-x 10 root 220 Apr 20 23:03 mnt/
  90 drwx------  3 root  60 Apr 20 23:03 root/
1283 drwxr-xr-x  3 root  60 Apr 20 23:03 run/
 119 drwxrwxrwt  7 root 160 Apr 21 10:44 tmp/
1285 drwxr-xr-x  6 root 120 Apr 21 03:03 usr/
  94 drwxr-xr-x  9 root 180 Apr 21 03:03 var/
guest@porteus:~$ ls -big /mnt/live/memory/images/changes
total 0
    99 drwxr-xr-x 11 root 328 Apr 20 17:52 etc/
   347 drwxr-xr-x  3 root  19 Apr 20 12:44 home/
531834 drwxr-xr-x  3 root  21 Jan 19  2019 lib/
263572 drwxrwxrwx  4 root  51 Mar 15 01:10 opt/
  1210 drwx------ 17 root 272 Apr 20 12:44 root/
531219 drwxr-xr-x  6 root  56 Apr 20 16:44 usr/
262833 drwxr-xr-x 10 root 102 Apr 20 17:55 var/
guest@porteus:~$ 
I'm not sure why I thought P7Zip opened the save.dat files, I can't get it to open mine.
Ed

meet
Black ninja
Black ninja
Posts: 88
Joined: 31 Mar 2020, 04:37
Distribution: Porteus 4.0

Knowing your Changes and Save.dat file size and usage

Post#34 by meet » 21 Apr 2020, 15:51

1)
Ed_P wrote:
21 Apr 2020, 15:09
I have a changes folder in both locations. I suspect you're not using the changes=EXIT option. What does:
ls -big /mnt/live/memory/changes show?

Code: Select all

ls -big /mnt/live/memory/changes
total 4
2117729 drwxr-xr-x  2 root   36 Apr 22  2020 dev/
    101 drwxr-xr-x  8 root  322 Apr 21 21:09 etc/
1048677 drwxr-xr-x  3 root   19 Apr  9 23:56 home/
     99 drwxr-xr-x  9 root   90 Apr 22  2020 mnt/
1200496 drwxr-xr-x  3 root   29 Apr 19 01:24 opt/
3145839 drwx------ 14 root  220 Apr 17 09:08 root/
2117743 drwxr-xr-x  3 root   19 Apr  9 23:56 run/
1048691 drwxrwxrwt 11 root 4096 Apr 21 21:14 tmp/
3145836 drwxr-xr-x  6 root   56 Apr 10 00:30 usr/
3145825 drwxr-xr-x 10 root   99 Apr 17 09:08 var/
2)
Ed_P wrote:
21 Apr 2020, 15:09
What does your /boot/syslinux/porteus.cfg's APPEND look like? And how does it compare to your changes parameter in your porteus-v4.0-x86_64.cfg file.
It is the same cheat code at both the locations. changes=EXIT:path/file

3)
I do not have /mnt/live/memory/images/changes directory.

4)
Yes P7zip didn't work.

So what next? Any way to see Porteus save file size?
The developers must know something about this? Is there any setting or report in porteus that directly shows this?

jssouza
Legendary
Legendary
Posts: 1165
Joined: 09 Jul 2015, 14:17
Distribution: Porteus x86 arm

Knowing your Changes and Save.dat file size and usage

Post#35 by jssouza » 21 Apr 2020, 16:30

meet wrote:
21 Apr 2020, 15:51
Any way to see Porteus save file size?
Guessing you mean usage. Size is a simple matter of performing ls -lh on the .dat file.
Assuming save file not in use, has a filesystem on it and not encrypted,
mkdir /mnt/tmp
mount -o loop path-to-savefile.dat /mnt/tmp
df -h /mnt/tmp

If your savefile does not have a filesystem then you need to add a new loop device and use losetup and create a filesystem on it before mounting it. Same way, if the savefile is encrypted you need to use cryptsetup and do a luksOpen on the savefile with your given password. These are advanced scenarios, probably they are not your case.

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

Knowing your Changes and Save.dat file size and usage

Post#36 by Ed_P » 21 Apr 2020, 16:33

What does

cat /etc/rc.d/rc.local_shutdown

show?

But you said you never installed Porteus, you just copied files to the USB drive. So, how exactly are you booting this?
Ed

meet
Black ninja
Black ninja
Posts: 88
Joined: 31 Mar 2020, 04:37
Distribution: Porteus 4.0

Knowing your Changes and Save.dat file size and usage

Post#37 by meet » 21 Apr 2020, 18:01

Ed_P wrote:
21 Apr 2020, 16:33
What does
cat /etc/rc.d/rc.local_shutdown
show?
It shows this.

Code: Select all

#!/bin/sh
#
# rc.local_shutdown
#
# This script is executed at shutdown (rc0) and reboot (rc6).
# You need to make it executable before using.
#
# Example:
# /etc/rc.d/rc.samba stop
txtbld=$(tput bold)               # Bold
txtred=${txtbld}$(tput setaf 1)   # Red
rst=$(tput sgr0)                  # Reset

function redwarning() {
echo -e $txtred "$1" $rst
}

if [ -a /mnt/live/memory/images/changes ]; then
   SDspace=$(df -BM --output=size,used,avail,pcent /mnt/live/memory/images/changes | tail -n1)
   read size used avail percent <<< $SDspace
   if [ ${percent%\%} -gt  85 ]; then
      echo 
      redwarning "Warning! save.dat file $percent full.  Used: $used  Free: $avail"
      echo 
   else
      echo 
      echo "save.dat file $percent full.  Used: $used  Free: $avail"
   fi
Ed_P wrote:
21 Apr 2020, 16:33
But you said you never installed Porteus, you just copied files to the USB drive. So, how exactly are you booting this?
[/quote]

Oh god! Ed! I am not going to explain the same thing again. I have told you this probably three times in previous replies.
Check this porteus link: http://www.porteus.org/tutorials/37-ins ... -v-10.html and see "From Windows".
jssouza wrote:
21 Apr 2020, 16:30
meet wrote:
21 Apr 2020, 15:51
Any way to see Porteus save file size?
Guessing you mean usage. Size is a simple matter of performing ls -lh on the .dat file.
Assuming save file not in use, has a filesystem on it and not encrypted,
mkdir /mnt/tmp
mount -o loop path-to-savefile.dat /mnt/tmp
df -h /mnt/tmp

If your savefile does not have a filesystem then you need to add a new loop device and use losetup and create a filesystem on it before mounting it. Same way, if the savefile is encrypted you need to use cryptsetup and do a luksOpen on the savefile with your given password. These are advanced scenarios, probably they are not your case.
Finally! Some good response.

Correct me if I get this wrong.
What you did there was mount the save.dat file to one directory and then used df to display the list of files in it?

About if save file doesn't have a file system -- what does that mean? Do I have data saved in it or not? Is it? (Then yes, I have files stored in my /home/guest directory. So that data must be in save.dat file.

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

Knowing your Changes and Save.dat file size and usage

Post#38 by Ed_P » 21 Apr 2020, 19:48

meet wrote:
21 Apr 2020, 18:01
It shows this.

Code: Select all

#!/bin/sh
#
# rc.local_shutdown
#
# This script is executed at shutdown (rc0) and reboot (rc6).
# You need to make it executable before using.
#
# Example:
# /etc/rc.d/rc.samba stop
txtbld=$(tput bold)               # Bold
txtred=${txtbld}$(tput setaf 1)   # Red
rst=$(tput sgr0)                  # Reset

function redwarning() {
echo -e $txtred "$1" $rst
}

if [ -a /mnt/live/memory/images/changes ]; then
   SDspace=$(df -BM --output=size,used,avail,pcent /mnt/live/memory/images/changes | tail -n1)
   read size used avail percent <<< $SDspace
   if [ ${percent%\%} -gt  85 ]; then
      echo 
      redwarning "Warning! save.dat file $percent full.  Used: $used  Free: $avail"
      echo 
   else
      echo 
      echo "save.dat file $percent full.  Used: $used  Free: $avail"
   fi
Note the file Porteus is using to check for space usage of the porteussave.dat file.
Oh god! Ed! I am not going to explain the same thing again. I have told you this probably three times in previous replies.
Check this porteus link: http://www.porteus.org/tutorials/37-ins ... -v-10.html and see "From Windows".
A good link meet but apparently you disregarded/overlooked the procedures in the FROM WINDOWS section titled "STEPS TO INSTALL" based on these postings:
meet wrote:
19 Apr 2020, 09:06
I do not have porteus installed on my USB. I had copied the files on a FAT32 USB and created the changes file and started using it like that only.
meet wrote:
19 Apr 2020, 17:08
From the USB. I do not have Porteus "installed" on the USB. I have booted from the USB using porteus files (copying the files from the iso to the usb).
Do I need to highlight the word not in your quotes for you? :D

When you get around to showing us how you're booting the USB drive we'll be able to help you better. That and the text displayed from this: ls -big /mnt/sdb1/

:)
Ed

meet
Black ninja
Black ninja
Posts: 88
Joined: 31 Mar 2020, 04:37
Distribution: Porteus 4.0

Knowing your Changes and Save.dat file size and usage

Post#39 by meet » 22 Apr 2020, 02:18

Ed_P wrote:
21 Apr 2020, 19:48
A good link meet but apparently you disregarded/overlooked the procedures in the FROM WINDOWS section titled "STEPS TO INSTALL" based on these postings:
I have not disregarded or overlooked any of the procedure. I have exactly worked as per the steps mentioned in that link and that's why the OS is working. Otherwise it wouldn't have booted.

But as you are not able to find a solution, it's not fair to put the blame on me stating there must be something wrong with the way I am using porteus.

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

Knowing your Changes and Save.dat file size and usage

Post#40 by Ed_P » 22 Apr 2020, 04:01

meet wrote:
22 Apr 2020, 02:18
I have not disregarded or overlooked any of the procedure. I have exactly worked as per the steps mentioned in that link and that's why the OS is working. Otherwise it wouldn't have booted.
You have posted twice that you did not install Porteus, you merely copied files to the USB drive.
But as you are not able to find a solution, it's not fair to put the blame on me stating there must be something wrong with the way I am using porteus.
Since you haven't responded to this request:
Ed_P wrote:
21 Apr 2020, 19:48
When you get around to showing us how you're booting the USB drive we'll be able to help you better. That and the text displayed from this: ls -big /mnt/sdb1/
we don't know how you're booting Porteus. I'm not even sure if we know whether your system is BIOS based or EFI based.
Ed

meet
Black ninja
Black ninja
Posts: 88
Joined: 31 Mar 2020, 04:37
Distribution: Porteus 4.0

Knowing your Changes and Save.dat file size and usage

Post#41 by meet » 22 Apr 2020, 04:32

Ed_P wrote:
22 Apr 2020, 04:01
meet wrote:
22 Apr 2020, 02:18
I have not disregarded or overlooked any of the procedure. I have exactly worked as per the steps mentioned in that link and that's why the OS is working. Otherwise it wouldn't have booted.
You have posted twice that you did not install Porteus, you merely copied files to the USB drive.
That is one of the ways a porteus bootable USB is created from windows as per that page. Copy the files from the ISO to the USB and run the exe file in the boot folder. Done.
Ed_P wrote:
22 Apr 2020, 04:01
When you get around to showing us how you're booting the USB drive we'll be able to help you better. That and the text displayed from this: ls -big /mnt/sdb1/

Code: Select all

ls -big /mnt/sdb1
104 drwxrwxrwx 3 root 4096 Apr 29  2018 EFI/
102 drwxrwxrwx 2 root 4096 Apr  9 17:02 System\ Volume\ Information/
103 drwxrwxrwx 4 root 4096 Apr 29  2018 boot/
  3 drwxrwxrwx 6 root 4096 Apr 17 14:24 porteus/
  7 drwxrwxrwx 2 root 4096 Apr  9 23:42 save/
The save directory above contains the save.dat file.
Ed_P wrote:
22 Apr 2020, 04:01
we don't know how you're booting Porteus. I'm not even sure if we know whether your system is BIOS based or EFI based.
It is EFI based,

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

Knowing your Changes and Save.dat file size and usage

Post#42 by Ed_P » 22 Apr 2020, 04:48

Thank you. :)

What do you do to boot Porteus? Plug it in and reboot Windows? Change the EFI boot sequence? Have you disabled the EFI Secure Boot option? Use a grub2 menu?

Also try this suggestion:
jssouza wrote:
21 Apr 2020, 16:30
mkdir /mnt/tmp
mount -o loop path-to-savefile.dat /mnt/tmp
df -h /mnt/tmp
And add a ls -big /mnt/tmp to it.

When booting do you see any errors related to your changes= cheatcode?
meet wrote:
20 Apr 2020, 02:40
changes=EXIT:/mnt/sdb1/save/save.dat
Something not being found?
Ed

meet
Black ninja
Black ninja
Posts: 88
Joined: 31 Mar 2020, 04:37
Distribution: Porteus 4.0

Knowing your Changes and Save.dat file size and usage

Post#43 by meet » 22 Apr 2020, 13:30

Ed_P wrote:
22 Apr 2020, 04:48
Thank you. :)

What do you do to boot Porteus? Plug it in and reboot Windows? Change the EFI boot sequence? Have you disabled the EFI Secure Boot option? Use a grub2 menu?
That was my first post in this forum I guess. I couldn't boot porteus with the EFI. I had to install grub on it as per someone's suggestion in the forum. However, I didn't know how to do that without doing any changes to my PC.

So, someone told me to disable the secure boot option. Now I plug the USB before pressing the physical start-up button on the PC and it boots directly in the USB.
Ed_P wrote:
22 Apr 2020, 04:48
When booting do you see any errors related to your changes= cheatcode?
Something not being found?
Well, I haven't seen what populates during the booting. It goes very quickly, within seconds.
However, log files might help us see that? Tell me the names of the files, if that can help.

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

Knowing your Changes and Save.dat file size and usage

Post#44 by Ed_P » 22 Apr 2020, 16:26

Excellent. Thank you. And yes the booting messages go by very fast and I don't know twhich log to check to see them.

Have you tried the commands jssouza posted plus the ls command I suggested? I suspect you will find the file empty but not sure and if it is where are your config changes being saved. Then change your changes= cheatcode parms from:

changes=EXIT:/mnt/sdb1/save/save.dat
to
changes=EXIT:/save/save.dat

in all the places you have it. EFI doesn't see drives the same as linux and when booting it root is already set to the drive. Then reboot.
Ed

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

Knowing your Changes and Save.dat file size and usage

Post#45 by Ed_P » 25 Apr 2020, 05:15

?? :) So, what's happening meet?
Ed

Post Reply