Creating bootable images in a GUI

A Kinder dd

© Photo by Matthew T Rader on Unsplash

© Photo by Matthew T Rader on Unsplash

Article from Issue 233/2020
Author(s):

Kindd offers a GUI alternative to the ubiquitous dd command-line tool, offering a risk-free option for transferring bootable images to USB sticks.

When it comes to managing Linux computers, two frequently used commands, rm (remove) and dd (disk dump), require special attention. These two very powerful tools are potentially destructive. If they are not used carefully, data can be very quickly lost. While rm has an integrated emergency brake for the root partition, dd overwrites specified partitions without asking, causing some users to interpret dd's name as an acronym for "destroy data."

To prevent specifying the wrong partition (and the resulting data loss), graphical user interface (GUI) tools can be helpful for creating bootable distribution images on external media, such as USB sticks or SD cards. In addition to some distribution-specific solutions, these tools include UNetbootin [1], which is not supported by all distributions; Rufus [2], which is only available for Windows; and Etcher [3], which has gained in popularity recently. Because these applications only offer external devices as options for where to write the data, users are prevented from accidentally overwriting partitions.

The basically excellent Etcher can be used on almost all distributions due to its packaging as an AppImage. However, since it was developed with the Electron framework [4], it needs many dependencies, which inflate the AppImage's size to about 100MB.

Another dd alternative, the relatively new Kindd [5], described as "A kindful DD GUI written in Qt Quick," makes do with considerably less disk space. If you remove the unnecessary folder with screenshots after compiling the application, the space requirement can be reduced to a manageable 30MB.

Kindd is ideally suited for desktop environments like Plasma or LXQt and requires at least Qt 5.13. Since Qt 5.13 is not yet available in all distributions, Arch Linux is currently the best distribution choice for running Kindd. In Arch, you will find Kindd in the Arch User Repository (AUR) both as a release version and as a Git excerpt. For all other distributions that already offer Qt 5.13.x or 5.14, you will need to build the software yourself from the source code.

Kindd still lacks important documentation on GitHub, mainly in terms of dependencies needed to compile Kindd. The tool was developed on Void Linux, which is not too widespread, and the developer only lists dependencies for Void. However, I found additional dependencies that needed resolving.

Build-It-Yourself

In addition to the packages listed on Kindd's GitHub page, I also needed to install the following on Void Linux at the time of my test: git, qt5-qmake, qt5-declarative-devel, and qt5-quickcontrols2-devel. I built Kindd on a KDE neon User Edition, which is based on the latest long-term support (LTS) version of Ubuntu and has Qt 5.13, resulting in additional dependencies (see the "Dependencies on Debian Derivatives" box).

Dependencies on Debian Derivatives

You will need to resolve the following dependencies to build and run Kindd on Debian and its derivatives: git, gcc, g++, make, qt5-default, libpolkit-qt5-dev, qml-module-qt-labs-platform, libqtquickcontrols2-5, qtquickcontrols2-5-dev, qml-module-qtgraphicaleffects, and qtdeclarative5-dev.

One general annoyance when it comes to building packages on different distributions is the different names used for the required libraries. One distribution uses -dev as part of the name, the next -devel, and, in some cases, -qt is found in different parts of the name.

As a helper for finding the correct package names, Debian uses apt search and apt-file search, where you first have to install the apt-file package and load the package list by typing apt-file update. Google can also help here, if you combine a name known from another distribution with the term "Debian." In any case, this is often a time-consuming task, even if you work with distributions, like KDE neon, with a fairly short package lists.

After installing all the dependencies, it's time to fetch the source code from GitHub. You can do this either via Kindd's GitHub page [5] by clicking on Clone or download, or you can use git in the terminal (Listing 1, line 1). Next, go to Kindd's source code folder and call qmake (lines 2 and 3). In my test, I got a prompt back immediately. The following command make takes a little longer (line 4). If you see an error message here, you're probably missing a dependency.

Listing 1

Downloading Kindd

01 $ git clone https://github.com/LinArcX/Kindd/
02 $ cd Kindd/
03 $ qmake
04 $ make

If you use a window manager like i3 instead of a full desktop environment, see the polkit notes on the GitHub project page.

Simple Interface

After successfully navigating the installation, start the application by calling ./kindd. The very simple interface (Figure 1) needs virtually no explanation. In contrast to other GUIs that also use dd, Kindd lets you adjust the block size; this corresponds to the bs= option in the command-line variant.

Figure 1: Kindd's straightforward user interface has just three selection fields, including defining block size.

The Block Size option defines the size of the blocks that Kindd reads from the input file and writes to the output device. Instead of the default 5MB, 4MB is a better choice for an ISO image. This is an exact multiple of the 4KB block size of the ext4 filesystem and ensures efficient read and write speeds [6].

The middle selection field, Choose Input .iso file, lets you select the image to be copied. Choose Target Path lists any connected external devices, such as USB sticks, SD cards, or external hard disks. If there are several external data storage devices on the computer, the sudo fdisk -l command can help you decide on the right target.

Transfer

Clicking on the Convert/Copy button at the bottom of the application window starts copying the image after you have confirmed another prompt and entered the root password. Kindd displays a progress bar during the process (Figure 2). Upon completion, a small window saying Congratulations appears to confirm that the image has been successfully transferred.

Figure 2: While writing, the user interface shows a progress bar that indicates the amount of data already written and the write speed.

If you want to select a different image to be copied, pressing the ISO button in the top left corner takes you back to an empty selection mask. The colored ball bottom left takes you to the configuration dialog (Figure 3) where you can change the GUI's look in terms of theme and font type and size. You will want to set the default block size to 4MB and save the settings.

Figure 3: The settings dialog offers some options to customize the appearance of the application, as well as set a default block size.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Burn Image Files with Style Using Etcher
  • AcetoneISO

    Special tools are required to create and process ISO images. AcetoneISO offers this functionality, even making it possible to handle multimedia files.

  • FOSSPicks

    Graham Morrison looks at KIT Scenarist, Inboxer 1.0, Tungsten, rtl_433, Oil 0.3.0, Etcher 1.3.0, and more!

  • Guetzli

    The Guetzli image optimizer by Google developers produces smaller images than JPEG while maintaining the same quality, but it requires a powerful computer with a large working memory.

  • iPXE

    iPXE simplifies the task of booting images over a network and also lets admins design dynamic boot menus that integrate scripts and boot images via HTTP(S).

comments powered by Disqus

Direct Download

Read full article as PDF:

Price $2.95

News