Ask Klaus
Ask Klaus
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.
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).
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.
Infos
- Knoppix vendors: http://knopper.net/knoppix-vendors/
- "Ask Klaus!" by Klaus Knopper. Linux Magazine, issue 166, September 2014, pg. 50: http://www.linux-magazine.com/Issues/2014/166
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
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.
News
-
Armbian 24.11 Released with Expanded Hardware Support
If you've been waiting for Armbian to support OrangePi 5 Max and Radxa ROCK 5B+, the wait is over.
-
SUSE Renames Several Products for Better Name Recognition
SUSE has been a very powerful player in the European market, but it knows it must branch out to gain serious traction. Will a name change do the trick?
-
ESET Discovers New Linux Malware
WolfsBane is an all-in-one malware that has hit the Linux operating system and includes a dropper, a launcher, and a backdoor.
-
New Linux Kernel Patch Allows Forcing a CPU Mitigation
Even when CPU mitigations can consume precious CPU cycles, it might not be a bad idea to allow users to enable them, even if your machine isn't vulnerable.
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.
-
Fedora 41 Released with New Features
If you're a Fedora fan or just looking for a Linux distribution to help you migrate from Windows, Fedora 41 might be just the ticket.