EasyDD - NEW: v5

Miscellaneous tools
Message
Author
User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

EasyDD - NEW: v5

#1 Post by Mike Walsh »

(*Updated packages attached below*)


Afternoon, all.

(Discussion is being transferred here from the 'other' thread:-

http://www.murga-linux.com/puppy/viewtopic.php?t=116430

.....so the subject has its own forum heading from now on. Which makes more sense.)

-------------------------------------------------------------------------------------

As we all know, the 'dd' utility is by far and away the easiest method for 'writing' an .img file to a USB stick, so it can subsequently be booted from. Normally, it's a command-line utility, but due to its potentially destructive nature, and the fact that syntax can be a minefield for the unwary, Barry K has written a script for a simple GUI 'front-end'....which works extremely well, and is nice & easy to use (even for newbies).

This also gives an ongoing read-out of your USB stick's write speeds.....which will give you some idea of how slow (or otherwise) the stick will be in service. Rather neat.

This has been 'transferred' across from the Etcher thread, where it was in danger of getting anonymously buried in the archives..... :lol: It's too useful to let that happen.

------------------------------------------------------------------------------------

After greengeek's ongoing issues in Slacko 560, and my own with the later 'buntu Puppies, I've done a wee bit of experimenting. BK suggested the addition of both 'pupmessage' and 'pupdialog'; research has shown that all these later Woof-CE Pups still use 'pupdialog'.....but 'pupmessage' appears to have been dropped from the mix. The reasoning is probably that gxmessage covers all bases; however, the issues with EasyDD would seem to indicate otherwise.

By the simple fact of adding 'pupmessage' back into /usr/bin, EasyDD now works (at least for me) in all my Pups. My 'kennels' include:-

Tahrpup 606
Racy 5.5
Slacko 560
Precise 571
Bionicpup32- 8.0
DPup 'Stretch'
UPup 'Raring 3992
Xenialpup32 7.5, and
Xenialpup64 7.5

(*Update:- Reworked packages below no longer need 'pupmessage', after Barry modified the script to correctly detect 'gxmessage'.*)

-------------------------------------------------------------------------------

Initial start-up gives you this:-


Image


.....followed by this:-


Image


------------------------------------------------------------------------------

(Updated - 23/05/20) Packages are attached below. There's a RoxApp; a 'self-extracting' portable script, and an AppImage. All use BK's statically-compiled 'dd', are 'no-arch' apps, and will run from anywhere.

By packing these as portables, you only need one of the below, in the format of your choice, since these will run literally anywhere.


Mike. :wink:
Attachments
EasyDD-v5_static-noarch.tar.gz
EasyDD v5 - statically compiled, packed as RoxApp. Unzip; runs from anywhere....
(120.95 KiB) Downloaded 180 times
EasyDD-v5_static-noarch-portable.tar.gz
EasyDD v5 - statically compiled, packed as self-extracting script. Unzip; runs from anywhere....
(125.4 KiB) Downloaded 184 times
EasyDD-v5_static-noarch.AppImage.tar.gz
EasyDD v5 - statically compiled, packed as AppImage. Unzip; runs from anywhere....
(169.84 KiB) Downloaded 207 times
Last edited by Mike Walsh on Sat 23 May 2020, 13:41, edited 3 times in total.

keniv
Posts: 583
Joined: Tue 06 Oct 2009, 21:00
Location: Scotland

#2 Post by keniv »

hi Mike,
Thanks for this. Am using the 32 bit .pet. Can confirm it works on racy 5.5. It also works with puppy precise light 571 which has been recently update. Did not have to do anything to get them to work. It did not work with lucid 5287 even though it contains both pupmessage and pupdialog. Below is the output of running in a terminal.

Code: Select all

# /usr/local/bin/easydd
dd: /lib/libc.so.6: version `GLIBC_2.17' not found (required by dd)
.
I guess glibc is too old. Will also try it with wary 5.5. Will also try to burn a raspian img to an sd card and see if I can boot it on my rasp pi. I have looked at Etcher to do this but could only find 64 bit versions.

Regards,

Ken

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#3 Post by greengeek »

I just want to confirm that the error messages present in the earlier easydd pets (errors regarding missing gxmessage and pupmessage) can be corrected by fixing the typo in line 98 of easydd as follows:

Change from:

Code: Select all

 if which pupmessage >/dev/null ;then MSGEXE='pupmessage'; fi
 if [ ! "MSGEXE" ];then
to:

Code: Select all

 if which pupmessage >/dev/null ;then MSGEXE='pupmessage'; fi
 if [ ! "$MSGEXE" ];then
(missing "$")

This testing was done on Slacko 5.7 but maybe it will also apply to some of those other pups you mentioned.

cheers!

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#4 Post by bigpup »

Barry K wrote:Will work for any .img, including compressed, .img.gz, .img.bzip2, .img.xz, .img.zip, CLI or GUI.
Please confirm something.

This will not work for any installs of Puppy version iso.
The package has to be an image.

Is this correct?

If yes.

Wonder how hard it would be to make it work for installing from an iso :idea:
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
bigpup
Posts: 13886
Joined: Sun 11 Oct 2009, 18:15
Location: S.C. USA

#5 Post by bigpup »

EasyDD 64bit is working for me in Bionicpup64 8.0

Well, it starts up and seems to be running OK.
I guess I need to actually try to install an OS img.
The things they do not tell you, are usually the clue to solving the problem.
When I was a kid I wanted to be older.... This is not what I expected :shock:
YaPI(any iso installer)

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#6 Post by Mike Walsh »

@ bigpup:-

I guess you're aware (as are most of us) that for 'burning'/'writing' an ISO file, it has to be decompressed before doing so, and that this is usually an integral part of the installer process.. This is where many of our newbies come unstuck, since they often try to copy the ISO file 'as is'.

As far as I understand the process, 'dd' copies an exact mirror image of the file in question - literally block-by-block, byte for byte. I think .img files are usually set-up prior to usage, to be in the exact same condition as the 'contents' of an ISO file would be after burning..

Me no expert, but that's my comprehension of things.

I know you've been working hard to get Puppy running on a Chromebook, but just out of interest, try one of Arnold the Bat's 'ChromiumOS' builds, from here:-

https://arnoldthebat.co.uk/wordpress/chromium-os/

These are always in .img format. Either that, or take a look at Barry's EasyOS, as suggested.

-----------------------------

@ keniv:-

Glad to hear it's working for you. And, yes; I think Lucid's glibc will be too old for that specific 'dd' file, since Xenial uses 2.23, I believe. Actually, I'm surprised it's working for you in Racy; in my case, I'm not surprised, since I have Battleshooter's 'glibc-2.20 upgrade' he put together for Racy/Saluki some years ago, so's I could use Chrome......

It could also very well be that libstdc++.so.6 is too old in Lucid. That's another critical system file.

Still, if it works.....don't question it. Be grateful! :D 'If it ain't broke', and all that..... :)

(Please be aware that I'm only responsible for the packaging here. The script is all BK's work. I'm not taking any credit for that..!) :lol:

------------------------------------

@ GG:-

Just out of curiosity, I tried that wee 'modification' myself after you mentioned it. It didn't actually seem to make any difference for me.

Keep me posted as to how you're getting on with this, please. At least, now it has its own dedicated thread, we can keep everything to do with it all in the same place!


Mike. :wink:

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#7 Post by greengeek »

Hi Mike, it won't make a difference if you have already added pupmessage. It only fixes the original problem with failure to detect gxmessage (on systems that don't have pupmessage but do have gxmessage)

It is just a way to avoid adding anything unnecessary.

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#8 Post by BarryK »

greengeek,
You are right, there is a bug in that script. The one here:

http://bkhome.org/files/easydd.gz

However, I am using a later version in EasyOS, it has this comment:

#181220 bug fix.

Which fixes that missing "$" on line 99:

if [ ! "$MSGEXE" ];then #181220
[url]https://bkhome.org/news/[/url]

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#9 Post by BarryK »

I have updated this link with the bugfix:

http://bkhome.org/files/easydd.gz

gxmessage should now be correctly detected, so you don't have to install pupmessage.

Note, pupmessage was created 2012-03-23, and I think should be in pups after that. But then I dropped out of the benevolent dictator role in 2013, so maybe pupmessage only made it into Quirky.

Ah, looking at woof-CE:

https://github.com/puppylinux-woof-CE/w ... on/usr/bin

...pupdialog is there, and so is pupmessage, however pupmessage is only a symlink to gxmessage. So, the CE developers replaced the original script with a symlink. That will still work.

Summary: just apply the bugfix, the missing "$", then no need to install any extra scripts.
[url]https://bkhome.org/news/[/url]

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#10 Post by greengeek »

Mike Walsh wrote:Keep me posted as to how you're getting on with this, please.
Hi Mike, thanks for your glibc coaching in the other (palemoon) thread. Definite progress.

So here is my routine so far for getting easydd started on a pristine Slacko 5.6:
- Followed your instructions for loading new glibc (with one exception):
-- loaded the gcc deps (qty3)
-- loaded binutils
-- loaded glibc-2.20
-- ignored the load GCC step
- Did a restart X
- Loaded your easydd-noarch pet (containing the /bin/dd you derived from xenial)
- Made that /bin/dd executable (otherwise says no dd available)
- corrected the missing $ as per Barry's comments above in easydd line 98/99 (/usr/local/bin/easydd)
- started easydd from utility menu (see pic below)

I have done no testing of easydd functionality yet but feels nice to see it get to the first splash.

If testing works well I may try to build a full pet (including "PRELOAD"??) that allows easydd and glibc deps to be run in one hit on Slacko 5.6

cheers!
Attachments
easydd_Slacko5.6.jpg
(20.7 KiB) Downloaded 1021 times

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#11 Post by Mike Walsh »

Well, now...

I've been attempting to put together a self-contained 'portable' version of EasyDD.....in the same vein as Fredx181's 'portable-FFQuantum'.

This inspired my own portable PaleMoon. I then went one step further, doing the same thing with the SSE-only build of Palemoon 27.9.4 which watchdog assembled; this one has a 'built-in' copy of glibc 2.19 (from Tahrpup, I would guess, or one of the Debians/DPups).

I've got it all assembled. The contents of the 'easydd32' directory look like this:-


Image


'dd' contains the later Xenialpup dd.
'glibc219' is self-explanatory. This is the glibc 2.19 stuff.
'easydd' is the main script from Barry.
'easydd-start' is the launch script which calls in the glibc-2.19 stuff.
'launch' is a modified version of Fred's script which kicks it all off, same as the 'ff' script is what you start FF-Quantum with.

Here's 'launch':-

Code: Select all

#!/bin/sh

#LAUNCHDIR="$(cd "$(dirname "$0")"; pwd)"
LAUNCHDIR="$(dirname "$(readlink -f "$0")")"
#
LD_LIBRARY_PATH=$LAUNCHDIR/:$LAUNCHDIR/dd${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} "$LAUNCHDIR/easydd-start" "$@" 
It looks for the newer Xenial version of dd first, then passes control over to the start-script. Obviously, I don't need the 'mkdir' statement or the -profile-path at the end, since there's no 'profile' involved here.

Here's 'easydd-start':-

Code: Select all

#!/bin/sh
#
export LC_ALL=C
LAUNCHDIR="$(dirname "$(readlink -f "$0")")"
$LAUNCHDIR/glibc219/lib/ld-linux.so.2 --library-path $LAUNCHDIR/glibc219/lib:$LAUNCHDIR/glibc219/usr/lib:$LAUNCHDIR/glibc219/libstdc++:/usr/X11R7/lib:$LAUNCHDIR $LAUNCHDIR/easydd "$@"
This reads the glibc 2.19 stuff into the library path, then is supposed to fire the main script up (this is the modified one Barry posted earlier, doing away with the need for 'pupmessage').

I keep getting this (currently trying it out in one of my external 'work' directories):-

Code: Select all

# /SeaDesk/SeaDesk-2/WORK-2/easydd32/launch
/SeaDesk/SeaDesk-2/WORK-2/easydd32/easydd: error while loading shared libraries: /SeaDesk/SeaDesk-2/WORK-2/easydd32/easydd: invalid ELF header
The only arch-specific items are the glibc stuff, which is 32-bit, and 'dd' (from 32-bit Xenialpup). I'm trying this out in Slacko 560, since I'm trying to figure out a self-contained solution for greengeek.....who runs without save-file or folder. (So it needs to be summat you can just copy over and click on to run.)

Where's
invalid ELF header
.....coming from? 'Cos there's no clues in the terminal; all it refers to is the main script.....which is just a script!

Anyone got any ideas?


Mike. :?

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#12 Post by greengeek »

This PRELOAD stuff is something I've not done before so all I can do is take a stab in the dark:

This message -

Code: Select all

error while loading shared libraries: /SeaDesk/SeaDesk-2/WORK-2/easydd32/easydd: invalid ELF header

seems to be trying to convey that "easydd" is a shared library but that it has an invalid ELF header.

Obviously easydd is just a bash script so why would it be expected to have an ELF header?? My guess is that the preload script referencing easydd is assembled incorrectly somehow - and it is making the easydd-start script put easydd into the PRELOAD library path.

I haven't explained that very well but do you get my drift?

The easydd-start is supposed to say :
"Here are the shared libs to preload: they are called glibc etc, and here is the script i want to run - it's called easydd"

instead it must be saying:
"Here are the shared libs to preload: they are called easydd and glibc etc"

Could it be that $LAUNCHDIR needs to be inside quotes somewhere in that easydd-start syntax?? Is the syntax making it think that the easydd is just part of the part of the library list?

eg: does the last portion:

Code: Select all

:/usr/X11R7/lib:$LAUNCHDIR $LAUNCHDIR/easydd "$@"
need quoted $LAUNCHDIR? such as:

Code: Select all

:/usr/X11R7/lib:"$LAUNCHDIR" $LAUNCHDIR/easydd "$@"
so that it is not looking for :

$LAUNCHDIR $LAUNCHDIR/easydd (a filename containing a space)

Just spitballin' here...

EDIT : - i notice you used more quotes in the launcher script than in the easydd-start script - is that what needs doing in easydd-start too??

Code: Select all

...:$LD_LIBRARY_PATH} "$LAUNCHDIR/easydd-start" "$@" 

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#13 Post by Mike Walsh »

GG:-

Spitballin' is right, I'm afraid.....

I'm not a coder. Nowhere near. I bumble around, modifying bits & pieces of other's scripts, and frequently amaze myself when something actually works.

For Palemoon, it was literally a case of substitution. A new name for the launch script, and substituting Palemoon's bits for Firefox's bits. Oh, it worked.....but I'll be the first to admit that even now, I don't really understand half of what that launch script is actually doing.

Languages were never my strong point.....and Bash, of course, is just another language.

I shouldn't be at all surprised if the preload script is assembled incorrectly.....but I don't know enough about what I'm doing to even take a wild guess at how to correct it.

Terrible thing for a 'geek' to admit, n'est-ce pas? :lol: :shock: :roll:

As for sitting down in front of the screen, and setting out to write a script from the ground up....it's totally beyond me. I don't have the foggiest of where to even start. Unless we're talking very, very simple.

-------------------------

This launch script, once again, was put together via substitution. I'm whistling in the dark, here....seriously! I haven't got a clue what I'm doing, I'm afraid.....but if you think we can try summat else, I'm all ears.

(EDIT:- Just tried your idea of extra quotation marks around the last phrase. Makes no difference.....same error.)

The syntax is exactly the same layout as the launch scripts watchdog has successfully used in several of his 'tweaked' packages; it works fine in my portable version of the SSE-only Palemoon 27.9.4, in watchdog's 'tweaked' FF45esr (which I use in Racy), and the same goes for the tweaked version of SimpleScreenRecorder he built for Lucid (which also worked in Racy), so.....I'm thinking the problem lies elsewhere.

The only arch-specific item, apart from the glibc219 stuff, is the Xenial 'dd'. And that's working fine for me in the self-extracting script I put together.

I DO not know where to look next. And that's just being truthful, mate.

Need some input from a proper 'coder'..! :lol:

----------------------------------------------

I wouldn't like to say how or why watchdog arrived at the script he did for using a second, standalone glibc. But it looks very similar to the one suggested by maximk in a reply to this 10-yr old thread over at stackoverflow.com:-

https://stackoverflow.com/questions/847 ... ingle-host
Another option is running the new ld.so directly, passing it your binary program as a parameter; this will effectively replace ld.so used w/o the need to recompile the program: /path/to/newglibc/ld-linux.so.2 --library-path /path/to/newglibc/lib64:/path/to/newglibc/usr/lib64 /path/to/myapp
I think that's essentially what we're doing (or trying to do) here; running the app/prog/script/whatever by passing it to the 'alternate' ld-linux.so.2 as a parameter.


Mike. :oops:

User avatar
Keef
Posts: 987
Joined: Thu 20 Dec 2007, 22:12
Location: Staffordshire

#14 Post by Keef »

For want of something better to do, I compiled coreutils 8.30 (which contains dd) on a fresh install of Slacko-5.6 no PAE.
Attached is dd which will run happily with easydd.
Originally I just copied the easydd script straight from Easy, and there were no problems with the gui, just dd.

Remove the .gz and stick it in /bin (rename the original first if you wish).
Attachments
dd.gz
(64.16 KiB) Downloaded 228 times

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#15 Post by Mike Walsh »

Hallo, Keef.

Y'know, you've kinda 'beaten me to the punch' here! Ever since we started this a few days ago, I've half considered compiling the latest core-utils to get round this whole glibc business.....but my compiling skills are atrocious, so I'd've probably made a pig's ear out of it anyway. I don't know what it is with Slacko 560; it's a wonderfully stable Pup, but I never had half these problems with its successor, 570, despite them both being based on Slackware 14.0.

The Xenial 'dd' runs fine for me in 560 with the portable, self-extracting script I assembled for EasyDD. Maybe having upgraded my glibc does help; certainly, running 'pristine' (adding 'pfix=ram' to menu.lst), it won't run at all with the original 2.15. & 'dd'.

Just out of curiosity, d'you happen to know the minimum kernel/glibc combo that this latest core-utils will compile against?

Thanks for this, anyroad. I'll see what a self-extracter will run like using this one.

Cheers!


Mike. :wink:

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#16 Post by Mike Walsh »

GG:-

Here you go, Ian. Courtesy of Keef, above (thanks again, mate), here's your choice of either a .pet for EasyDD.....or a 'portable, 'self-extracter'.

The .pet, you'll need to install each session.....but you'll have a Menu entry. The portable, rename it (get rid of the fake .gz), and just click on it. With these things, you can keep 'em on a USB stick, and simply plug it in when you want to use 'em. It's the one I'd recommend.

I've just tested these on a pristine 560, and both work flawlessly. All credit to Keef, of course.....there can't be too many folks who decide to compile the whole of the GNU core-utils package because they're bored..! :D

-------------------------------------------------------------

This isn't just for your benefit, you know. My go-anywhere Puppy, which lives on a 128 GB SanDisk Cruzer 'Blade', is Slacko 560.....chosen for its stability. It's on such a large drive because I have a copy of a fair bit of my personal stuff (music, pix etc.), plus a good selection of movies for when I find myself at a loose end.....

I haven't booted into it for a couple of months; I need to update some other stuff anyway, so this'll get added into the 'mix' at the same time.

Enjoy. Gawd, we look after you, don't we? :lol: :lol:


Mike. :wink:
Attachments
EasyDD_s560-portable32.gz
EasyDD portable' for Slacko 560. Remove the fake .gz, and click-to-run from anywhere....
(51.39 KiB) Downloaded 218 times
EasyDD_v.3_s560-i686.pet
EasyDD .pet for Slacko 560
(54.53 KiB) Downloaded 216 times

keniv
Posts: 583
Joined: Tue 06 Oct 2009, 21:00
Location: Scotland

#17 Post by keniv »

Mike Walsh wrote:@ keniv:-

Glad to hear it's working for you. And, yes; I think Lucid's glibc will be too old for that specific 'dd' file, since Xenial uses 2.23, I believe. Actually, I'm surprised it's working for you in Racy; in my case, I'm not surprised, since I have Battleshooter's 'glibc-2.20 upgrade' he put together for Racy/Saluki some years ago, so's I could use Chrome....
I have glibc-2.20 main C lib installed though I'm now not sure why. I guess it's this that gets easydd working for me in racy 5.5. I also have glibc219_runtime-lucid-20171103 but this was installed to get palemoon to work.

Regards,

Ken.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#18 Post by greengeek »

Mike Walsh wrote:Here you go, Ian. Courtesy of Keef, above (thanks again, mate), here's your choice of either a .pet for EasyDD.....or a 'portable, 'self-extracter'.
....
Enjoy. Gawd, we look after you, don't we?
Champion!! Thanks Mike and Keef. I will be using the pet version - the menu is handy and i like to install software just for the session I am currently running then it gets dumped at shutdown.

With portables i always worry about remnants of caches etc left on the drive containing the utility - but with freshly loaded pets I know its all running in RAM and everything is vaporised at poweroff.

Awesome that it works with a pristine Slacko 5.6 - to me that is a great test of a utility being well crafted. Many thanks for the effort!

In appreciation I have attached a virtual champers and also a fine red if you prefer.

Cheers!
Attachments
champers2.jpg
(21.44 KiB) Downloaded 356 times
nice_red.jpg
(7.17 KiB) Downloaded 339 times

zagreb999
Posts: 567
Joined: Fri 11 Apr 2014, 06:39
Location: Yugoslavija

#19 Post by zagreb999 »

mike,
can you make also
for debiandog and
stretchdog...?

thanks!

zagreb999
Posts: 567
Joined: Fri 11 Apr 2014, 06:39
Location: Yugoslavija

#20 Post by zagreb999 »

mike,
it works!
great job!

thanks!

Post Reply