revert-ab6bad7.patch 1.97 KB
Newer Older
Philip Müller's avatar
Philip Müller committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
--- b/man/mkinitcpio.conf.5.txt
+++ a/man/mkinitcpio.conf.5.txt
@@ -52,11 +52,13 @@
 
 *COMPRESSION*::
 
+	Defines a program to filter the generated image through. As of linux 2.6.38,
+	the kernel understands the compression formats yielded by the *gzip*, *bzip2*,
+	*lz4*, *lzop*, *lzma*, and *xz* compressors. As of linux 5.9 the kernel also
+	understands the compression formats yielded by the *zstd* compressor.
+	If unspecified, this setting defaults to *gzip* compression.
+	In order to create an uncompressed image, define
+	this variable as *cat*.
-	Defines a program to filter the generated image through. The kernel
-	understands the compression formats yielded by the *zstd*, *gzip*, *bzip2*,
-	*lz4*, *lzop*, *lzma*, and *xz* compressors. If unspecified, this setting
-	defaults to *zstd* compression. In order to create an uncompressed image,
-	define this variable as *cat*.
 +
 It's not hard to realize that a filter such as a *tac* or *rev* will cause
 *mkinitcpio* to report success but generate a useless image. Similarly, using a
--- b/mkinitcpio
+++ a/mkinitcpio
@@ -508,7 +508,7 @@
         die 'Unable to write to %s' "$_optgenimg"
     fi
 
+    _optcompress=${_optcompress:-${COMPRESSION:-gzip}}
-    _optcompress=${_optcompress:-${COMPRESSION:-zstd}}
     if ! type -P "$_optcompress" >/dev/null; then
         warning "Unable to locate compression method: %s" "$_optcompress"
         _optcompress=cat
--- b/mkinitcpio.conf
+++ a/mkinitcpio.conf
@@ -52,15 +52,15 @@
 HOOKS=(base udev autodetect modconf block filesystems keyboard fsck)
 
 # COMPRESSION
+# Use this to compress the initramfs image. By default, gzip compression
-# Use this to compress the initramfs image. By default, zstd compression
 # is used. Use 'cat' to create an uncompressed image.
-#COMPRESSION="zstd"
 #COMPRESSION="gzip"
 #COMPRESSION="bzip2"
 #COMPRESSION="lzma"
 #COMPRESSION="xz"
 #COMPRESSION="lzop"
 #COMPRESSION="lz4"
+#COMPRESSION="zstd"
 
 # COMPRESSION_OPTIONS
 # Additional options for the compressor