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
-
The GNU Project Celebrates Its 40th Birthday
September 27 marks the 40th anniversary of the GNU Project, and it was celebrated with a hacker meeting in Biel/Bienne, Switzerland.
-
Linux Kernel Reducing Long-Term Support
LTS support for the Linux kernel is about to undergo some serious changes that will have a considerable impact on the future.
-
Fedora 39 Beta Now Available for Testing
For fans and users of Fedora Linux, the first beta of release 39 is now available, which is a minor upgrade but does include GNOME 45.
-
Fedora Linux 40 to Drop X11 for KDE Plasma
When Fedora 40 arrives in 2024, there will be a few big changes coming, especially for the KDE Plasma option.
-
Real-Time Ubuntu Available in AWS Marketplace
Anyone looking for a Linux distribution for real-time processing could do a whole lot worse than Real-Time Ubuntu.
-
KSMBD Finally Reaches a Stable State
For those who've been looking forward to the first release of KSMBD, after two years it's no longer considered experimental.
-
Nitrux 3.0.0 Has Been Released
The latest version of Nitrux brings plenty of innovation and fresh apps to the table.
-
Linux From Scratch 12.0 Now Available
If you're looking to roll your own Linux distribution, the latest version of Linux From Scratch is now available with plenty of updates.
-
Linux Kernel 6.5 Has Been Released
The newest Linux kernel, version 6.5, now includes initial support for two very exciting features.
-
UbuntuDDE 23.04 Now Available
A new version of the UbuntuDDE remix has finally arrived with all the updates from the Deepin desktop and everything that comes with the Ubuntu 23.04 base.