From 15f8fe2c60dc9eb31f5223398949e16c09d9c4b8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fran=C3=A7ois=20Tigeot?= Date: Thu, 10 Apr 2014 08:15:09 +0200 Subject: [PATCH] mkinitrd(8): gzip newly produced images The space savings can be considerable with the current 15MB ramdisk images beeing reduced to 3.9MB once compressed. --- sbin/mkinitrd/mkinitrd.8 | 4 ++-- sbin/mkinitrd/mkinitrd.sh | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) mode change 100644 => 100755 sbin/mkinitrd/mkinitrd.sh diff --git a/sbin/mkinitrd/mkinitrd.8 b/sbin/mkinitrd/mkinitrd.8 index c4d3408341..2e86be72d1 100644 --- a/sbin/mkinitrd/mkinitrd.8 +++ b/sbin/mkinitrd/mkinitrd.8 @@ -54,10 +54,10 @@ It will also copy the contents of onto the ramdisk, maintaining the same hierarchy. .Pp On completion, the final image will be copied to -.Pa /boot/kernel/initrd.img , +.Pa /boot/kernel/initrd.img.gz , ready to be used as an early userland. The base directory for -.Pa kernel/initrd.img +.Pa kernel/initrd.img.gz can be changed with the .Fl b option to an optional diff --git a/sbin/mkinitrd/mkinitrd.sh b/sbin/mkinitrd/mkinitrd.sh old mode 100644 new mode 100755 index d53440f7ac..fd5bbf524c --- a/sbin/mkinitrd/mkinitrd.sh +++ b/sbin/mkinitrd/mkinitrd.sh @@ -121,4 +121,5 @@ copy_content make_hier print_info destroy_vn -mv ${TMP_DIR}/initrd.img ${BOOT_DIR}/kernel/initrd.img +/usr/bin/gzip -9 ${TMP_DIR}/initrd.img +mv ${TMP_DIR}/initrd.img.gz ${BOOT_DIR}/kernel/initrd.img.gz -- 2.41.0