site  contact  subhomenews

EasyDD-portable runs on any Linux

May 28, 2020 — BarryK

EasyDD is a script for writing an image file to a drive. Users of older Puppy Linuxes had a problem, the 'dd' utility lacked a required feature. Mike Walsh fixed that by bundling a newer version of 'dd', as a PET, self-extracting archive, and an AppImage:

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

Mike's work is really great. All pups and Puppy-derivatives have 'gtkdialog', required for the GUI mode, however, most other distributions don't have it. So, inspired by Mike, I have created a self-extracting archive with everything in it, including 'gtkdialog', maned EasyDD-portable.

I have written a page for EasyDD:

https://bkhome.org/linux/easydd-write-image-file-to-drive.html

...notice the "no liability" disclaimer!

EasyDD-portable download (18MB):

http://distro.ibiblio.org/easyos/project/easydd/easydd.gz

I created the self-extracting archive by a grass-roots method, inspired by this page:

https://coderwall.com/p/y3upqw/creating-a-self-extracting-archive-installer-script

My project tarball is here:

http://distro.ibiblio.org/easyos/project/easydd/easydd-project.tar.gz

The tarball expands to folder 'easydd-project' and inside the is a build script, 'create-easydd'. Here is the script:

#!/bin/sh
#creates a self-extracting archive named 'easydd.run', that will run easydd.
#ref: https://coderwall.com/p/y3upqw/creating-a-self-extracting-archive-installer-script

[ -f easydd.tar.gz ] && rm -f easydd.tar.gz
tar -cvf easydd.tar easydd.dir/
gzip -9 easydd.tar

[ -f easydd ] && rm -f easydd
cat << 'EOF' >> easydd
#!/bin/sh
EXE="$(realpath ${0})"
PARAM1=''; PARAM2=''
if [ "$1" ];then
if [ "${1:0:1}" == "-" ];then
PARAM1="$1" #-h or --help
else
PARAM1="$(realpath $1)"
fi
fi
[ "$2" ] && PARAM2="$2"
mkdir -p /tmp/easydd-portable-run
cd /tmp/easydd-portable-run
tail -n +18 $EXE | gzip -vdc - | tar -xvf - > /dev/null || exit 1
cd easydd.dir
cp -a -f ./easydd.sh /tmp/easydd.sh 2>/dev/null
exec /tmp/easydd.sh ${PARAM1} ${PARAM2}
EOF

cat easydd.tar.gz >> easydd
chmod 755 easydd

It creates a script named 'easydd' with the code that you can see between the two "EOF" markers. The chrootable 'rootfs' tarball, easydd.tar.gz, is appended onto 'easydd'. When 'easydd' is executed, the 'rootfs' tarball is expanded at /tmp/easydd-portable-run and a script 'easydd.sh' is run.

EDIT 2020-06-16:
EasyDD-portable has been abandoned. Instead, the simple EasyDD script has been enhanced to run on nearly all Linux distributions. There is an introduction page, with download link:

https://bkhome.org/linux/easydd-write-image-file-to-drive.html 

 

Tags: linux