EasyDD-portable fixed for Debian, Devuan, Mint, etc
I posted about EasyDD-portable, that is supposed to run on all
Linux distributions. All that they need is a shell interpreter and some
basic utilities such as 'cut', 'grep', 'tr', 'realpath', etc. Here is
the blog post:
https://bkhome.org/news/202005/easydd-portable-runs-on-any-linux.html
Bob, running Devuan, reported a "bad substitution" error in the 'easydd' script, and so did Jonathan, running Linux Mint.
That is because the "shebang line" is "#!/bin/sh" which in Debian and
Debian-derivatives, will run 'dash'. Unfortunately, dash is a very
primitive shell interpreter.
I recall years ago, being annoyed because dash does not understand
"echo -e ..." so cannot interpret terminal commands. That is because
dash is designed to work when there is no terminal.
Hmmm, Busybox ash handles the "-e" and that works everywhere, including direct to the screen in the initrd.
Now onto EasyDD, and I have found that dash does not understand "${var:0:1}" parameter expansion.
Then I found that dash does not understand the simplified if-then "[ "$var" ] && ...".
I am so accustomed to using the far more capable 'ash' in Busybox.
I have fixed it by changing three scripts in EasyDD-portable to use
bash. Presumably, all Linux distributions have bash, and those that are
purely busybox-based will likely have bash as an alias to ash.
EasyDD-portable fixed is uploaded here:
http://distro.ibiblio.org/easyos/project/easydd/
Note, if you are running EasyOS, EasyPup, Puppy, FatDog, or any other
Puppy-derivative, you do not need EasyDD-portable. The small EasyDD
script will work for you:
https://bkhome.org/news/202006/enhancements-for-easydd-script.html
...the only caveat is that very old versions of Puppy Linux (5-6
years ago) may have an old version of the 'dd' utility that will not
work with EasyDD, in which case use EasyDD-portable.
EDIT 2020-06-12:
I have feedback from Jonathan and Tom that the "fixed" EasyDD-portable
tried to write to the wrong drive. So I have taken it down, and will
install Debian, Devuan, or Mint and test EasyDD-portable.
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:
Tags: linux