Page 6 of 7

Re: Save.dat / changes confusion

Posted: 14 Aug 2016, 18:13
by Bogomips
@ Jack

If you still have sdb2 and /mnt/sdb2/Test/porteussave.dat, please run this and post the output.:

Code: Select all

file  /mnt/sdb2/Test/porteussave.dat
ls  -lh  /mnt/sdb2/Test/porteussave.dat
ls  -sh  /mnt/sdb2/Test/porteussave.dat
du -h  /mnt/sdb2/Test/porteussave.dat
[[ ! -e f ]] && mkdir f;
mountpoint -q f && umount -f f;
sudo mount /mnt/sdb2/Test/porteussave.dat f;
du  -sh  f
df  -h  f
sudo umount f; rmdir f

Re: Save.dat / changes confusion

Posted: 14 Aug 2016, 18:26
by Jack
Here is the output. But when I boot it won't load.

Code: Select all

guest@porteus:~$ file  /mnt/sdb2/Test/porteussave.dat
/mnt/sdb2/Test/porteussave.dat: SGI XFS filesystem data (blksz 1024, inosz 512, v2 dirs)
guest@porteus:~$ ls  -lh  /mnt/sdb2/Test/porteussave.dat
-rw-r--r-- 1 guest users 256M Aug 14 14:14 /mnt/sdb2/Test/porteussave.dat
guest@porteus:~$ ls  -sh  /mnt/sdb2/Test/porteussave.dat
255M /mnt/sdb2/Test/porteussave.dat
guest@porteus:~$ du -h  /mnt/sdb2/Test/porteussave.dat
255M	/mnt/sdb2/Test/porteussave.dat
guest@porteus:~$ [[ ! -e f ]] && mkdir f;
guest@porteus:~$ mountpoint -q f && umount -f f;
guest@porteus:~$ sudo mount /mnt/sdb2/Test/porteussave.dat f;

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

Password: 
Your mind just hasn't been the same since the electro-shock, has it?
Password: 
mount: wrong fs type, bad option, bad superblock on /dev/loop16,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
guest@porteus:~$ 

Re: Save.dat / changes confusion

Posted: 14 Aug 2016, 19:59
by Bogomips
Jack wrote:If this is not right I don't know what else I can do. I wish other helping on this.
EDIT:
Could this be what you are looking for? I didn't copy it all.

Code: Select all

guest@porteus:~$ ls
Desktop/    Downloads/  Pictures/  Templates/  mksavfile.sh*
Documents/  Music/      Public/    Videos/
guest@porteus:~$ sh mksavfile.sh  porteussave.dat  256
0+0 records in
0+0 records out
0 bytes copied, 0.000155676 s, 0.0 kB/s

ls -lh porteussave.dat
-rw-r--r-- 1 guest users 256M Aug 13 14:52 porteussave.dat

mkfs.xfs: porteussave.dat appears to contain an existing filesystem (xfs).
mkfs.xfs: Use the -f option to force overwrite.
Looks like file could have been corrupted because of this second run.

So we need to do a nice clean run:
  • Delete the file

    Code: Select all

    rm /mnt/sdb2/Test/porteussave.dat
  • Once it is gone, make it again

    Code: Select all

    sh mksavfile.sh  /mnt/sdb2/Test/porteussave.dat 256 
  • Reboot using this changes file changes=/dev/sdb2/Test/porteussave.dat
  • Boot without changes and give output of these commands:

    Code: Select all

    file  /mnt/sdb2/Test/porteussave.dat
    ls  -lh  /mnt/sdb2/Test/porteussave.dat
    ls  -sh  /mnt/sdb2/Test/porteussave.dat
    du -h  /mnt/sdb2/Test/porteussave.dat
    [[ ! -e f ]] && mkdir f;
    mountpoint -q f && umount -f f;
    su
    mount /mnt/sdb2/Test/porteussave.dat f;
    du  -sh  f
    df  -h  f
    umount f; rmdir f
    dmesg | tail
    usm -i
Thanks.

Re: Save.dat / changes confusion

Posted: 14 Aug 2016, 20:17
by Jack
Reboot using this changes file changes=/dev/sdb2/Test/porteussave.dat
Can I ask a question, why do you keep using dev I been using Linux a long time and I have never got it to work. I use mnt and it always works for me.

Have you try it? I just hope I'm not the only one. I feel I'm the only one trying this. I will it again if it don't I don't what to tell you.

Re: Save.dat / changes confusion

Posted: 14 Aug 2016, 20:33
by Bogomips
No problem if you wish to use mnt :)

Re: Save.dat / changes confusion

Posted: 14 Aug 2016, 22:34
by Jack
So we need to do a nice clean run:
  • Delete the file

    Code: Select all

    rm /mnt/sdb2/Test/porteussave.dat
Here is the output. And I check it was removed.

Code: Select all

guest@porteus:~$ rm /mnt/sdb2/Test/porteussave.dat
guest@porteus:~$ ls /mnt/sdb2/Test/porteussave.dat
/bin/ls: cannot access '/mnt/sdb2/Test/porteussave.dat': No such file or directory
guest@porteus:~$ ls /mnt/sdb2/Test/
guest@porteus:~$ ls /mnt/sdb2/
Test/  lost+found/
[*]Once it is gone, make it again

Code: Select all

sh mksavfile.sh  /mnt/sdb2/Test/porteussave.dat 256 
Here is the output.

Code: Select all

guest@porteus:~$ sh mksavfile.sh  /mnt/sdb2/Test/porteussave.dat 256 
0+0 records in
0+0 records out
0 bytes copied, 0.000129765 s, 0.0 kB/s

ls -lh /mnt/sdb2/Test/porteussave.dat
-rw-r--r-- 1 guest users 256M Aug 14 17:52 /mnt/sdb2/Test/porteussave.dat

meta-data=/mnt/sdb2/Test/porteussave.dat isize=512    agcount=4, agsize=65536 blks
         =                       sectsz=512   attr=2, projid32bit=1
         =                       crc=1        finobt=1, sparse=0
data     =                       bsize=1024   blocks=262144, imaxpct=25
         =                       sunit=0      swidth=0 blks
naming   =version 2              bsize=4096   ascii-ci=0 ftype=1
log      =internal log           bsize=1024   blocks=2573, version=2
         =                       sectsz=512   sunit=0 blks, lazy-count=1
realtime =none                   extsz=4096   blocks=0, rtextents=0

file /mnt/sdb2/Test/porteussave.dat
/mnt/sdb2/Test/porteussave.dat: SGI XFS filesystem data (blksz 1024, inosz 512, v2 dirs)

ls -sh /mnt/sdb2/Test/porteussave.dat
2.8M /mnt/sdb2/Test/porteussave.dat
du -h /mnt/sdb2/Test/porteussave.dat
2.8M	/mnt/sdb2/Test/porteussave.dat

sudo mount /mnt/sdb2/Test/porteussave.dat f2045
Password: 

du -sh f2045
0	f2045

df -h f2045
Filesystem      Size  Used Avail Use% Mounted on
/dev/loop16     254M  8.1M  246M   4% /home/guest/f2045
guest@porteus:~$ 
[*]Reboot using this changes file changes=/dev/sdb2/Test/porteussave.dat
Here is what my porteus.cfg looks like.

Code: Select all

LABEL text
MENU LABEL Text mode
KERNEL vmlinuz
APPEND initrd=initrd.xz changes=/mnt/sdb2/Test/porteussave.dat 3
rem APPEND initrd=initrd.xz changes=/dev/sdb2/Test/porteussave.dat 3
TEXT HELP
    Run Porteus in text mode and
    start the command prompt only
ENDTEXT
[*]Boot without changes and give output of these commands:

Code: Select all

file  /mnt/sdb2/Test/porteussave.dat
ls  -lh  /mnt/sdb2/Test/porteussave.dat
ls  -sh  /mnt/sdb2/Test/porteussave.dat
du -h  /mnt/sdb2/Test/porteussave.dat
[[ ! -e f ]] && mkdir f;
mountpoint -q f && umount -f f;
su
mount /mnt/sdb2/Test/porteussave.dat f;
du  -sh  f
df  -h  f
umount f; rmdir f
dmesg | tail
usm -i
Here is what this looks like.

Code: Select all

guest@porteus:~$ file  /mnt/sdb2/Test/porteussave.dat
/mnt/sdb2/Test/porteussave.dat: SGI XFS filesystem data (blksz 1024, inosz 512, v2 dirs)
guest@porteus:~$ ls  -lh  /mnt/sdb2/Test/porteussave.dat
-rw-r--r-- 1 guest users 256M Aug 14 18:00 /mnt/sdb2/Test/porteussave.dat
guest@porteus:~$ ls  -sh  /mnt/sdb2/Test/porteussave.dat
22M /mnt/sdb2/Test/porteussave.dat
guest@porteus:~$ du -h  /mnt/sdb2/Test/porteussave.dat
22M	/mnt/sdb2/Test/porteussave.dat
guest@porteus:~$ [[ ! -e f ]] && mkdir f;
guest@porteus:~$ mountpoint -q f && umount -f f;
guest@porteus:~$ su
Password: 
root@porteus:/home/guest# 

Re: Save.dat / changes confusion

Posted: 14 Aug 2016, 22:48
by Bogomips
Thanks very much Jack. After a quick look everything looks great, but don't get rid of the file just yet. :beer:

Re: Save.dat / changes confusion

Posted: 14 Aug 2016, 23:38
by Jack
After all of this I can't wait for the release of version 3.2 so I can go back to ext4. What I found out there is less headaches with ext4 and porteussave.dat takes to long to write the file. What mean to long to write it took about 10min to write the file and that each time. I hated to poweroff.

I'm going to poweroff and I want to see if it save anything.
EDIT:
Well I just rebooted and it looks like it works. I went to where the porteussave.dat is and I check the date and time and it was current I waited 5 min and refresh the desktop and the date and time was current again. What I think is, it is writing all the time to porteussave.dat file which mean less time at poweroff. If I'm right you got a good thing there and hope I'm right. I will run it for a few days to see.

Re: Save.dat / changes confusion

Posted: 15 Aug 2016, 00:35
by Ed_P
Jack wrote: What I think is, it is writing all the time to porteussave.dat file which mean less time at poweroff.
Yes, it's because you are using the changes= code rather than the changes=EXIT: code.

Re: Save.dat / changes confusion

Posted: 15 Aug 2016, 00:37
by Jack
Ed_P wrote:
Jack wrote: What I think is, it is writing all the time to porteussave.dat file which mean less time at poweroff.
Yes, it's because you are using the changes= code rather than the changes=EXIT: code.
Is that better or not?

Re: Save.dat / changes confusion

Posted: 15 Aug 2016, 00:51
by Ed_P
Jack wrote:Is that better or not?
I prefer it myself. I can boot up, do stuff and if I screw something else when I reboot I don't save my changes and my screw up is gone. I like that ability. Yes my shutdown is a couple of seconds longer but my processing while booted is slightly faster imo.

It depends on what is important to you. :)

Re: Save.dat / changes confusion

Posted: 15 Aug 2016, 01:32
by Jack
I could always make a copy of porteussave.dat and if something goes wrong you could take your copy and copy over the bad copy or file. There are days or weeks that I never shut my laptop down.

I have one question the way mind is being use if I delete a file or two will it remove it from the porteussave.dat file? How big of porteussave.dat file can be made? Can I create a 2GB or larger file?

Re: Save.dat / changes confusion

Posted: 15 Aug 2016, 02:33
by Ed_P
Jack wrote:I could always make a copy of porteussave.dat and if something goes wrong you could take your copy and copy over the bad copy or file.
Yup, and I do that also. But these backups are done on an ad hoc basis, so they can be a week or two back.
There are days or weeks that I never shut my laptop down.
That is certainly not my case. Sometimes I boot several times a day, others times I may stay booted for two or three days. I boot Porteus 3.2, 3.0, always fresh or with my changes=EXIT, and Windows.
I have one question the way mind is being use if I delete a file or two will it remove it from the porteussave.dat file?
That's the plan.
How big of porteussave.dat file can be made? Can I create a 2GB or larger file?
I don't know, but mine are usually 256MB or 512MB. Basically I save large files I wish to keep, ie downloads, outside the /home/guest/ system. My save.dat file is for my settings, bookmarks, scripts, wallpaper, time zone, volume, etc, etc. Porteus has no problem reading and writing to FAT drives and files on those drives are accessible to all OSs.

Re: Save.dat / changes confusion

Posted: 15 Aug 2016, 03:01
by Jack
My porteussave.dat is already full I have a warning about it and I haven't did much.

Re: Save.dat / changes confusion

Posted: 15 Aug 2016, 05:20
by Ed_P
Jack wrote:My porteussave.dat is already full I have a warning about it and I haven't did much.
What kind of warning?

How big is it? The one you're testing with is 256MB and only 22MB full from what I see in your postings above.