How do I get my settings to be saved on shutdown?-Decided

Kennel Linux Void-based


Moderator: Forum moderators

Post Reply
User avatar
Sofiya
Posts: 2378
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1505 times
Been thanked: 1619 times

How do I get my settings to be saved on shutdown?-Decided

Post by Sofiya »

How do I get my settings to be saved on shutdown?
KLV-Airedale-beta26

grub.cfg:

Code: Select all

menuentry "KLV-airedale64" {
  insmod fat
  search --no-floppy --fs-uuid --set=root A593-8174
  linux /klv/vmlinuz w_bootfrom=UUID=A593-8174=/klv w_changes=RAM2 net.ifnames=0
  initrd /klv/initrd.gz

Cannot run save session on demand
Directory /mnt/layers/us_ro not connected ___ how to connect it ?

Attachments
Снимок экрана_2022-12-07_01-10-12.png
Снимок экрана_2022-12-07_01-10-12.png (312.67 KiB) Viewed 956 times
Last edited by Sofiya on Tue Dec 06, 2022 11:59 pm, edited 1 time in total.

KL-Linux
KL LINUX Simple fast free

User avatar
rockedge
Site Admin
Posts: 6817
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2968 times
Been thanked: 2791 times
Contact:

Re: How do I get my settings to be saved on shutdown?

Post by rockedge »

I have not seen this error before. I will have to test some RAM2 runs!

User avatar
fredx181
Posts: 3250
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 408 times
Been thanked: 1412 times
Contact:

Re: How do I get my settings to be saved on shutdown?

Post by fredx181 »

Probably you need to have a save file (as it seems to be on FAT filesystem) and point to that with w_changes=.. (cannot be sure how exactly tbh)
On e.g. ext4 filesystem save folder use is possible.

User avatar
wiak
Posts: 4249
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 70 times
Been thanked: 1259 times
Contact:

Re: How do I get my settings to be saved on shutdown?

Post by wiak »

Sofiya wrote: Tue Dec 06, 2022 7:51 pm

How do I get my settings to be saved on shutdown?
KLV-Airedale-beta26

grub.cfg:

Code: Select all

menuentry "KLV-airedale64" {
  insmod fat
...
fredx181 wrote: Tue Dec 06, 2022 9:09 pm

Probably you need to have a save file (as it seems to be on FAT filesystem) and point to that with w_changes=.. (cannot be sure how exactly tbh)
On e.g. ext4 filesystem save folder use is possible.

Yes, if wanting save persistence to a FAT or ntfs filesystem you need to manually first create a Linux formatted savefile called upper_changes.ucimg (actually any savefile name will work as long as extension is .ucimg).
The extension is important (.ucimg). The KLV initrd init code will notice it and use that savefile in preference to any save folder. If there is more than one savefile only the alphanumeric first one found will be used.

I haven't myself made any savefile creation utility, but just used dd. I documented about that here: https://www.tinylinux.info/post/firstrib-savefiles/

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
Sofiya
Posts: 2378
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1505 times
Been thanked: 1619 times

Re: How do I get my settings to be saved on shutdown?

Post by Sofiya »

Thank you all for your help, everything went well, the save is working.
KLV-Airedale-beta26 - XFCE
This very useful information https://www.tinylinux.info/post/firstrib-savefiles/
Reconfigured to my language
I now have a KLV-Airedale-beta26 - XFCE puppy with my tongue

Attachments
Снимок экрана_2022-12-07_01-08-17.png
Снимок экрана_2022-12-07_01-08-17.png (470.51 KiB) Viewed 886 times

KL-Linux
KL LINUX Simple fast free

User avatar
Sofiya
Posts: 2378
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1505 times
Been thanked: 1619 times

Re: How do I get my settings to be saved on shutdown?-Decided

Post by Sofiya »

:thumbup:

Attachments
Снимок .png
Снимок .png (262.86 KiB) Viewed 875 times

KL-Linux
KL LINUX Simple fast free

User avatar
Sofiya
Posts: 2378
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1505 times
Been thanked: 1619 times

Re: How do I get my settings to be saved on shutdown?-Decided

Post by Sofiya »

It's very good that the save files have a different format, this allowed me to install two different puppies in one place
vanilladpupsave-sofiya.4fs - VanillaDpup
upper_changes.ucimg - KLV-airedale64

Here is just one question how to see how much space is left in the save file. " upper_changes.ucimg " .after saving ?

Code: Select all

#

insmod part_acorn
insmod part_amiga
insmod part_apple
insmod part_bsd
insmod part_dfly
insmod part_dvh
insmod part_gpt
insmod part_msdos
insmod part_plan
insmod part_sun
insmod part_sunpc

set gfxmode=1024x768,auto # 1280x1024,1024x768,800x600,640x480 possible value
set gfxpayload=keep

insmod efi_gop
insmod efi_uga

insmod all_video
insmod video_bochs
insmod video_cirrus
insmod gfxterm
insmod png
insmod jpeg
terminal_output gfxterm

insmod ext2
insmod f2fs
insmod ntfs
insmod exfat

insmod loopback
insmod iso9660
insmod udf

background_image /boot/splash.png

set default=0
set timeout=5
set fallback=1

#https://help.ubuntu.com/community/Grub2/Displays
set menu_color_normal='light-gray/black'
set menu_color_highlight='black/cyan'
#text no sel/fond ecran
set color_normal='light-green/black' 

if [ $grub_platform = 'efi' ]; then
  loadfont /boot/grub/fonts/terminus-18.pf2
  set gfxmode=auto
  terminal_output gfxterm
fi

menuentry "Puppy vanilladpup 9.2.20" {
  insmod fat
  search --no-floppy --fs-uuid --set=root A593-8174
  echo "Loading vmlinuz"
  linux /vanilladpup/vmlinuz net.ifnames=0 pmedia=usbflash pdrv=A593-8174 psubdir=/vanilladpup pfix=fsck,fsckp TZ=MSK-3
  echo "Loading ucode.cpio and initrd.gz"
  initrd /vanilladpup/ucode.cpio /vanilladpup/initrd.gz
}
menuentry "KLV-airedale64" {
  insmod fat
  search --no-floppy --fs-uuid --set A593-8174
  linux /KLV-airedale/vmlinuz w_bootfrom=UUID=A593-8174=/KLV-airedale w_changes=RAM2 net.ifnames=0
  initrd /KLV-airedale/initrd.gz
}
if [ $grub_platform = 'efi' ]; then
  menuentry "System BIOS setup" {
    fwsetup
}      
fi
menuentry "Shutdown computer" {
  halt
}
menuentry "Reboot computer" {
  reboot
}
Last edited by Sofiya on Wed Dec 07, 2022 2:09 am, edited 1 time in total.

KL-Linux
KL LINUX Simple fast free

User avatar
Sofiya
Posts: 2378
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1505 times
Been thanked: 1619 times

Re: How do I get my settings to be saved on shutdown?-Decided

Post by Sofiya »

with such - grub.sfg writes:
Cannot run save session on demand
Boot with option w_changes=Ram2 or w_changes1=RAM2 to make use of this feature

grub.sfg

Code: Select all

menuentry "KLV-airedale" {
  insmod ext2
  search --no-floppy --fs-uuid --set A181941E80239B44
  linux /KLV-airedale/vmlinuz w_bootfrom=UUID=A181941E80239B44=/KLV-airedale
  initrd /KLV-airedale/initrd.gz
}
Attachments
Снимок экрана_2022-12-07_01-39-58.png
Снимок экрана_2022-12-07_01-39-58.png (16.58 KiB) Viewed 857 times
Last edited by Sofiya on Wed Dec 07, 2022 6:49 am, edited 1 time in total.

KL-Linux
KL LINUX Simple fast free

User avatar
wiak
Posts: 4249
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 70 times
Been thanked: 1259 times
Contact:

Re: How do I get my settings to be saved on shutdown?-Decided

Post by wiak »

Sofiya wrote: Wed Dec 07, 2022 12:46 am

with such grub.sfg writes:
Cannot run save session on demand
Boot with option w_changes=Ram2 or w_changes1=RAM2 to make use of this feature

grub.sfg

Code: Select all

menuentry "KLV-airedale" {
  insmod ext2
  search --no-floppy --fs-uuid --set A181941E80239B44
  linux /KLV-airedale/vmlinuz w_bootfrom=UUID=A181941E80239B44=/KLV-airedale
  initrd /KLV-airedale/initrd.gz
}

Sorry I don't understand. Is the above a question? If you don't have the w_changes=RAM2 in the grub.cfg then you are not wanting to use save persistence. Rather the default direct writes to install directory upper_changes folder will be used since RAM is not being used in that case for session work.

NOTE: The w_changes1=RAM2 alternative is for a special case where you want save persistence file or folder to be in a directory other than the one you boot from since in that case you use the main "w_changes" kernel line variable to specify the location of where you want persistence file or folder to be (using normal UUID or LABEL type line such as w_changes=UUID=XXXXXXXXXXXXXX=/wherever followed by w_changes1=RAM2 to tell the initrd to use save persistence mode with that previous w_changes save location; i.e. via that mechanism you can put save file or folder anywhere you want to on your system no matter where you boot from).

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
wiak
Posts: 4249
Joined: Tue Dec 03, 2019 6:10 am
Location: Packing - big job
Has thanked: 70 times
Been thanked: 1259 times
Contact:

Re: How do I get my settings to be saved on shutdown?-Decided

Post by wiak »

Sofiya wrote: Wed Dec 07, 2022 12:25 am

Here is just one question how to see how much space is left in the save file. " upper_changes.ucimg " .after saving ?

Personally I am just maintaining the initrd to provide the capability of that upper_changes.ucimg savefile support. To determine how much space is left in the save file (or indeed also a convenient way to make new savefile) you or someone interested to do it would have to write a utility to check that. Maybe rockedge could add that to a KLV-Airedale todo list? Probably not main priority at the moment though since most reports have been from those using save folders not save files, but definitely a good idea to have a check space of savefile utility. In a way, that is one of the points of KL being community distros - to encourage and allow participation and useful additions per user feedback and contributions. Having said that, since the upper_changes.ucimg file gets mounted you can use command:

Code: Select all

df -h

to provide information on size and amount used. But a system script could for example provide warning, for example, when savefile almost full.

https://www.tinylinux.info/
DOWNLOAD wd_multi for hundreds of 'distros' at your fingertips: viewtopic.php?p=99154#p99154
Αξίζει να μεταφραστεί;

User avatar
Sofiya
Posts: 2378
Joined: Tue Dec 07, 2021 9:49 pm
Has thanked: 1505 times
Been thanked: 1619 times

Re: How do I get my settings to be saved on shutdown?-Decided

Post by Sofiya »

wiak wrote: Wed Dec 07, 2022 5:41 am

Sorry I don't understand. Is the above a question?

The foregoing is not a question

KL-Linux
KL LINUX Simple fast free

Post Reply

Return to “KLV-Airedale”