Page 1 of 1
How do I get my settings to be saved on shutdown?-Decided
Posted: Tue Dec 06, 2022 7:51 pm
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 ?
Re: How do I get my settings to be saved on shutdown?
Posted: Tue Dec 06, 2022 8:18 pm
by rockedge
I have not seen this error before. I will have to test some RAM2 runs!
Re: How do I get my settings to be saved on shutdown?
Posted: Tue Dec 06, 2022 9:09 pm
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.
Re: How do I get my settings to be saved on shutdown?
Posted: Tue Dec 06, 2022 9:25 pm
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/
Re: How do I get my settings to be saved on shutdown?
Posted: Tue Dec 06, 2022 11:32 pm
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
Re: How do I get my settings to be saved on shutdown?-Decided
Posted: Wed Dec 07, 2022 12:05 am
by Sofiya
Re: How do I get my settings to be saved on shutdown?-Decided
Posted: Wed Dec 07, 2022 12:25 am
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
}
Re: How do I get my settings to be saved on shutdown?-Decided
Posted: Wed Dec 07, 2022 12:46 am
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
}
Re: How do I get my settings to be saved on shutdown?-Decided
Posted: Wed Dec 07, 2022 5:41 am
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).
Re: How do I get my settings to be saved on shutdown?-Decided
Posted: Wed Dec 07, 2022 5:52 am
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:
to provide information on size and amount used. But a system script could for example provide warning, for example, when savefile almost full.
Re: How do I get my settings to be saved on shutdown?-Decided
Posted: Wed Dec 07, 2022 6:45 am
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