At shutdown of full install, how to save just designated files, not everything?

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
Mike3
Posts: 112
Joined: Fri Aug 28, 2020 1:26 pm
Been thanked: 1 time

At shutdown of full install, how to save just designated files, not everything?

Post by Mike3 »

I like to switch off puppy by pressing the on/off key on the computer to wipe everything added since the last save.

I assume this keeps me from getting things added and security.

When saving in puppy it seems to save the whole system everything you have on the computer / in puppy at that moment plus the old stuff.

Is there any way to save just single files, not everything?

I tries to make a new directory at the level above root, top level, but that was deleted when switching off by pushing the button also.

Last edited by Flash on Fri Dec 03, 2021 1:21 am, edited 2 times in total.
Reason: Original title: Saving just one file, not everything.
williwaw
Posts: 1937
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 170 times
Been thanked: 368 times

Re: Saving just one file, not everything.

Post by williwaw »

I tries to make a new directory at the level above root, top level, but that was deleted when switching off by pushing the button also.

In / along side /root?

to wipe everything added since the last save.

If you have a frugal install, try placing your directory on the device itself along side sdx/my_puppy folder.

Mike3
Posts: 112
Joined: Fri Aug 28, 2020 1:26 pm
Been thanked: 1 time

Re: Saving just one file, not everything.

Post by Mike3 »

Along side root, not in.

I'm on full installation

TerryH
Posts: 637
Joined: Mon Jun 15, 2020 2:08 am
Has thanked: 158 times
Been thanked: 160 times

Re: Saving just one file, not everything.

Post by TerryH »

Mike3 wrote: Thu Dec 02, 2021 10:15 pm

Along side root, not in.

I'm on full installation

This does not align with your opening request. A "full install', is when puppy is installed to a drive, the same as traditional linux installations. The drive is written to in real time, the save at shutdown does not apply.

For a frugal install, the save process can be adjusted to manipulate when or if the RW (Read/Write) Layer is written to the Save Folder/File. To be able to manipulate to save process, you need to be running in Pupdode=13. Pupmode 13 can be manually set by adding a pmedia=usbflash or pmedia=ataflash to the kernel line of your grub.cfg or menu.lst depending on which bootloader you are using.

New Laptop - ASUS ZenBook Ryzen 7 5800H Vega 7 iGPU / 16 GB RAM

williams2
Posts: 1062
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 305 times

Re: Saving just one file, not everything.

Post by williams2 »

If you are using pupmode 13, the top writable layer (layer 1) is ram (tmpfs)
Typically, layer 2 is the save file/folder. It is mounted rw (writable) but the aufs file system does not write to layer 2.

When you click the Save icon on the desktop, or when you choose to save changes when Puppy shuts down, any changes in layer 1 are written to layer 2 (the save file.) If you choose to not save changes in layer 1 to layer 2, no files are copied to the save file.

If you want to save a single file to the save file, you can do that.

For example, if there is a file /root/readme.txt you can copy the file to layer 2 (the save file.)
Layer 2, the save file, is typically mounted as /initrd/pup_ro3/
So you can cp /root/readme.txt /initrd/pup_ro3/root/

Another example, you could write a script to copy the latest youtube-dl to the save file then automatically shutdown, like this:

Code: Select all

#!/bin/sh
cp -a /usr/bin/youtube-dl /initrd/pup_ro3/usr/bin/
exec wmpoweroff

EDIT: if you do not have a changed file in layer 1, copying from Puppy's file system to layer 2 would be copying from the same file to the same file, probably not a good idea.

something like this would be safer:

cp /initrd/pup_rw/root/readme.txt /initrd/pup_ro3/root/

and

cp -a /initrd/pup_rw/usr/bin/youtube-dl /initrd/pup_ro3/usr/bin/

If the file in pup_rw doesn't exist, that line will do nothing,it will just print an error message.

Last edited by williams2 on Fri Dec 03, 2021 1:24 am, edited 1 time in total.
User avatar
JASpup
Posts: 1653
Joined: Sun Oct 04, 2020 10:52 am
Location: U.S.A.
Has thanked: 70 times
Been thanked: 89 times

Re: Saving just one file, not everything.

Post by JASpup »

Mike3 wrote: Thu Dec 02, 2021 10:15 pm

Along side root, not in.

I'm on full installation

If your goal is to kill power at will, you want a frugal install running live with no pupsave or mounted partitions.

This is the state when you first boot Puppy on a USB.

A full install is not all in ram and killing power risks file system corruption.

In a frugal install, NOT live (e.g., using a pupsave), you instruct saves to only happen manually. That way you can save a single system file (pupsaves are containers for files you'll usually only see inside your pup). You shouldn't kill power with a pupsave, but it's possible to save changes and run live when you get that far.

If you're saving any generic file, say a HTML page from the Internet, just save it to a location outside the Puppy system.

If you're truly using a full install and have not gotten down frugals yet, it would probably be beneficial to you to go back to the drawing board.

So you want to install Puppy

Naturally you can actually install Puppy if you wish. Once you boot Puppy and are happy with what you see it is time to open the Puppy Installer from Setup in the main menu. There are 3 main types of install; frugal, USB and traditional full install.
1. Frugal install (Recommended)

This type of install copies the main puppy files from the boot media (either optical or USB) to your harddrive. Firstly, you are presented with some information about your system and what partitions you have available. If you don’t have a suitable partition then you can use the included graphical partition manager GParted to shrink and move partitions as necessary to created a partition for your installation. Once this is done you are prompted for the location of your boot media files (either an iso image, optical media or just the files themselves) and once confirmed these are copied to a folder in your chosen partition. A bootloader is then installed and once finished you can reboot into your new system.

This will be a pristine system that requires you to save your session at shut down if you want to keep your settings. Once saving the session is complete, a pupsave file or folder is created. On you next boot your files and settings will be exactly as you left them at last shutdown.

2. USB Install (Recommended)

This type of install copies the main puppy files from the boot media (either optical or USB) to your chosen USB drive. Firstly, you should insert the USB drive that you want to use for installation. Again using the graphical partition manager GParted you need to make sure that there is a suitable partition on the USB drive. This can be formatted to fat32 Windows™ style filesystem (good for portability if you want to use the drive as storage to be used between Linux and Windows™) or one of the supported Linux filesystems. (Note: not all Puppies support the f2fs filesystem. The installer is intelligent enough to know this.) Again, you are prompted for the location of your boot media files (either an iso image, optical media or just the files themselves) and once confirmed these are copied to a folder in your chosen USB drive. A bootloader is then installed and once finished you can reboot into your new system. This can be booted on any computer you like! This is also a type of frugal installation.

Again, this will be a pristine system that requires you to save your session at shut down if you want to keep your settings. Once saving the session is complete, a pupsave file or folder is created. On you next boot your files and settings will be exactly as you left them at last shutdown.

3. Full Install

This is a traditonal Linux install to its own dedicated partition. If you don’t have a suitable partition then you can use the included graphical partition manager GParted to shrink and move partitions as necessary to created a partition for your installation. You must use a Linux filesystem. Once this is done you are prompted for the location of your boot media files (either an iso image, optical media or just the files themselves) and once confirmed these are expanded in your chosen partition. A bootloader is then installed and once finished you can reboot into your new system.

Once booted this will act like any other Linux installation.

Using Puppy

Puppy is famous for its ease of use. The desktop layout is traditional with a task bar at the bottom (or top) and icons on the desktop. Anyone coming from Windows™, Mac OSX™ or another Linux such as Ubuntu, Fedora or Arch will have little issue getting used to it. The interface is a typical WIMP style (Windows, Icons, Menus and a Pointing device).

While puppy comes with almost everything you need to write, calculate, enjoy videos and music, create artwork, work with your digital camera, and more there invariably comes a time when you need an an extra piece of software. Extra software comes in the form of pet packages which can be installed through the Puppy Package Manager or by downloading from a trusted source and simply clicking on the package. Puppy also has the capability of installing deb, rpm and tgz/txz packages from Debian family, Red Hat family and Slackware family of Linux operating systems.

The way Puppy is designed, if you use a frugal type install, software can be installed as an sfs (Squash File System) package. This is the preferred method to install very large packages such as LibreOffice. In fact the Puppy development environment, including the GNU Compiler Collection (GCC) and development libraries and headers, is shipped as an sfs; a separate download to the main ISO image. There is a tool call SFS Load which makes installing these packages a one step process. The sfs packages do not work on a full install.

Once you have been using Puppy for a little while you may want to try a remaster (see FAQ). This saves the state of your current installed system (minus some the personal stuff) to a burnable ISO image. This enables you to have your system setup and ready to go if you have several computers or you can share your remaster as a puplet with the community.

However you decide to install (or not) Puppy Linux, we hope you enjoy using it for years to come!

Notes

While we recommend frugal or USB installations the choice is entirely yours.

[1] Some common Linux filesystems that Puppy supports are ext2, ext3, ext4, f2fs. Windows™ filesystems supported are fat16, fat32 and ntfs.

[2] A pupsave file is a file that contains a linux filesystem. It can be stored on any supported partition. It is a fixed size and can be as small as 32MB and as large as 4GB (on fat32) and even larger on other filesystems. The pupsave file can be enlarged later on, but the challenge is to keep your system trim and clean by regularly deleting browser cache, cleaning up any stray files and storing other stuff outside the save file.

A pupsave folder can only be created on a linux filesystem. This allows you to store as much as your partition can hold.

https://puppylinux.com/install.html

On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.

User avatar
mikewalsh
Moderator
Posts: 6154
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 792 times
Been thanked: 1979 times

Re: How to save just designated files at shutdown, not everything?

Post by mikewalsh »

I have to concur with TerryH.

A full install saves in real-time - as stuff is added/deleted/modified/changed/altered, those changes are written into the file-system immediately. Powering-down with the on/off switch won't make a scrap of difference, and there IS a very real danger of permanently corrupting the file-system. And unlike a 'frugal', where the only thing that needs re-doing is the save-file/folder, a full install demands complete re-installation all over again.

Why voluntarily deny yourself the best of Puppy's advantages, just because you're USED to a full install..? Makes no sense to me at all..... Still, doubtless you have your reasons.

Mike. ;)

Mike3
Posts: 112
Joined: Fri Aug 28, 2020 1:26 pm
Been thanked: 1 time

Re: At shutdown of full install, how to save just designated files, not everything?

Post by Mike3 »

I'm using full install but load everything to RAM (choosen when doing the full install)

So it seems that things are saved only when shutting down or pushing the save button on the desktop.

If I install an app and push the on / off button on the computer (i.e. no save) the app is gone allong all files created since last save (or standard shutdown with shutdown button in puppy OS), when I restart.

It also seems thet the initrd/pup_ro2 is read only.

The message when I try to copy a file to initrd/pup_ro2/root/my-documnets is: "cannot create regular file 'initrd/pup_ro2/root/my-documets/test3': Read-only file system"

I get the same message when using the cp command: cp /root/my-documents/test3 /initrd/pup_ro2/root/my-documets/

There is no pup_ro3 file in initrd.

User avatar
bigpup
Moderator
Posts: 6983
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 903 times
Been thanked: 1522 times

Re: At shutdown of full install, how to save just designated files, not everything?

Post by bigpup »

Post an image of what is in initrd.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

Mike3
Posts: 112
Joined: Fri Aug 28, 2020 1:26 pm
Been thanked: 1 time

Re: At shutdown of full install, how to save just designated files, not everything?

Post by Mike3 »

Ok, so I attached the pic of the initrd folder

But I can't view it here on the forum it bacame an opc file or something and then I changed it to jpg (just by changing the name) it workd fine to open on my computer how do get it to display correctly here?

Anyways initrd has the following folders and files:

mnt, pup_a, pup_f, pup_ro1, pup_ro2, pup_rw, pup_z, tmp, DISTRO_SPECS, init, init_full_install

Attachments
Initrd Folder
Initrd Folder
Screenshot(1).jpg (86.49 KiB) Viewed 617 times
User avatar
JASpup
Posts: 1653
Joined: Sun Oct 04, 2020 10:52 am
Location: U.S.A.
Has thanked: 70 times
Been thanked: 89 times

Re: At shutdown of full install, how to save just designated files, not everything?

Post by JASpup »

Mike3 wrote: Fri Dec 03, 2021 8:18 am

I'm using full install but load everything to RAM (choosen when doing the full install)

So it seems that things are saved only when shutting down or pushing the save button on the desktop.

If I install an app and push the on / off button on the computer (i.e. no save) the app is gone allong all files created since last save (or standard shutdown with shutdown button in puppy OS), when I restart.

You're technical and that's what you want, but I'll mention here as bigpup didn't: you're installed frugally. You might be happier spending 10 seconds on shutting down normally, after you've selected a 0 save interval and "No" shutdown save (the 0 setting itself has to be saved).

Per your other thread, many .sfs browsers run-as-spot as designed.

On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.

Mike3
Posts: 112
Joined: Fri Aug 28, 2020 1:26 pm
Been thanked: 1 time

Re: At shutdown of full install, how to save just designated files, not everything?

Post by Mike3 »

Well I did full install when installing, not frugal and I have selected 0 as save interval i.e. never.

So I have no directory or thing for puppy on the HDD/ USB, it goes on the full partition so to speak no expandable folder or such thing.

What is the point of .sfs apps?

User avatar
bigpup
Moderator
Posts: 6983
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 903 times
Been thanked: 1522 times

Re: At shutdown of full install, how to save just designated files, not everything?

Post by bigpup »

Some of your statements do not indicate you have a full install.

WHAT SPECIFIC version of Puppy did you install???

Should have this to take an image that you can post.
menu>Graphic>Take A Shot
Select jpg, as the format to use, for the image.

On the desktop is the drive icons.
Should be one for the drive partition Puppy is installed on.
Click on it to open a Rox file manager window showing the contents.
Post the image of what it shows.

I am not sure, why the other image you posted, is not good.

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
JASpup
Posts: 1653
Joined: Sun Oct 04, 2020 10:52 am
Location: U.S.A.
Has thanked: 70 times
Been thanked: 89 times

Re: At shutdown of full install, how to save just designated files, not everything?

Post by JASpup »

the app is gone allong all files created since last save

If you install an app and it's gone because you didn't save it, that's a pupsave or live boot.

Mike3 wrote: Fri Dec 03, 2021 1:22 pm

What is the point of .sfs apps?

The point is more app running options based on intrinsic features.

[Example]
I am running frugally, I have 72mb of personal storage available, and I want to use Vivaldi which isn't installed. I have three basic choices within this boot:

  1. Increase the personal storage size

  2. Find a standalone version

  3. Load a Vivaldi .sfs

On the Whiz-Neophyte Bridge
Linux Über Alles
Disclaimer: You may not be reading my words as posted.

User avatar
Flash
Moderator
Posts: 976
Joined: Tue Dec 03, 2019 3:13 pm
Location: Arizona, U.S.
Has thanked: 51 times
Been thanked: 125 times

Re: At shutdown of full install, how to save just designated files, not everything?

Post by Flash »

I've seen this happen before and I don't know why it happens. Try it again, but first open the file in mtPaint and then then save it as a .jpg before you upload it to the forum. See if that works.

Chaos coordinator :?
User avatar
mikewalsh
Moderator
Posts: 6154
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 792 times
Been thanked: 1979 times

Re: At shutdown of full install, how to save just designated files, not everything?

Post by mikewalsh »

I suspect Mike3 can't figure out why Puppy doesn't run as a standard full install in the same way that everything else out there does.....and would like the reasons for this explained to him, in detail.

Damn, but that's a can o' worms..... :D

Barry, where art thou..? :lol: (The 'Puppymaster' is about the only one who can really answer this, in all honesty. He's the one who came up with the original concept, after all....)

Mike. ;)

User avatar
mikeslr
Posts: 2959
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 178 times
Been thanked: 914 times

Re: At shutdown of full install, how to save just designated files, not everything?

Post by mikeslr »

@ Mike3: Without regard for what you think you did, YOU DO NOT HAVE A FULL INSTALL. If you did Puppy would not be displaying the notices you mentioned.
See my post here regarding how to set Puppy up to only Save when you want to, viewtopic.php?p=43310#p43310 and here as to how to operate so that you only save the files you want to Save and rarely have to execute a Save. viewtopic.php?p=43296#p43296. Purists may quibble about technicalities. But between those two posts you'll also find out why and how Puppys differ from other operating systems.

@ JASpup, there's a fourth way to run Vivaldi: MikeWalsh's vivaldi-portable, viewtopic.php?t=624 unless that was what you meant by 'Standalone'. In which case, you missed the AppImage, https://apprepo.de/appimage/vivaldi. But I only scanned this thread and don't know what Puppy Mike3 is running. So you may be right that AppImage probably won't run under most Puppys.

By the way, I wish people would stop talking about "Live Installs". A "Live Install" is merely a frugal install where Puppy's system files have been burned to a CD/DVD. Or viewed another way, a Frugal install is a 'Live install' where Puppy's system files have been (re)located on/to a USB-Stick or Hard-drive.

Puppy-File-Structure.png
Puppy-File-Structure.png (176.95 KiB) Viewed 467 times

There are only two ways of running Puppys: A Frugal install where Puppy's System Files remain in the SFSes and their contents merged only in RAM on boot-up --the condition displayed on the Top-Right, with the Left-Most pane showing their 'merger in RAM' condition. And a Full Install where on installation to an entire partition, the contents of the files at the Top-Right which were in the ISO have been dissembled and folders and files individually written to the partition.
In a "Full Install" only the contents of the files in the ISO exist [together with files you subsequently add]: The condition of the Left-most pane. Those SFS files from the ISO, themselves, do not exist on the Drive. Nor would a Savefile or SaveFolder exists.
SaveFiles/Folders do not exist in Full Installs as there is no need to specifically Save anything. Changes are written to the Drive immediately: including every mistake you make, every application which breaks other applications, all the junk and malware you pick up while surfing the Web, and all the corrupted files which are written during a power surge or failure.
As you've been told several times "Forget about Full Installs". Puppys aren't designed to use them. They were a 'fudge' created when computers rarely had more than 256 Mbs of RAM in order to speed up booting to desktop.

Post Reply

Return to “Users”