Contents
|
mkusb minimal shellscript plus persistence - mkusb-minp
Separate versions for graphical mode and text mode
Starting with version 9 there are separate versions for
GUI mode: mkusb
text mode: mkusb-nox, mkusb-bas, mkusb-min and now also mkusb-minp
mkusb-minp is simple, the shellscript is rather small compared to the standard mkusb version, only 14 KiB, three times the size of mkusb-min, yet it serves the purpose to wrap a safety belt around 'dd' and to create persistent live drives.
Small and flexible
mkusb-minp needs no extra packages (but makes the user experience nicer, if you install pv). It runs in text screens, terminal windows, via ssh and other network connections.
mkusb-minp works in many different linux distros. It needs bash, some standard tools and features, that are present in almost all current linux distros (2017).
Live-only drive or simple persistent live drive
mkusb-minp is a cloning tool, that helps you clone from a source file to a target device (typically from a linux iso file or image file to a USB pendrive or memory card). This works with all hybrid iso files, and most linux distros provide hybrid iso files.
mkusb-minp can also make persistent live drives with a simple 'next to cloning' method
can create persistent live drives with Ubuntu 19.10, Debian 10 and newer versions. This is what was added to mkusb-min.
use mainstream mkusb for older versions, for example Ubuntu 18.04.3 LTS and Debian 9.
Unlike the other mkusb versions, mkusb-min and mkusb-minp do not manage compressed image files. You have to extract the image file from the compressed file before using it.
mkusb-minp cannot make install drives for Windows, you must use another tool, for example the mainstream mkusb or woeusb for that purpose.
Detailed description
Link to a detailed description to make a persistent live drive: /details
Downloading and installation
The mkusb-minp shellscript file is available as a file to be downloaded from this page.
Download
Download the attached file mkusb-minp and the corresponding md5sum mkusb-minp.md5.asc.
The file is small compared to standard mkusb,
$ wc mkusb-minp 610 2011 14417 mkusb-minp
It should be rather easy to see what the shellscript is doing simply by reading it in a text editor.
md5sum
The simple check is to run
md5sum mkusb-minp
and compare the result with the corresponding line in the file
You may want a higher level of security. This file is signed with gpg and you can verify it according to the following commands.
gpg --keyserver keyserver.ubuntu.com --recv-keys EB0FC2C8 gpg --verify mkusb-minp.md5.asc
The warning "This key is not certified with a trusted signature! There is no indication that the signature belongs to the owner." means that there is no chain of trusted keys between your computer's keyring and the key, that was used to sign the checksums (the key of sudodus). Check that the result matches with the following output, when you verify it,
tester@xenial32 ~ $ gpg --keyserver keyserver.ubuntu.com --recv-keys EB0FC2C8 gpg: directory `/home/tester/.gnupg' created gpg: new configuration file `/home/tester/.gnupg/gpg.conf' created gpg: WARNING: options in `/home/tester/.gnupg/gpg.conf' are not yet active during this run gpg: keyring `/home/tester/.gnupg/secring.gpg' created gpg: keyring `/home/tester/.gnupg/pubring.gpg' created gpg: requesting key EB0FC2C8 from hkp server keyserver.ubuntu.com gpg: /home/tester/.gnupg/trustdb.gpg: trustdb created gpg: key EB0FC2C8: public key "Nio Sudden Wiklund (sudodus) <address@mailserver.com>" imported gpg: no ultimately trusted keys found gpg: Total number processed: 1 gpg: imported: 1 (RSA: 1) tester@xenial32 ~ $ gpg --verify mkusb-minp.md5.asc gpg: Signature made tis 8 okt 2019 15:39:39 CEST gpg: using RSA key 0303EA77E34C52F2295847C6BD43C742EB0FC2C8 gpg: issuer "nio.wiklund@gmail.com" gpg: Good signature from "Nio Sudden Wiklund (sudodus) <nio.wiklund@gmail.com>" [ultimate] gpg: WARNING: not a detached signature; file 'mkusb-minp.md5' was NOT verified! $
Then there is reason to trust that nobody else has written the checksums. The date of the signature will change at updates, and the text might be translated to your local language, but it should be clear that it is a 'Good signature from "Nio Sudden Wiklund (sudodus)"'.
If you have the shellscript and the md5sum file in the same directory, you can use the md5sum program to check it like this,
tester@xenial32 ~ $ md5sum -c mkusb-minp.md5.asc mkusb-minp: OK md5sum: WARNING: 14 lines are improperly formatted
The 'improperly formatted lines' are the lines belonging to the gpg signature.
Run locally or install
You can but need not install mkusb-minp. It can be run locally from the current directory.
Make the shellscript executable,
chmod ugo+x mkusb-minp
Run locally
Then mkusb-minp can be run with superuser permissions (with sudo or as root depending on the linux distro) in the current directory,
$ sudo ./mkusb-minp file.iso /dev/sdx
or
# ./mkusb-minp file.iso /dev/sdx
Install
If /usr/local/sbin exists in your computer and in PATH, you can copy mkusb-minp to that directory,
sudo cp -i mkusb-minp /usr/local/sbin
Otherwise you can copy it to /usr/sbin, which should exist, and there should be no other program with the same name (except maybe an old version of the same mkusb-minp).
sudo cp -i mkusb-minp /usr/sbin
Then mkusb-minp can be run with superuser permissions (with sudo or as root depending on the linux distro) in any directory,
$ sudo mkusb-minp file.iso /dev/sdx
or
# mkusb-minp file.iso /dev/sdx
Using mkusb-minp
The following dialogues in a terminal window illustrate how to run mkusb-minp, and install live linux operating systems from iso files to a memory card and a pendrive.
Usage text with a list of available target devices
Making persistent live Debian 10 USB pendrive
Use the option -p
sudo ./mkusb-min -p debian-live-10.0.0-amd64-standard.iso /dev/sdX
where X should be replaced by the actual device letter for the USB pendrive.
See the details here: 02-making-debian-persisent-live.txt
Making persistent live Lubuntu 19.10 memory card
Use the option -p
sudo ./mkusb-minp -p lubuntu-19.10-desktop-amd64.iso /dev/mmcblk0
Making live-only Xubuntu 19.10 USB pendrive
Use the option -n
sudo ./mkusb-minp -n xubuntu-19.10-desktop-amd64.iso /dev/sdX
where X should be replaced by the actual device letter for the USB pendrive.
You may ask "Why this option, isn't live the default for a cloned drive?"
Well, it used to be, and it is still live but not live-only in 19.10
The default action is that a casper-rw partition is created automatically and it is mounted to '/var/crash' and '/var/log', so that some of the things you are doing are logged. If you want a purely live-only drive, where nothing will be preserved after shutdown and reboot, you had better
use mkusb-minp with the option -n
or manually modify the built-in boot options to replace 'quiet splash' with 'nopersistent' according to this link.
'pv' installed to show the progress;
Cloning from a Tiny Core iso file to a USB pendrive
See also a screenshot from the original mkusb-min: ../min/mkusb-min-03.png
mkusb-bas for old or very small linux distros
mkusb-minp uses some commands and features, which are not available in old or very small linux distros, for example Wary Puppy and Tiny Core. A version based on mkusb 7.4 is made for such cases - mkusb-bas.
The basic mode quick start manual describes the text only and non-menu version mkusb-bas