Pupsave Creation at First Shutdown [Alternative Solution]

Please post any bugs you have found
Message
Author
musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

Pupsave Creation at First Shutdown [Alternative Solution]

#1 Post by musher0 »

Dec. 7, 2013. Please get latest version from here:
http://murga-linux.com/puppy/viewtopic. ... ost#742075
~~~~~~~~~~~~
Edit, Nov. 30, 2013. Effort to re-organize this initial post.
For the solutions and other comments that
used to be posted here, please read down from:
http://murga-linux.com/puppy/viewtopic. ... ost#740519
~~~~~~~~~~~~~~~~~~~~~~
What follows is the "thinking process".
~~~~~~~~~~~~~~~~~~~~~~
Edit: Please see message below this one. It seems that the wmreboot
and wmpoweroff scripts from wary-5.5 are the ones that make the
difference, since the /etc/rc.shutdown scripts from CE-3 and wary-5.5
are identical. See illustration.

musher0
~~~~~~~~~~~~~~~~~~~~~~
Hello, all.

Here's a copy of an exchange I just had with 01micko concerning said
bug. It explains the faulty process, and the solution, which is provided
as a pet file.
~~~~~~~~~~~~
Hi, Mick.

Regarding the "-1Mb" pupsave file bug, here is a report of the process.
The solution is attached.

The problem with the rc.shutdown script was the same for CLI and GUI modes.

jwm menu -> reboot

Then, in the script itself, the steps are:
Save -> admin -> ext2 -> filename -> Normal -> [Missing Size Step] -> Yes, save

In this "summary" panel, notice the size as -1 Mb.

Copying /etc/rc.d/rc.shutdown from wary 5.5 to CE-3 Puppy
/etc/rc.d/rc.shutdown solves the problem. The wary 5.5 version shows
correctly the Size step, in both CLI and GUI mode. Please find a corrective
pet attached.

Given that a solution was found, I did not run a diff reading on the two scripts.

As far as I can tell, having an active diskette bay has nothing to do with it.

I'll be posting this solution in a "bug" thread and put a link to it in the CE thread.

Best regards.

musher0
~~~~~~~~~~~~~~~
From: 01micko
To: musher0
Posted: Today, at 03:29
Subject: Re: shutdown bug
Ok, thanks for that.

I'll diff it and compare. I'll also send it off to Karl Godt because he is working on shut down

Cheers,

Mick

PS> my problem was a corrupt woof build which now I can't reproduce, nothing to do with floppy, except that probing a non existent floppy takes too long.
~~~~~~~~~~~~~~~
Have great day!

musher0
Attachments
RcShutdown-GoodWary-5.5.pet
(12.31 KiB) Downloaded 448 times
strange.jpg
(27.74 KiB) Downloaded 676 times
Last edited by musher0 on Sat 07 Dec 2013, 15:34, edited 28 times in total.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#2 Post by musher0 »

Additional note:
~~~~~~~~~~
Hello again, all.

It seems that rather the wmreboot and wmpoweroff scripts from
wary 5.5 (included in this pet archive) make the difference.
In any case, all three scripts are included in the above pet.
Karl_Godt and o1micko are also on the case and should
report shortly.

Thanks for your understanding.

musher0
Last edited by musher0 on Sat 23 Nov 2013, 18:33, edited 1 time in total.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#3 Post by musher0 »

The problem:
Attachments
pupsave_problem-negative_size.JPG
(39.28 KiB) Downloaded 728 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#4 Post by musher0 »

Hello again, Puppyists.

I did a couple more tests, and I don't know what to tell you anymore... :oops:

Sometimes, installing the pet above did solve the problem, and the
pupsave file was created. At other times, it wasn't, with the same
replacement files loaded.

Is it a matter of the speed of entry of the variables in the successive
panels? (I can be a very fast typist...) I'm at a loss for a logical
explanation. Hopefully Karl or Mick will come up with something.

In any case, there remains the solution of "implanting" a ready-made
pupsave file, and that works without fail. Please see how-to and download
archive here:
http://murga-linux.com/puppy/viewtopic. ... ost#737783
You'll have to adapt the name of the pupsave files according to the name of your Puppy.

BFN.

musher0
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#5 Post by musher0 »

Hello again.

For the sake of thoroughness, here are diff transcripts concerning
wmreboot and wmpoweroff for CE-3 and wary 5.5. Since it's the first
time I've used the Linux diff, I hope the significant information is
there. I'm used to parallel reading in other contexts (FreeDOS and
proof-reading/text-editing), but this is Martian to me. Hopefully this
will mean something to someone.

That's my maximum testing capacity. I can go no further. Someone
with more advanced skills will need to tackle and hopefully resolve
this problem. BFN.

musher0
~~~~~~~~~~~~~~~~
--- wmpoweroff-wary55
+++ wmpoweroff-CE3
@@ -5,8 +5,6 @@
#120216 offer to set default language in initrd.
#130221 return code 255 to abort shutdown.

-killall stalonetray;rox -b= # ajout par musher0, 20 août 2013
-#
. /etc/rc.d/PUPSTATE
if [ $DISPLAY ];then #paranoid precaution, check X still running

~~~~~~~~~~~~~~~

--- wmreboot-wary55
+++ wmreboot-CE3
@@ -5,8 +5,6 @@
#120216 offer to set default language in initrd.
#130221 return code 255 to abort shutdown.

-killall stalonetray;rox -b= # ajout par musher0, 20 août 2013
-#
. /etc/rc.d/PUPSTATE
if [ $DISPLAY ];then #paranoid precaution, check X still running
(Both done with the diff -abd parameters.)
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#6 Post by musher0 »

Hello, Puppyists.

I just tested 01micko's latest slacko-5.6.1 and discovered that if I
replaced this slacko's rc.shutdown script in /etc with the one in rerwin's
latest sulu, I got a pupsave file. Two actually, one created from the GUI
and one created from the CLI. Now, that's service! 8) :lol:

So please find attached this replacement rc.shutdown file.
Replace/use at your own risk.

BFN.

musher0
Attachments
rc.shutdown_sulu.tar.bz2
(15.9 KiB) Downloaded 375 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#7 Post by Karl Godt »

Yeah, the /usr/sbin/shutdownconfig is something new , and I still have to find out, which parts of the

DIALOGEXE="pupdialog"
DIALOGEXE2="Xdialog"

can be aborted by pressing ESC , so it gives a return value of likely 255 like the blue-screen dialog .

/usr/bin/wmreboot has code as

if [ $PUPMODE -eq 5 ];then #first shutdown.
shutdownconfig #dlgs for creating save-file.
#...writes results to /tmp/shutdownconfig_results, which /etc/rc.d/rc.shutdown reads.

[ $? -eq 255 ] && exit #abort shutdown. 130221

so would likely exit without confirmation message .

/usr/sbin/shutdownconfig can be run in rxvt terminal without actually not shutting down in the end .
So then it would be possible to examine the created files in /tmp :


orange_gtkrc${$}
shutdownconfig_deftag
tag.txt
shutdownconfig_encrypt_password
shutdownconfig_results

sizetag.txt
rc.shutdown_pupsave_fs
schoices.txt
ntfsmnterr.txt
savedlg



For now I suspect locale / LC_ALL settings somehow , since at the top of
shutdownconfig it is

if [ ! $DISPLAY ];then
export LANG=C #110928 console shutdown using 'dialog', disable i18n.
else
export OUTPUT_CHARSET=UTF-8
fi


and Lupu wasn't gettext 'ed at that time .
«Give me GUI or Death» -- I give you [[Xx]term[inal]] [[Cc]on[s][ole]] .
Macpup user since 2010 on full installations.
People who want problems with Puppy boot frugal :P

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#8 Post by musher0 »

Finally. Help from Above! ;)
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#9 Post by Karl Godt »

Yeah, Man !!

This applies to everything Puppy related :

grep -I -H -m3 WORD /usr/sbin/*

like

grep -I -H -m3 'shutdown' /usr/sbin/*

should give you some filenames that contain shutdown .

/usr/sbin/* because most of the Puppy scripts are there .

But few are in /bin and /sbin and /usr/bin and /usr/local/bin .

So grep there too, if unsure .

Then open the files in geany and become enlightened .

And post suggestions / patches .

HTH a bit .

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#10 Post by Flash »

Would this bug affect multisession Puppy?

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#11 Post by Karl Godt »

Since MS does not use a save-file, I guess not .

But by far am no Multi-Session expert . My current machine has no CD drive .

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#12 Post by musher0 »

Flash wrote:Would this bug affect multisession Puppy?
Dunno, we'll have to test the DVD session-saving script too!
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#13 Post by musher0 »

Flash wrote:Would this bug affect multisession Puppy?
Nope. :) We don't get the gdk bug either on second boot.
Attachments
CD_session_2nd_boot.jpg
(52.01 KiB) Downloaded 667 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#14 Post by Karl Godt »

What's that's for a high load ? P4-Cpu while performing mtpaint ?
:lol:

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#15 Post by 01micko »

musher0

From your screeny, there is a first bug which doesn't tell us the filesystem of the partition.. that will throw a mount error and therefore that filesystem will be reported as 0 (zero), then I think there is some weird thing in there that subtracts 1M for some reason. Barry's procedural approach is not very friendly to follow, I'd much rather decipher Shinobar's code, where everything is broken down into functions, much more maintainable.

Please tell us what filesystem is on sda2? Maybe the driver isn't loading? (not likely if it's linux, I can't tell from the reports you sent ). One remote possibility is that probepart is misreporting the filesystem (possibly a locale error? or do you do this with an English based locale? Oh, I guess you do as the other screeny, in GUI, has English as the displayed language.. just trying to eliminate possibilities).

Also, if you can produce a successful save just by running shutdownconfig in terminal can you post the log at /tmp/shutdownconfig_results

Thank you.
Puppy Linux Blog - contact me for access

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#16 Post by musher0 »

Hi, Mick.

In answer to your questions above:

My sda2 partition is an ext3 partition. It is located on an 1 Tb external
e-sata disk.

The French translations are not installed at this point; but I routinely tick
fr_CA as the chosen locale in the first boot panel.

In some try-outs, I remember that I used the keyboard wizard to modify
the xkeyboard settings further, to microsoftinet, qc and fr-legacy.

I'll have to redo a first boot to get that "shutdownconfig_results" file.

You mention shinobar. He has produced a shutdown script as well, did he?
Any problems with his? Substituting those scripts would be too easy, eh?

Bye for now.

musher0
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#17 Post by musher0 »

Hello again, Mick.

You wrote:
> that will throw a mount error and therefore that file system will be
reported as 0 (zero), then I think there is some weird thing in there that
subtracts 1M for some reason.


That IM is for safety, for wiggle-room. That "weird thing" is an "expr"
calculation command. I saw it and refrained from removing the line...

It's obvious: if the script thinks there is no file system and still substracts
1M from it... The anti-matter Puppy begins!

You have a falcon's eyes, my friend! Thanks :)

We continue. BFN.

musher0
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#18 Post by 01micko »

Please run probepart

Here is my sample output, with a usb hdd plugged too, note sda3 is the extended partition

Code: Select all

# probepart
/dev/sda1|ntfs|409432526
/dev/sda2|ntfs|614197080
/dev/sda3|none|2
/dev/sda5|ext4|307468034
/dev/sda6|ext4|307194866
/dev/sda7|ext4|254695424
/dev/sda8|ext4|56399872
/dev/sda9|swap|4112384
/dev/sdb1|ntfs|602565956
/dev/sdb2|ext4|22571324

I suspect that is ok..

Also, from a live boot I want..

Code: Select all

cat /etc/rc.d/PUPSTATE
..to make sure the initrd is doing it's job, it might be a busybox (initrd version) or even a timing problem.
Puppy Linux Blog - contact me for access

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#19 Post by musher0 »

01micko wrote:Please run probepart

Here is my sample output, with a usb hdd plugged too, note sda3 is the extended partition

Code: Select all

# probepart
/dev/sda1|ntfs|409432526
(...)
I suspect that is ok..

Also, from a live boot I want..

Code: Select all

cat /etc/rc.d/PUPSTATE
..to make sure the initrd is doing it's job, it might be a busybox (initrd version) or even a timing problem.
Hi, Mick.

Please find attached the requested files and results. The archive also
contains a screeny of console information from the actual shutdownconfig
run.

I'd like to add that, this time, booting from a CD, I had no problem
whatsoever getting a 32 Mg pupsave file to be created.
( <-- This info
might be important for other users who initially experience the bug. <-- )

I then rebooted from the grub4dos interface, loading the freshly created
2fs file: the gdk bug was not present, and the desktop showed normally.
I did another boot after requesting that the devx sfs file be loaded, and
again success, everything was as it should.

Many thanks for your interest in this bug.
I remain at your disposal. TWYL.

musher0
Attachments
debogage.tar.bz2
(180.59 KiB) Downloaded 337 times
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#20 Post by 01micko »

Can you boot from grub pfix=ram and supply the cat /etc/rc.d/PUPSTATE please? Don't worry about trying to make a save, I just want to see that :-

Code: Select all

PDEV1='sda2'
DEV1FS='ext3'
I'm thinking more and more it's an issue with your hardware detection in the initrd... as said, perhaps timing.

If that's all good it must be the mathematics in shutdownconfig.

EDIT: btw, the disktype error is trying to probe the floppy when either there is no drive or no floppy disk inserted, something I want to deprecate, or at least make optional.
Puppy Linux Blog - contact me for access

Post Reply