Ask Klaus

Ask Klaus

Article from Issue 183/2016

Klaus Knopper answers your Linux questions.

Hi Klaus, my Linux PC is "off the road." Is it possible to offer follow-up disks after installing your Knoppix OS, for people that do not have Internet access capable of downloading files off the OS server?

Regards, Cy O'Hara

Like most distros, there are independent providers of DVDs or USB flash disks for Knoppix, too. Most of their addresses are listed on the "Knoppix Vendors" website [1]. Because the main feature of Knoppix is NOT having to get installed in the first place, but running Live from DVD or USB, new versions are not meant to be used as an update to a hard disk installation. However, the flash-knoppix installer allows you to update flash disks already containing a Knoppix installation (Figure 1). This process lets you overwrite files on the FAT32-formatted system partition but keep your personal data and settings on the second partition intact.

Figure 1: The flash-knoppix installer.

Hi Klaus, I noticed that you replied to my email about compiling and linking 64-bit code in issue 166 of Linux Magazine last year [2]. Thank you so much! I also noticed that you installed gcc-multilib in Knoppix now. Thanks again! Would you consider including g++-multilib in Knoppix in the future as well?

If I may be so bold, I have another question for you. Knoppix is the best distro I have found by far for USB flash drives. If I install another distro, such as Ubuntu, directly to a USB flash drive like I would to an HDD, it can pause and be unresponsive often. How come USB flash drives are more restrictive than a normal SSD drive? What steps does Knoppix take to get around the USB flash drive limitations? I have tried moving, for example, /tmp and /var/log to tmpfs but that's not enough. Does Knoppix move /home directly to the ramdisk and start up and sync it on shutdown?

Kind Regards, Chad

Unfortunately, multiarch can be somewhat heavy concerning dependencies, so I'd rather like to keep run-time and development files for multiple architectures at a minimal level.

About USB speed: Reducing write cycles and finding a well-balanced scheme for parallel writes and reads is a challenge for hardware and software and depends greatly on the USB flash drive hardware design. SSDs are more optimized for asynchronous writes than most USB flash pens, so no latencies should occur when writing a large amount of data to disk. However, some flash internal controllers block read access during writes, so you might experience noticeable delays or "freezes" during the drive's internal data reorganization, which can be quite annoying.

You'll have to figure out which brand supports quicker parallel read/writes. Knoppix delays writes somewhat in order to write larger chunks of data at once, which is more efficient and enhances the lifetime of most flash pens. However, on slow drives, this can cause longer freezes during a write cycle, so these optimizations are not always efficient. Avoiding frequent writes by putting /tmp, /var/tmp, and other locations for often-written volatile data on a ramdisk can help as a workaround for slow writes.

Also, the filesystem RAM cache can be helpful. I have experimented with moving /home to ram and back to disk, but it has a huge disadvantage: Your RAM could get filled up with huge amounts of temporary data and thus crash the system. And, if you don't shut down the computer properly or are impatient, data may not get written back in time. Thus, I prefer to use buffered filesystem writes on an AuFS overlay with a second partition, so that reading from the read-only system overlay and writing on the read-write flash partition overlay can go in parallel. Apparently, this works pretty well in most cases.

The fact that the main system data is stored in compressed form (files KNOPPIX and KNOPPIX*) is also helpful for performance, because it speeds up the physical read speed by the compression factor – usually between one and five times the uncompressed read speed. Decompressing data in memory is much quicker than waiting for read response of magnetic, optical, or flash physical media.

Check to see what's mounted where in Knoppix with the df command after booting from a USB flash disk (Figure 2).

Figure 2: Seeing what is mounted where.

The /KNOPPIX mountpoint(s) are constructed from read-only compressed data, whereas /KNOPPIX-DATA is the read/write partition on the flash disk installation. Optimally, the controller managing NAND flash should handle parallelized read and write operations to different segments of the flash memory, but most often with cheap drives, it's implementation is busy waiting for any pending operation to complete in a sequential order, which makes data throughput much slower than necessary.


  1. Knoppix vendors:
  2. "Ask Klaus!" by Klaus Knopper. Linux Magazine, issue 166, September 2014, pg. 50:

Buy this article as PDF

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

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Ask Klaus!
  • Ask Klaus!

    Klaus Knopper answers your Linux questions.

  • Ask Klaus!

    Klaus Knopper is the creator of Knoppix and co-founder of LinuxTag expo. He currently works as a teacher, programmer, and consultant. If you have a configuration problem, or if you just want to learn more about how Linux works, send your questions to:

  • Ask Klaus!

    Klaus Knopper answers your Linux questions.

  • Ask Klaus

    What’s new in Knoppix 7.4?

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More