Mounting the pupsave file

New to Puppy and have questions? Start here

Moderator: Forum moderators

Post Reply
moonfish
Posts: 5
Joined: Tue Jul 21, 2020 3:17 pm

Mounting the pupsave file

Post by moonfish »

Hi, I wondered if there was a way to mount the .4fs file on another Linux system eg. Ubuntu, thanks, Matt
User avatar
mikewalsh
Moderator
Posts: 5666
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 605 times
Been thanked: 1740 times

Re: Mounting the pupsave file

Post by mikewalsh »

Hi, Matt. And Image to the NEW Puppy Forums..!

Umm; o-kayyy....

Question (if I may?):- What is it you want to be able to do? Do you simply want to be able to open the save-file in order to look at things.....or do you wish to be able to access/modify stuff?

Reason I'm asking is because if it's personal data/files & stuff you're after, it might be worth your while creating a "shared" data partition. This could then be more easily mounted, accessed/modified and re-saved, and still be easily accessible from all Linux systems...

Let us know what you'd like to do, please.


Mike. ;)

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

moonfish
Posts: 5
Joined: Tue Jul 21, 2020 3:17 pm

Re: Mounting the pupsave file

Post by moonfish »

Hmm, it seems that I have partly answered my own question! I tried to mount the pupsave file this way:

$ sudo mount bionicpup64save-matt2.4fs /mnt/tmp

This seems to work. The contents are read-only, I wonder is there a way to make them writeable?

Matt
moonfish
Posts: 5
Joined: Tue Jul 21, 2020 3:17 pm

Re: Mounting the pupsave file

Post by moonfish »

mikewalsh wrote: Sat Jul 25, 2020 9:10 am Hi, Matt. And Image to the NEW Puppy Forums..!

Umm; o-kayyy....

Question (if I may?):- What is it you want to be able to do? Do you simply want to be able to open the save-file in order to look at things.....or do you wish to be able to access/modify stuff?

Reason I'm asking is because if it's personal data/files & stuff you're after, it might be worth your while creating a "shared" data partition. This could then be more easily mounted, accessed/modified and re-saved, and still be easily accessible from all Linux systems...

Let us know what you'd like to do, please.


Mike. ;)
Hi Mike, thanks for your reply. At the moment it was mainly curiosity but I would like to be able to do various things, possibly editing some configuration files.

I would also like to be able to modify the "kernel.sysrq" parameter but I think this is set somewhere in the main sfs file rather than the pupsave file. I have been able to mount the sfs file using squashfuse but have not tried editing it yet,

Matt
User avatar
bigpup
Moderator
Posts: 6414
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 762 times
Been thanked: 1326 times

Re: Mounting the pupsave file

Post by bigpup »

I wonder if you totally understand how the save is used in Puppy.
The only thing that is in the save, is something that has changed.
Change a setting.
Add a program.
Delete something.
Etc......

If something has not changed, from how it was originally, when you first booted Puppy.
It will not be in the save.
Nothing there to put into the save.

When you look at the contents of the save.
It will only have stuff that has changed or been added to Puppy.

Example:
If you freshly booted Puppy for the first time.
Made no changes.
Shutdown making a save.
That save would have nothing in it, because nothing changed.

Forum Global Moderator
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

moonfish
Posts: 5
Joined: Tue Jul 21, 2020 3:17 pm

Re: Mounting the pupsave file

Post by moonfish »

Hi bigpup, thanks for your reply. I am not sure if I should start another thread because I would like to change a kernel parameter. I tried this in puppy live, editing /etc/sysctl.conf. The edit persisted but did not affect the behaviour of the kernel. Matt
User avatar
bigpup
Moderator
Posts: 6414
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 762 times
Been thanked: 1326 times

Re: Mounting the pupsave file

Post by bigpup »

I suggest start a new topic.
Tell us exactly what you are trying to have happen.
What the problem is.

Forum Global Moderator
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
mikewalsh
Moderator
Posts: 5666
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 605 times
Been thanked: 1740 times

Re: Mounting the pupsave file

Post by mikewalsh »

@ moonfish:-

You need the assistance of some of our more veteran coders. Unfortunately, nowhere near everybody has migrated across from the old Murga-Linux forum yet - which is currently inaccessible.

Some simply may not yet know what's happened; these guys only get on the forum occasionally, sometimes weeks or even months between visits. Others may have found Murga-Linux is down, but not been able to find the new forum yet... No way of knowing, y'see.

Some of the current residents may be able to help, it's true. Myself, booting/start-up/kernel-related stuff is a wee bit above my 'pay-grade', I'm afraid.

Hang in there. We'll help if we can, though you may have to be patient; you've not exactly picked a good time for this, because the forum switch, though "planned for", didn't have a firm date.....and the old forum's sudden demise caught us a bit flat-footed. We're still in the middle of re-organising/setting stuff up.....


Mike. ;)

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

williams2
Posts: 1026
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 291 times

Re: Mounting the pupsave file

Post by williams2 »

$ sudo mount bionicpup64save-matt2.4fs /mnt/tmp
This should mount the 4fs file so that it is writable.
If it mounts read only, it may need a file system check (fsck)

Code: Select all

$ sudo mount -rw -o loop bionicpup64save-matt2.4fs /mnt/tmp
or
$ sudo mount -o rw,loop bionicpup64save-matt2.4fs /mnt/tmp
I would also like to be able to modify the "kernel.sysrq" parameter but I think this is set somewhere in the main sfs file
You can set/change the sysrq parameter any time you like, like this (crude but effective)

Code: Select all

# cat /proc/sys/kernel/sysrq
0
# echo 128 > /proc/sys/kernel/sysrq
# cat /proc/sys/kernel/sysrq
128
See: https://www.kernel.org/doc/html/latest/ ... sysrq.html

Then you should be able to press alt+sysreq then b to force a reboot.
(like holding the power switch for more than 5 seconds.)

Or you can use sysctrl.

I'm not sure if /etc/sysctl.conf is being used by Puppy.
A sysrq line would probably look something like:

Code: Select all

kernel.sysrq = 128
It won't work if sysrq was not enabled when the kernel was compiled.
In BionicPup64 8.0 it seems to be enabled.

Code: Select all

grep SYSRQ /etc/modules/DOT*
If echo 128 > /proc/sys/kernel/sysrq (or whatever number you want)
works in a text terminal, you could put it in
/etc/rc.d/rc.local
so that it executes every time Puppy boots.
Or maybe in a script in /root/Startup

See https://www.kernel.org/doc/html/latest/ ... sysrq.html
User avatar
rockedge
Site Admin
Posts: 5829
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2081 times
Been thanked: 2178 times
Contact:

Re: Mounting the pupsave file

Post by rockedge »

Hello williams2,

Great information, very helpful, thank you for the tip. :thumbup:
User avatar
mikewalsh
Moderator
Posts: 5666
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 605 times
Been thanked: 1740 times

Re: Mounting the pupsave file

Post by mikewalsh »

williams2 wrote: Sat Jul 25, 2020 6:28 pmI'm not sure if /etc/sysctl.conf is being used by Puppy.
AFAICT, it only gets pressed into use when Puppians bother to set up "swappiness".....


Mike. ;)

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

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

Re: Mounting the pupsave file

Post by rockedge »

Are CTRL-ALT-DEL or CTRL-ALT-BACKSPACE keyboard short cuts to wmreboot and the exit X routine?

Or what mechanism operates these functions in Puppy Linux?
williams2
Posts: 1026
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 291 times

Re: Mounting the pupsave file

Post by williams2 »

ctrl+alt+backspace is a key combination that if pressed, kills Xwindows directly, bypassing shutdown scripts.

So if you have work in geany or abiword that has not been saved and X is killed by pressing ctrl+alt+backspace, then that work has probably been lost.

The key combination ctrl+alt+backspace is usually enabled or disabled in xorg.conf
It can also be enabled or disabled using setxkbmap, no need to restart X.

ctrl+alt+del is enabled in /etc/inittab

Busybox's init supposedly does not use run levels.
The full version of init usually disables ctrl+alt+del for the higher run levels.
Busybox seems to disable ctrl+alt+del if Xwindows (Xorg) is running.

So ctrl+alt+del does nothing if X is running.
If X is not running, that is, you are seeing the initial text console,
then pressing ctrl+alt+del executes /sbin/reboot
In Puppy, reboot is a script that eventually executes "busybox reboot"

So if you need to shutdown urgently, you can
press ctrl+alt+backspace to kill X, then
press ctrl+alt+del to reboot.

It's better to shutdown more gently than using ctrl+alt+backspace to kill X.

sysrq just configures what happens if alt + the sys req keys are pressed.
If it's configured to reboot the machine, it does it brutally, without unmounting drives and is not recommended. It's intended for an emergency shutdown. It's like holding the power button for more than 5 seconds.

By the way, if you are at the boot screen (grub or isolinux etc) before Puppy or MS Windows has started, you can reboot by pressing ctrl+alt+del.
And you can turn off the computer by pressing and releasing the power button.
williams2
Posts: 1026
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 291 times

Re: Mounting the pupsave file

Post by williams2 »

what mechanism operates these functions in Puppy Linux?
ctrl+alt+backspace is a key combination that Xwindows (Xorg) responds to by shutting itself down. It is built into Xorg.

ctrl+alt+del is a key combination that (busybox) init responds to by running /sbin/reboot
(because it is configured that way in /etc/inittab)
moonfish
Posts: 5
Joined: Tue Jul 21, 2020 3:17 pm

Re: Mounting the pupsave file

Post by moonfish »

Hi everyone, thanks for your answers. With regards to using the magic sysrq keys I have read that the "reisub" sequence is a way to shutdown gracefully (http://blog.kember.net/articles/reisub- ... x-restart/). Matt
williams2
Posts: 1026
Joined: Sat Jul 25, 2020 5:45 pm
Been thanked: 291 times

Re: Mounting the pupsave file

Post by williams2 »

The contents are read-only, I wonder is there a way to make them writeable?
If you are running as an unprivileged user as opposed to user root in your other not-Puppy distro,
most of the files in the savefile file system will not be accessible to the unprivileged user, because the files do not belong to you, they belong to root and maybe to spot.

To access the files you really need to be root, like this:

Code: Select all

sudo su -l
or this:

Code: Select all

sudo su
The -l changes your home dir to /root, otherwise running a program like gedit or kedit as root can overwrite your config files with ones belonging to root.

It's easier to access the files from Puppy.
Post Reply

Return to “Beginners Help”