mksquashfs doesnt work with puppy.sfs mainfile!

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

mksquashfs doesnt work with puppy.sfs mainfile!

Post by Mike3 »

So I wanna take away some files from the sfs files.

So I do the unsquashfs to the main puppy.sfs file in the home folder of the USB, no problem but then when I do the mksquash to the squashfs-root, the usquashed folder it seems to work, but then when replacing the original puppy.sfs with it it causes the OS to not be able to start.

Basically when I restart the OS, it seems to start fine but then crashes before the OS is loaded.

This happens even when I do not take away any files at all. I actually tried just to unsquashfs the main puppy.sfs file and then to do mksquashfs directly to the unsquashed file, that then resulted in a larger file than the original sfs, that the caused the OS not to start as described.

How do I fix this? I used to do this quite often, take away files and then do the mksquashfs thing and replace just renamed the same as the old puppy.sfs main file but now it doesn't work, why?

Last edited by Mike3 on Fri Apr 29, 2022 2:01 am, edited 1 time in total.
User avatar
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 119 times

Re: mksquashfs doesnt work with puppy.sfs mainfile!

Post by taersh »

Most Puppies have a right-click option: dir2sfs.
Though, I never used Slacko, so can't say if it is in there also.

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

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

Re: mksquashfs doesnt work with puppy.sfs mainfile!

Post by williams2 »

not syncing means that the kernel was not trying to write to the hard drive when it crashed.

attempting to kill init means that the kernel was trying to find and execute /sbin/init
or similar, but couldn't find it.

/sbin/init would be in a file named something like
puppy_slacko_6.9.9.9.sfs

You pic shows that the fdrv and the zdrv and the adrv sfs files were found and loaded
but the puppy_slacko sfs file was not loaded.

The puppy_slacko_6.9.9.9.sfs should be in the same place as the other (fdrv,zdrv,adrv) files,
and it must have the exact correct name: puppy.sfs will not work.

If you renamed puppy_slacko_6.9.9.9.sfs to adrv_slacko_6.9.9.9.sfs
that won't work either.

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

Re: mksquashfs doesnt work with puppy.sfs mainfile!

Post by Mike3 »

@ taersh, I couldn't see any dir2sfs option when right clicking the unsquashed file, squashfw-root. Just open with, properties and the like.

@ williams2. Actually it did load the puppy.sfs main file before it loaded the adrv.sfs, zdsv.sfs. It just didn't show on the photo I took because everything did not fit on the screen, so

The main puppy.sfs file that I made changes to was in the same place as the

Loading the 'fdrv.sfs fdrv file... copying to ram done

Above this line there was a line that said:

Loading the 'puppy.sfs slacko file... copying to ram done

And I checked the unsquashed file and it does contain the:

/sbin/init

file.

What I did was I did unsquashfs to the puppy_slacko64_6.9.9.9.sfs file. The unsquashed file was put in a new directory I made:

mkdir -p /mnt/sdb1/u/p

, so in the p directory under the sdb1 directory which is the USB directory where the puppy...sfs, adrv.sfs, zdrv.sfs files are located.
I then did the mksquashfs command in terminal emulator to that file in the u directory, the unsquashed main puppy.sfs file.

I put the mksquash-ed file, the sfs file that was the result of this in:

/mnt/sdb1/u

directory.

Then I renamed this file to:

puppy.sfs

Then I put this file in the sdb1, /mnt/sdb1 directory, where all the sfs files are and removed the old:

And then I get the crash when attempting to start. But when I put back the original puppy_slacko64_6.9.9.9.sfs file in the mnt/sdb1 directory then it works again. And they should be the same files since I even tried to unsquash the main puppy.sfs file the mksqaush it without removing it but it still doesn't work.

Actually when I got a new computer for some reason the mouse did not work with puppy system I had made. But when starting puppy in safe mode without X or RAM mode it works, so I installed puppy on a USB from this mode and then the mouse function worked on this new, or actually second hand used computer.

Maybe there is some file/files missing for some reason that made unsquasfs or mksquashfs not work properly?

Last edited by Mike3 on Fri Apr 29, 2022 2:03 am, edited 1 time in total.
User avatar
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 119 times

Re: mksquashfs doesnt work with puppy.sfs mainfile!

Post by taersh »

What's the result, if you type into the terminal:

Code: Select all

which dir2sfs

???

root# which dir2sfs
/sbin/dir2sfs
root#

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

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

Re: mksquashfs doesnt work with puppy.sfs mainfile!

Post by bigpup »

Maybe there is some file/files missing for some reason that made unsquasfs or mksquashfs not work properly?

I assume you are doing this in a 64bit, some version of Puppy Linux?
Which one?

slack64_6.9.9.9 was a testing and development version of what became Slacko64 7.0
Not sure if it had every bug fixed yet.
Not sure if 01micko did the sfs build exactly as it normally is done.
He could have put something in it not exactly correctly for a normal sfs.

What exactly are you removing from the slacko64_6.9.9.9.sfs?

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
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 119 times

Re: mksquashfs doesnt work with puppy.sfs mainfile!

Post by taersh »

puppy_slacko64_6.9.9.9.sfs

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

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

Re: mksquashfs doesnt work with puppy.sfs mainfile!

Post by bigpup »

I am asking which version of Puppy Linux are you running unsquashfs and mksquashfs in, that is booted, and operating the computer?

Check my earlier post.
I added to it.

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
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 119 times

Re: mksquashfs doesnt work with puppy.sfs mainfile!

Post by taersh »

Here's the dir2sfs script from Bioni64.
It should work in Slacko, if there's no dir2sfs script existing.
For testings you can put it somewhere at ext partition and drag'n'drop the extracted directory onto that script.

Attachments
Dir2SFS.tar.gz
(581 Bytes) Downloaded 54 times

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

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

Re: mksquashfs doesnt work with puppy.sfs mainfile!

Post by Mike3 »

taersh wrote:

What's the result, if you type into the terminal:

Code: Select all

which dir2sfs

The result is:

/sbin/dir2sfs

But I can't see it as a right click option. Should I be able to easily hw does it show up normally when rightclicking? Can I run dir2sfs from terminal or in some other way?

It worked before no problem, using puppy linux, but that was on another computer.

On this computer I also have the problem that often the large letter A is not properly displayed on the screen for some reason in some apps. And then the mouse did not work when moving from the old computer to this second hand computer.

Last edited by Mike3 on Fri Apr 29, 2022 2:04 am, edited 3 times in total.
User avatar
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 119 times

Re: mksquashfs doesnt work with puppy.sfs mainfile!

Post by taersh »

Yes!
Example:

Code: Select all

dir2sfs /mnt/sdc2/BuildPuppy/ArtStudio64/adrv-edit

You can do a symbolic link from /sbin/dir2sfs to /root/.config/rox.sourceforge.net/SendTo/.inode_directory
After that it should appear in the right-click menu actions when right-clicking a directory.

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

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

Re: mksquashfs doesnt work with puppy.sfs mainfile!

Post by Mike3 »

taersh wrote: Mon Apr 18, 2022 7:05 pm

Yes! Example:
dir2sfs /mnt/sdc2/BuildPuppy/ArtStudio64/adrv-edit

So is the /mnt/sdc2/BuildPuppy/ArtStudio64/adrv.edit that appears after the dir2sfs command just the pathway to the file one wants to make a sfs file? Would it in my case then be something like:

disr2sfs /mnt/sdb1/u/p/, since /mnt/sdb1/u/p is where I put the usquashedfs file?

User avatar
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 119 times

Re: mksquashfs doesnt work with puppy.sfs mainfile!

Post by taersh »

Yes.
It's the path to the directory which contains the extracted files.

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

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

Re: mksquashfs doesnt work with puppy.sfs mainfile!

Post by mikeslr »

Just to make certain you aren't making a fundamental mistake.

Right-Clicking a folder from within it doesn't generate a popup-menu with the dir2sfs option. You have to be viewing the folder as a folder and place your mouse cursor ON the folder.

By the way, amethyst (in his former life as nic007) has provided several tools for automating what you're trying to accomplish; wrapping them up in one application known as nicOS-Utility-Suite, viewtopic.php?p=12983#p12983. This is it's current GUI:

nicOS-SFS-Editor (Loaded).png
nicOS-SFS-Editor (Loaded).png (31.65 KiB) Viewed 1201 times

The "6: nicOS-SFS-Editor (Loaded)" will copy into RAM or to a folder on storage your 'base.sfs' --in your case the one named puppy_slacko_6.9.9.9.sfs-- or any component SFSes starting with adrv thru zdrv*. You can make any modifications to that copy. Then clicking OK will repackage the modified SFS.

Those modifications would have to be done manually: perhaps running pfind on the 'work-folder' to locate all files you no longer need; if you know you no longer need them.

An easier way is to use Menu>Setup>Remove Builtin packages. That doesn't actually remove them: just writes a 'white-out' so that links to them aren't followed. Remove Builtins has the advantage of warning you if removal might break something and/or that some other packages might no longer be needed. Once you've 'removed builtins' executed a Save and Rebooted you can run the "3: nicOS-Remaster Classic" which will repackage your 'base.sfs' without the removed application(s).

* I haven't used it. But the "8th" choice --Right-Click Tools, includes one named nicOS-SFS-Editor(RightClick). I think it will work with any SFS.

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

Re: mksquashfs doesnt work with puppy.sfs mainfile!

Post by bigpup »

It worked before no problem, using puppy linux slack 64 bit version 6.9.9.9, but that was on another computer.

On this computer I also have the problem that often the large letter A is not properly displayed on the screen for some reason in some apps. And then the mouse did not work when moving from the old computer to this second hand computer.

There may actually be something broken on this computer.
Everything you are doing is using the computers RAM, motherboard, hardware interfaces, etc.....

Something as simple as internal connections being corroded or loose.
A good test of the memory using memtest86 would show for sure if RAM was OK.
viewtopic.php?t=159

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

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

Re: mksquashfs doesnt work with puppy.sfs mainfile!

Post by TerryH »

Mike3 wrote: Mon Apr 18, 2022 7:17 pm
taersh wrote: Mon Apr 18, 2022 7:05 pm

Yes! Example:
dir2sfs /mnt/sdc2/BuildPuppy/ArtStudio64/adrv-edit

So is the /mnt/sdc2/BuildPuppy/ArtStudio64/adrv.edit that appears after the dir2sfs command just the pathway to the file one wants to make a sfs file? Would it in my case then be something like:

disr2sfs /mnt/sdb1/u/p/, since /mnt/sdb1/u/p is where I put the usquashedfs file?

I'd take a guess that you are not re-squashing the correct directory level, which is probably why the puppy.sfs is loaded, but then fails to find the /sbin/init after it is loaded.
I think this command:
disr2sfs /mnt/sdb1/u/p/
should be something like this instead:
disr2sfs /mnt/sdb1/u/p/actual-unsquashed-directory

Just guessing though.

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

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

Re: mksquashfs doesnt work with puppy.sfs mainfile!

Post by mikewalsh »

@Mike3 :-

Myself, I keep a separate directory for creating SFSs; simply called 'MAKE-SFS'. Anything I want to create an SFS of, I place the complete directory in here, then run

Code: Select all

mksquashfs ./name-of-the-app ./name-of-the-app.sfs

.....from a terminal opened within that directory. Works every time.

And then I move the thing to wherever it needs to be. It's never a good idea to do this kind of thing 'in-situ', especially not where your necessary boot files reside. Just one single grammatical/spelling error, and you could end up wiping out your install....

(Much as I know some of you seem to like complication for its own sake, in all honesty the K.I.S.S principle works best for all situations. Why make life harder than it needs to be?)

Mike. ;)

User avatar
taersh
Posts: 951
Joined: Tue Jul 07, 2020 11:13 pm
Location: Germany
Has thanked: 53 times
Been thanked: 119 times

Re: mksquashfs doesnt work with puppy.sfs mainfile!

Post by taersh »

Did you try to use dir2sfs via terminal?

If you have Uextract and PackIt installed, you can easily extract and create .sfs files - plus many other archive types.
Both of them should be available on the forum.

My Music:
https://soundcloud.com/user-633698367
Using my own build of Bionic64
The far-left is as fascist as the far-right is!

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

Re: mksquashfs doesnt work with puppy.sfs mainfile!

Post by mikeslr »

As I wrote above, I haven't used the nicOS-Utilities-Suite's SFS-Editor (Right-Click). That's because for 'ordinary' SFSes, like MikeWalsh I copy the ones I want to modify to a distinct folder. Then like taresh I use Uextract (via Right-Click) to extract them; make the modifications, then use packit (via Right-Click) to repack the modified SFS.
Or in a distinct folder, I Right-Click>New Directory> give it a name, e.g. my-app. Then Right-Click the SFS-to-be-modified, select "View" and copy the entire contents of the window that opens into the 'my-app' folder. Make my modifications to the contents of that folder. Then either Right-Click it and run Packit, or Right-Click it and run dir2sfs (or dir2pet or create a pet package).

Any of the techniques which have been mentioned on this thread can be used to modify even a 'base' file. Over the almost 19 years of Puppy Linux's existence Devs and fans have published many tools to work with packages and discussed different techniques.

Emphasized was making use of a distinct folder. Otherwise it is too easy to make a scrivener's error: something I'm very prone to do.

User avatar
amethyst
Posts: 2419
Joined: Tue Dec 22, 2020 6:35 am
Has thanked: 57 times
Been thanked: 506 times

Re: mksquashfs doesnt work with puppy.sfs mainfile!

Post by amethyst »

mikeslr wrote: Tue Apr 19, 2022 2:21 pm

As I wrote above, I haven't used the nicOS-Utilities-Suite's SFS-Editor (Right-Click). That's because for 'ordinary' SFSes, like MikeWalsh I copy the ones I want to modify to a distinct folder. Then like taresh I use Uextract (via Right-Click) to extract them; make the modifications, then use packit (via Right-Click) to repack the modified SFS.
Or in a distinct folder, I Right-Click>New Directory> give it a name, e.g. my-app. Then Right-Click the SFS-to-be-modified, select "View" and copy the entire contents of the window that opens into the 'my-app' folder. Make my modifications to the contents of that folder. Then either Right-Click it and run Packit, or Right-Click it and run dir2sfs (or dir2pet or create a pet package).

Any of the techniques which have been mentioned on this thread can be used to modify even a 'base' file. Over the almost 19 years of Puppy Linux's existence Devs and fans have published many tools to work with packages and discussed different techniques.

Emphasized was making use of a distinct folder. Otherwise it is too easy to make a scrivener's error: something I'm very prone to do.

My appication does this for you. You right-click any sfs, choose your options, the application will extract the contents to a builder folder, you make your edits there, click ok and the application does the rest. You can use the right-click editor which is part of the suite or the standalone I provided recently (recommended). It's quick!!! viewtopic.php?p=54846#p54846

Post Reply

Return to “Users”