On Wed, Jul 8, 2015 at 6:50 AM, Martin Møller Skarbiniks Pedersen
<[email protected]> wrote:
> Under "Terms and Utilities" for 201.1 Kernel components
> both zImage and bzImage are mentioned.
> Is there any good reason to mention and/or use zImage ?
Yes! One big reason ...
Kernels compressed with the BWT algorithm (traditionally bzImage) will
_not_ load on some platforms. [1] Only a LZ77-based algorithm will
work on these platforms.
Another, related reason ... why we still have to cover "kernel image"
nomenclature" ...
- Some vendors continue to use "vmlinuz" to avoid compression-specific names [2]
Ergo ...
- The "file" command returns the "kernel image nomeclature", _not_ the
compressor or algorithm [3]
Among LZ77 Implementations ...
- LZ77 (traditionally zImage) is the still the default in many
Upstream platform configs
- LZO (traditionally lzImage), which is a modification of LZ77 for
footprint (with performance side-benefit) [4]
- LZMA (potentially xzImage [2]) is another LZ77 modification for
size, but LZ77-like footprint [1]
Among image names ... (which is why we still need to cover them)
It's important for Senior-level Linux SysAdmins to understand there
are multiple compressors, the kernel image nomenclature for those
compressors (e.g., file command output), etc...
-- bjs
[1] BWT (bzImage) algorithm cannot be implemented in many 32-bit ARM9
(ARMv7 ISA) implementations, which are only getting more popular, as
they are limited by the memory model (malloc pointers) used at boot.
It should be addressed with the 64-bit aarch64 ARMv8 in the long run,
but LZ77-based compressors will continue to be popular for kernel
images. ;)
[2] Example "file" command output strings, which are "kernel image
nomeclature" ...
/boot/vmlinuz-..: Linux kernel x86 boot executable zImage, version ...
/boot/vmlinuz-..: Linux kernel x86 boot executable bzImage, version ...
Again, it doesn't say whether it's BWT/bzip2, LZ77/gzip, etc... so it
_is_ important to know the kernel image nomenclature, and how it maps
to the algorithm/implementation. ;)
[3] LZO (lzImage), which is LZ77 with the IETF RFC1951 ("DEFLATE"
algorithm from Katz of PKZIP fame -- versus gzip's "INFLATE) is still
very popular when decompression-time footprint is absolute, such as
boot-time memory. Outside of the kernel, it's also getting very
popular for multi-streaming, not so much for just CPU, but also sheer
memory allocation. E.g., compressing/decompressing hundreds of
streams.
[4] LZMA (potentially xzImage) leverages LZ77 with a dictionary,
giving BWT-like (or sometimes better) compression, with a more
LZ77-like footprint. It's used for boot in heavily compressed
read-only media the most, with the newer XZ tools replacing the old
LZMA (still same algorithm). The kernel image nomenclature hasn't
been seen much in the wild (e.g., inside a "regular PC" /boot),
largely because Red Hat only uses "vmlinuz" for its kernel images
(although Red Hat still defaults to bzImage). Outside of the kernel,
Red Hat is increasingly using LZMA for files, SOSReports and other
tarballs (as GNU Tar has an option for XZ), and may be adopted for RPM
packaging in the future. So don't overlook it be quite common for the
kernel compressor in the future. ;)
_______________________________________________
lpi-examdev mailing list
[email protected]
http://list.lpi.org/cgi-bin/mailman/listinfo/lpi-examdev