save.dat not writable [Solved]

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

Re: save.dat not writable

Post#16 by Ed_P » 06 May 2014, 05:31

:Yahoo!: Porteus is now booting with a writable save.dat file.

:evil: Of course the new .5 GB save.dat file is completely empty.

One of the things I liked about Porteus initially was it's small size.

I'm beginning to see bleah's and angry1's points of view. :x


1. When a save.dat file is being used and it is almost full a msg to the user alerting them to the approaching problem would be nice.
And telling them what they can delete to avert the problem would be helpful also.

2. When the Porteus Settings Centre expands a save.dat file it would be nice if it could rename the old file porteussave-1.dat and then rename the new file to be same as the original name.
Last edited by Ed_P on 07 May 2014, 04:45, edited 1 time in total.
Ed

User avatar
brokenman
Site Admin
Site Admin
Posts: 5439
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: save.dat not writable

Post#17 by brokenman » 06 May 2014, 14:47

and any modules I've added are stored outside the save.dat file so it ain't me. Something is wrong with this release.
To confirm this we would need to see the contents of your save.dat. What are you calling 'outside the save.dat file'? It is not difficult to fill up 256Mb if you down a couple of large files to /root/Download or /home/guest/Download. Even watching videos on some sites can fill up your cache with temp files.
How do i become super user?
Wear your underpants on the outside and put on a cape.

roadie
Full of knowledge
Full of knowledge
Posts: 205
Joined: 02 Jan 2011, 18:41
Distribution: Porteus 3.5...with a twist
Location: In a hayfield

Re: save.dat not writable

Post#18 by roadie » 06 May 2014, 15:20

Now the thing with that is, up up until a few months ago I was using 2.1 Razor with a 128 MB save.dat that stayed at about 80% full. When I upgraded to 3.0 Razor I made the save.dat 256 MB and now it's FULL!!! With what, /var/log files and deleted file ghosts??? I haven't created that many new scripts and any modules I've added are stored outside the save.dat file so it ain't me. Something is wrong with this release.

Seriously, a 256 MB save.dat is virtually worthless if you want to save things. A savefile gets filled by programs like Firefox and others with cache files and such which Porteus has absolutely no control over.

Linux uses log files, it's just how it is. As far as I can see, the logrotate thing is fixed and "ghost files" take up little space and are part of the way the aufs system works.....a small price to pay for a system like Porteus. Otherwise, we'd still be stuck with HD installing any system we wanted to try out.

User avatar
freestyler
Contributor
Contributor
Posts: 382
Joined: 17 Oct 2013, 14:21
Distribution: Porteus KDE4
Location: Traveller
Contact:

Re: save.dat not writable

Post#19 by freestyler » 06 May 2014, 15:26

@Ed_P: Have you considered not saving changes or using magic folders? That way no log or cache files fill up your save.dat
https://www.porteus-apps.org

roadie
Full of knowledge
Full of knowledge
Posts: 205
Joined: 02 Jan 2011, 18:41
Distribution: Porteus 3.5...with a twist
Location: In a hayfield

Re: save.dat not writable

Post#20 by roadie » 06 May 2014, 15:38

1. When a save.dat file is being used and it is almost full a msg to the user alerting them to the approaching problem would be nice.
And telling them what they can delete to avert the problem would be helpful also.

2. When the Porteus Settings Centre expands a save.dat file it would be nice if it could rename the old file porteussave-1.dat and then rename the new file to be same as the original name.


1: With a 256 MB save.dat, you would constantly be alerted that you're running out of space...256 MB is nothing, nada, zip, for a save.dat. And really, the user should shoulder some responsibility for their system....you are after all, the one saving stuff.

How is Porteus, or any other Linux to determine what you can delete to avert the problem? It's a savefile....it keeps stuff you want to save...how in hell is the system to decide what you can or can't save?

2: C'mon now, you can rename a file yourself....really.....just rename it....call it anything you want.

You really need to get into the guts of the system by playing with it and borking everything a few times. Read some docs, man pages, and learn some basic commands...."dmesg" is a lifesaver and they all have options..."dmesg | less" for example. Right now, you appear to be displaying the Windows elitist attitude and that gets you no where.....this ain't Windows.

User avatar
Ed_P
Contributor
Contributor
Posts: 3069
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: save.dat not writable

Post#21 by Ed_P » 06 May 2014, 16:39

brokenman wrote:To confirm this we would need to see the contents of your save.dat.
Give me your address I will mail it to you. :)
What are you calling 'outside the save.dat file'?
Folders on /mnt/sda4, /mnt/sda5, /mnt/sda6
It is not difficult to fill up 256Mb if you down a couple of large files to /root/Download or /home/guest/Download. Even watching videos on some sites can fill up your cache with temp files.
Files I download go in my /home/guest/Downloads folder, get converted to .xzm files which are moved to /mnt/sda5/porteus/modules folder, and then the downloaded file gets deleted.
roadie wrote:Seriously, a 256 MB save.dat is virtually worthless if you want to save things. A savefile gets filled by programs like Firefox and others with cache files and such which Porteus has absolutely no control over.
I lived for months with a 128 MB save.dat file. I have Firefox configured to delete history and cache when I shut it down.
Linux uses log files, it's just how it is.
You struck a nerve. So I will share with you my opinion of log files. 1. Log files are useful for debugging apps and systems. 2. IT developers use them to develop and fix apps and systems. 3. Logging adds overhead to a system's performance and are turned off when systems go live. 4. End users have little need for log files; no need to create them, no need to see them, no need to review them, no need to debug them. 5. The logging function should be at the very least a user selectable option not simply is how it is.
As far as I can see, the logrotate thing is fixed and "ghost files" take up little space and are part of the way the aufs system works.....a small price to pay for a system like Porteus. Otherwise, we'd still be stuck with HD installing any system we wanted to try out.

Booting ISOs allows for booting multiple systems stored on the same drive.
roadie wrote:1: With a 256 MB save.dat, you would constantly be alerted that you're running out of space...256 MB is nothing, nada, zip, for a save.dat. And really, the user should shoulder some responsibility for their system....you are after all, the one saving stuff.
Don't confuse the save.dat file with the whole hard drive. I have very little input in what gets saved to the save.dat file. Logs being a good example.
2: C'mon now, you can rename a file yourself....really.....just rename it....call it anything you want.
Yes I can but that's not the point of scripting aides.
You really need to get into the guts of the system by playing with it and borking everything a few times.I
When I turn on a light I expect it to come on and shine. I don't care how it works, I don't care where the light comes from, I don't care if the light is created with coal, gas, nuclear, solar or wind. I just want it to work.
Read some docs, man pages, and learn some basic commands...."dmesg" is a lifesaver and they all have options..."dmesg | less" for example.
Reading is for girls.
Right now, you appear to be displaying the Windows elitist attitude and that gets you no where.....this ain't Windows.
Nope it's not Windows. Windows doesn't have logs. :D
Ed

roadie
Full of knowledge
Full of knowledge
Posts: 205
Joined: 02 Jan 2011, 18:41
Distribution: Porteus 3.5...with a twist
Location: In a hayfield

Re: save.dat not writable

Post#22 by roadie » 06 May 2014, 18:01

You struck a nerve. So I will share with you my opinion of log files. 1. Log files are useful for debugging apps and systems. 2. IT developers use them to develop and fix apps and systems. 3. Logging adds overhead to a system's performance and are turned off when systems go live. 4. End users have little need for log files; no need to create them, no need to see them, no need to review them, no need to debug them. 5. The logging function should be at the very least a user selectable option not simply is how it is.
See, that's a personal thing.....you don't like log files.....I do. Lots of things should be different, but they're not...just how it is. I prefer not to rail against things that I can't change and which really are moot lil things to begin with.

Make a bigger save.dat....storage is cheap.


Booting ISOs allows for booting multiple systems stored on the same drive.
Not the point....until aufs and it's previous systems....livecd, etc:...you were stuck with HD installs.....aufs and the like changed that. Booting from an iso is a very recent thing.
Reading is for girls.
In that case, you're on your own......, I don't do the handholding and spoonfeeding thing.

User avatar
Ed_P
Contributor
Contributor
Posts: 3069
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: save.dat not writable

Post#23 by Ed_P » 06 May 2014, 19:41

roadie wrote: learn some basic commands...."dmesg" is a lifesaver and they all have options..."dmesg | less" for example..
FYI I tried your command, both with and without the less option. I saw nothing in either display that would help me avert my save.dat file being full. But I may not have been looking for the right info.
Ed

User avatar
Ed_P
Contributor
Contributor
Posts: 3069
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: save.dat not writable

Post#24 by Ed_P » 06 May 2014, 19:48

BTW guys, I expanded a backup I have of the save.dat file and it works fine now. Not sure what screwed up the test one but I suspect one of the xfs commands.

I know the save.dat file's usage can be checked from Always fresh mode .viewtopic.php?f=81&t=1941&start=15#p13272 but an alternate approach without rebooting would be helpful. Especially in light of the problems caused when it fills up.
Ed

User avatar
brokenman
Site Admin
Site Admin
Posts: 5439
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: save.dat not writable [Solved]

Post#25 by brokenman » 07 May 2014, 01:30

I lived for months with a 128 MB save.dat file. I have Firefox configured to delete history and cache when I shut it down.
I am of the opinion that if you have a savefile of 128Mb then you have no need for a savefile. There are other methods to save config files and other small files without using changes. This is how I roll.

4. End users have little need for log files; no need to create them, no need to see them, no need to review them, no need to debug them. 5. The logging function should be at the very least a user selectable option not simply is how it is.
I understand your frustration with log files (as an end user) but you need to understand why they are essential. You're right! End users don't want to see them but when said user has a problem that they don't understand, how will they explain the what happened to the 'techie' that gives assistance? Logs are required for accountability in business and for assistnace in personal computing.

C'mon now, you can rename a file yourself....really.....just rename it....call it anything you want.
Yes I can but that's not the point of scripting aides.

The scripting aids in the creation and populating of your new savefile. I am against renaming a file that you created and would never do so. If my OS renamed a file that I created it would no longer be my OS. Think of the thousands of online programs that resize an image that you upload. They would never dream of renaming your original. This is tabu.

When I turn on a light I expect it to come on and shine. I don't care how it works, I don't care where the light comes from, I don't care if the light is created with coal, gas, nuclear, solar or wind. I just want it to work.
This may have been relevent in the General Electric thread in 1920 but not now. When you turned on your very first computer did it 'just work' or did you have to learn how to operate it? When you first got in your car did you have to learn everything or did it just work? People naturally slip into a comfort zone after learning the minimum that they need, this is normal, but I implore you to fight against it. It breeds mediocracy and retards progress.

Reading is for girls.
LOL. I like your sense of humour. Crying is for girls too yet when I read my credit card statement I cry.

Nope it's not Windows. Windows doesn't have logs.
Oh but it does. They just call it something else. An event viewer. Without it tech support wouldn't know what to do when you call complaining that your disk is not writable.

Glad you got your hands dirty and figured out the problem.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
Ed_P
Contributor
Contributor
Posts: 3069
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: save.dat not writable [Solved]

Post#26 by Ed_P » 07 May 2014, 03:14

brokenman wrote:C'mon now, you can rename a file yourself....really.....just rename it....call it anything you want.
Yes I can but that's not the point of scripting aides.

The scripting aids in the creation and populating of your new savefile. I am against renaming a file that you created and would never do so. If my OS renamed a file that I created it would no longer be my OS. Think of the thousands of online programs that resize an image that you upload. They would never dream of renaming your original. This is tabu.
The original file, created by Porteus, is named porteussave.dat. The expanded file, created by Porteus, is named porteussave-2.dat. And it requires the user to change their booting config. Having the script that creates the new file simply rename the original file to porteussave-1.dat and the expanded file to porteusdave.dat saves the user from manually doing the same thing or manually changing their boot config.

The script that expands the save.dat file gives the option to delete the original save.dat file when the expansion is finished why can't it give the option to rename the files??
When I turn on a light I expect it to come on and shine. I don't care how it works, I don't care where the light comes from, I don't care if the light is created with coal, gas, nuclear, solar or wind. I just want it to work.
This may have been relevent in the General Electric thread in 1920 but not now. When you turned on your very first computer did it 'just work' or did you have to learn how to operate it?
It just worked. It's 640 KM RAM warmed as it's 20 MB hard drive spun and the screen displayed it grey > on the black background, waiting for me to tell it what to do. type autoexec.bat. ah, the good old days.
When you first got in your car did you have to learn everything or did it just work?
It just worked. Pump the gas pedal two or three times, turn the key, put the gear shift in 1, and aim for the road. ah, the good old days.
Reading is for girls.
LOL. I like your sense of humour. Crying is for girls too yet when I read my credit card statement I cry.
I like your's too. :friends:
Nope it's not Windows. Windows doesn't have logs.
Oh but it does. They just call it something else.
No, actually Windows does have log files and lots of them. Do a search for *.log on your wife's machine.
Without it tech support wouldn't know what to do when you call complaining that your disk is not writable.
Ah, we saw how useful the logs were solving this problem.
Glad you got your hands dirty and figured out the problem.
I didn't figure out the problem, fanthom and you did. I simply performed the fix you suggested.

I gotta figure out a script that shows me how the space is being used in the save.dat file. Obviously it's not all the log files, and I see the /home/guest/. folders increasing as I add modules to my /mnt/sda5/Porteus/modules folder but there has to be more than that.

:beer:
Ed

User avatar
freestyler
Contributor
Contributor
Posts: 382
Joined: 17 Oct 2013, 14:21
Distribution: Porteus KDE4
Location: Traveller
Contact:

Re: save.dat not writable [Solved]

Post#27 by freestyler » 07 May 2014, 03:47

For your setup I think you should use magic folders, you can make one for your guest folder, then that will be the only thing that saves, or even be more specific and select what folders you want to save. You wont have the problem of your save.dat filling up with stuff you don't need.
https://www.porteus-apps.org

User avatar
Ed_P
Contributor
Contributor
Posts: 3069
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: save.dat not writable [Solved]

Post#28 by Ed_P » 07 May 2014, 04:43

Yes, you mentioned that before and I forgot to respond to you. Sorry. So what are "magic folders"?

If I had a better understanding what is in my save.dat file I would better able to determine if I need it or not. I know logs are there and that they are not all that big, and module related files and folders but there has to be more.
Ed

User avatar
freestyler
Contributor
Contributor
Posts: 382
Joined: 17 Oct 2013, 14:21
Distribution: Porteus KDE4
Location: Traveller
Contact:

Re: save.dat not writable [Solved]

Post#29 by freestyler » 07 May 2014, 05:34

hehe yeah I thought I'd bring it up again just in case you missed it. For example if you make your guest folder a magic folder only changes in your guest folder will be saved and nothing else. That eliminates log files or any other changes to your file system saving. Every time you boot up you will have a clean /tmp folder and /var folder etc..
Worth checking out, I think its just what your looking for http://www.porteus.org/component/conten ... lders.html
https://www.porteus-apps.org

User avatar
Ed_P
Contributor
Contributor
Posts: 3069
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 3.2.2 64-bit ISO
Location: Western NY, USA

Re: save.dat not writable [Solved]

Post#30 by Ed_P » 08 May 2014, 15:33

Well magic folders are certainly an interesting concept. And they could replace my little backup.sh script.

Code: Select all

#!/bin/sh

if [ `whoami` != "root" ]; then
  ktsuss "$0"
  exit
fi

cp -u -v    /home/guest/.config/spacefm/bookmarks    /home/guest/Backups/spaceFM/
cp -u -v    /etc/NetworkManager/system-connections/* /home/guest/Backups/NetworkManager/
cp -u -v    /home/guest/.wmweather/*                 /home/guest/Backups/wmWeather/
cp -u -v    /home/guest/.mozilla/firefox/c3pp43bg.default/prefs.js      /home/guest/Backups/FireFox/
cp -u -v    /home/guest/.mozilla/firefox/c3pp43bg.default/places.sqlite /home/guest/Backups/FireFox/
echo 
cp -u -r -v /home/guest/*                            /mnt/sda5/porteus/Guest/
but I'm not sure they would be a replacement for the save.dat file at this point. I don't know all the folders that I need to backup yet. Like all the /home/guest/. ones for example.

I have been doing some research as to what is filling my save.dat file though. After the problems I had with expanding the test save.dat file I expanded a backup to my real save.dat file and made it from 256 MB to 320 MB. After verifying that it worked with Porteus again and using it for a while I thought I should check it and see how much space was left. And when I rebooted to Always Fresh mode and mounted it I was SHOCKED to see it was FULL already. Only 1 MB left!! I was headed to a non-writable save.dat file again. So I expanded it to 512 MB and decided to see what was in it and what was using all the space. This is what I was able to find:

Code: Select all

guest@porteus:/mnt/sda5/porteus/Guest$ ./savedatspaceused.sh
using /dev/loop6

Please wait while i gather some info ....



 #################################
 Your data file has been mounted at: 
/mnt/loop

You can unmount it by typing uloop

Here is a list of the files:
etc  home  opt	root  usr  var

306M	/mnt/loop
Filesystem      Size  Used Avail Use% Mounted on
/dev/loop6      508M  332M  176M  66% /mnt/loop

328K	/mnt/loop/etc
91M	/mnt/loop/home
4.0K	/mnt/loop/opt
113M	/mnt/loop/root
3.7M	/mnt/loop/usr
99M	/mnt/loop/var

1.6M	/mnt/loop/var/log
82M	/mnt/loop/var/usm

424K	/mnt/loop/home/guest/Downloads
16K	/mnt/loop/home/guest/Desktop
11M	/mnt/loop/home/guest/Backups
ls /mnt/loop/home/guest/Backups
FireFox  NetworkManager  spaceFM  wmWeather
ls /mnt/loop/home/guest/Backups/FireFox
bookmarks-2014-04-30.json  bookmarks.html  places.sqlite  prefs.js
11M	/mnt/loop/home/guest/Backups/FireFox

ls /mnt/loop/root
/bin/ls: cannot open directory /mnt/loop/root: Permission denied
The 3 big users are /home, /root, and /var. The biggest part of /var is USM, /home is not the biggest user, /root is and it's contents are hidden.

By comparison, this is my 2.1 save.dat file breakdown.

Code: Select all

Here is a list of the files:
etc  home  opt	root  usr  var

76M	/mnt/loop
Filesystem      Size  Used Avail Use% Mounted on
/dev/loop6      124M   83M   42M  67% /mnt/loop

144K	/mnt/loop/etc
53M	/mnt/loop/home
908K	/mnt/loop/opt
17M	/mnt/loop/root
3.0M	/mnt/loop/usr
1.7M	/mnt/loop/var

1.5M	/mnt/loop/var/log
du: cannot access ‘/mnt/loop/var/usm’: No such file or directory

34M	/mnt/loop/home/guest/Downloads
8.0K	/mnt/loop/home/guest/Desktop

ls /mnt/loop/root
/bin/ls: cannot open directory /mnt/loop/root: Permission denied
Ed

Post Reply