Klaus talks about some new features in the latest Knoppix

Knoppix 8.1

© Lead Image © Jan Treger, 123RF.com

© Lead Image © Jan Treger, 123RF.com

Article from Issue 205/2017
Author(s):

The latest Knoppix comes with a new I/O scheduler, and the new hybrid ISO image format allows you to boot from either a DVD or USB stick. Klaus talks about the changes with the latest edition of Knoppix, and offers a glimpse at some of the problems he faces when producing a new Knoppix version.

Editor's Note: Our own Professor Knopper has another life as the creator and maintainer of the popular Knoppix Live Linux distro. With its large collection of troubleshooting and diagnostic tools, Knoppix is a trusted companion for system administrators and other IT professionals, but Knoppix also comes with a vast collection of desktop tools, which means it is fully functional as an everyday Linux system on a live disk. In this article, Klaus offers some thoughts and tips on the new Knoppix 8.1, which is included on this month's DVD.

After months of preparation, the English language version of Knoppix 8.1 is finally available [1]. Due to the increasing complexity of applications and dependencies, as well as the strategic decisions of software developers, every year it gets more difficult to make everything work together smoothly. All the changes and redesigns in recent Debian releases mean I now spend more time on testing and workarounds than I do on development and programming. (For an example of the kinds of problems I face, see the box entitled "Labor-Intensive Workarounds for Small Bugs.")

Knoppix 8.1 (Figure 1) contains 4,100 software packages (including libraries and supporting shared data), which results in around 4,500 executable files. Only a small fraction of these programs appear in the desktop menus; many of the latest and greatest tools for data rescue or advanced networking are only found at the command line.

Figure 1: The English edition of Knoppix 8.1 is now out in the world.

Labor-Intensive Fixes for Small Bugs

Especially annoying are programs that used to work perfectly in older versions but terminate with error messages or show unexpected behavior with updates. Just keeping the old version is not always a good solution, because the new version is often created to address security problems or software incompatibilities.

Often the only solution is to use the new version but to spend some time developing a workaround. For example, TeXmacs (Figure 2) is a graphical editor for the TeX typesetting system that lets you include live sessions of mathematical software, such as the popular Maxima computer algebra system. Internally, TeXmacs checks for the availability of a Maxima plugin by calling Maxima with a version option. In the latest version of Maxima, that version option produces an empty result, so TeXmacs thinks Maxima is not working and disables the live algebraic session option. As a workaround, I added some code in the Maxima front-end command to output Maxima's version number (like in the old version), so TeXmacs is now happily creating Maxima sessions in documents again. As you can imagine, it is very difficult to even find such problems, not to mention repairing them in software you aren't too familiar with. Regression tests that involve interaction with each and every installed program are not feasible.

Figure 2: The TeXmacs TeX editor required some extra attention.

The base system is installed inside a cloop-compressed image called KNOPPIX inside the KNOPPIX folder, and additional programs for 3D construction and video editing appear in the KNOPPIX1 add-on file. Splitting the contents is necessary because the FAT32 filesystem, as well as the traditional ISO 9660 filesystem used in DVDs, only support file sizes smaller than 4GB.

Although it is compressed to around 4.2GB, the total amount of data installed on Knoppix 8.1 is 11GB. The data is transparently decompressed by the cloop kernel module.

Knoppix uses its own, script-based startup system and only starts services needed for operation, so the memory footprint is around 150MB after booting into the graphical user interface.

Although the kernel is auto-selected as 32- or 64-bit on startup, installed programs are 32-bit, so all 32- and 64-bit Intel/AMD platforms are supported. Thus Knoppix can still be used on old computers with few CPU and memory resources.

Because the distributed ISO image is now in ISO hybrid format, it is no longer necessary to burn Knoppix to a DVD first; you can write it directly to a USB flash disk using dd or cp on Linux or using imaging tools like Win32 Disk Imager in Windows.

If you feel like experimenting, you can also create your own ISO hybrid image. (See the box entitled "Hybrid Image for DVD and Flash Disk.")

Hybrid Image for DVD and Flash Disk

If you wish to create your own new hybrid ISO image, make sure you are using the development snapshot 1.4.9 from the xorriso project page [2].

The new hybrid image format adds a partition table for booting from flash to the ISO image [3]. Knoppix 8.1 includes some optimizations related to the hybrid generation procedure – to make the image more compatible with BIOS systems and UEFI firmware. I used an additional GUID partitioning scheme in version 8.0, but this approach turned out to confuse other operating systems after automatic expansion of the last partition.

The development snapshot for xorriso is not capable of creating a pure DOS/MBR-based partition table, and the partition containing the EFI boot files is now outside of the first ISO partition. If you would like to remaster the ISO image file, the command should be similar to Listing 1, where $SRC is the directory with a copy of the first Knoppix partition's content, efi.img is an image of the second, and REISERFS.IMG an image of the third (empty) partition, copied from the original downloaded file (not the flash-knoppix-generated version). /usr/lib/ISOLINUX/isohdpfx.bin is a hybrid MBR template included in the syslinux package.

Thanks to Thomas Schmitt from the xorriso project for all the useful tips!

Listing 1

Creating a Hybrid Image

 

Rebootless Auto-Resize of Data Partition on Flash

Knoppix traditionally uses an additional partition with a native Linux filesystem in order to overlay one's own changes and installations on top of the read-only system data mounted from the compressed KNOPPIX* files. With the flash-knoppix tool, this partition can be sized by the user as needed. However, when booting from a USB flash disk that was installed by the image method directly from the ISO file, the last partition is only 4MB in size at first sight in order to save space in the distributed image. The initial ramdisk of Knoppix now contains code to expand this last partition on-the-fly up to the last available unused sector on the medium. Other distros, like Raspbian on Raspberry Pi, can do this as well, but when even just one partition is mounted from disk while repartitioning, the kernel won't accept the new partition table until a reboot occurs. For this reason, the Knoppix initial script unmounts and rescans the disk after repartitioning and before attempting to resize the filesystem – from the ramdisk that contains all necessary tools. This way, no reboot is needed and the user doesn't have to change the boot order sequence again in order to use the overlay partition.

The resizedata function is, of course, only called after a few safety checks – if it's running from a Knoppix-image-installed USB flash disk, enough empty space must be available after the last partition, and the current filesystem must be labeled KNOPPIX-DATA. If any of these is not the case, the data partition will be ignored, and the system will continue running with only a ramdisk overlay.

New I/O Scheduler

One of the most interesting features of the newer Linux kernels is the introduction of multi-queue schedulers, which allow parallelizing of read/write requests depending on selectable strategies. This feature is most useful for devices with low latency, as well as rotational disks with high seek latency. The Budget Fair Queueing (BFQ) scheduler has been introduced in the mainststream kernel for multi-queue mode only. Previous Knoppix versions had BFQ included as a nonstandard kernel patch, so this is a most welcome change for Knoppix that eliminates the need for an additional patch. BFQ attempts to distribute I/O bandwidth based on a "budget" for each newly started task, so the system should feel faster interactively, and programs should load quicker, even under massive parallel disk usage. Of course, BFQ can't circumvent physical bandwidth limits.

Where's Firefox?

One very controversial design decision of the Mozilla developer team is the removal of direct support for ALSA – the standard Linux sound system – in Firefox. Firefox now requires PulseAudio, but not only as a library, which is, of course, present in Knoppix, but as a sound server system running on the computer. Knoppix does not use PulseAudio in server mode because it can indefinitely block sound output for other programs, which is not acceptable for accessibility tools, such as speech assistance systems. Also, no other sound-enabled program requires a PulseAudio server – only Firefox. For this reason, Firefox, starting from version 52, remains silent and displays a confusing message telling the user to install additional software when entering YouTube and other sound-enabled websites. This problem is not just in Knoppix but in all Linux distros that refrain from starting an additional sound server. According to Mozilla [4], the removed ALSA sound support in the official Firefox releases will never be fixed.

An apparent workaround is using a different web browser for sites that require sound. In order to avoid too many questions about "sound not working," I replaced the Firefox icon with Chromium (the open source variant of Chrome) in the LXDE quick-start bar. But Firefox is still present as an alternative under the Internet desktop menu.

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

  • Knoppix 7.3

    Knoppix 7.3 comprises the current state of Debian GNU/Linux development and comes with the current hardware support of kernel 3.13, a new update function, and extended security and privacy features.

  • Ask Klaus

    What’s new in Knoppix 7.4?

  • Professor Knopper's Lab – Hybrid Image Mode

    As DVD drives disappear from modern notebook computers, Knoppix offers a hybrid image mode that works for both DVDs and flash drives.

  • Knoppix 7.5 CeBIT Edition

    Knoppix 7.5 is based on the current development version of Debian GNU/Linux and comes with hardware support from kernel 3.18 including many updates and new features.

  • Knoppix 6.3 Exclusive!

    Knoppix creator (and Q&A mastermind) Klaus Knopper shares some insights on the latest release.

comments powered by Disqus

Direct Download

Read full article as PDF:

Price $2.95

News