mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 13:06:59 +02:00
grub_install.sh: Compress modules with xz instead of gzip to save space
Giving the --best or -9 option results in a heavier decompression cost with no gain on such small files. Signed-off-by: James Le Cuirot <jlecuirot@microsoft.com>
This commit is contained in:
parent
93cbba765d
commit
945014691b
@ -41,7 +41,7 @@ switch_to_strict_mode
|
||||
GRUB_DIR="flatcar/grub/${FLAGS_target}"
|
||||
|
||||
# Modules required to boot a standard CoreOS configuration
|
||||
CORE_MODULES=( normal search test fat part_gpt search_fs_uuid gzio search_part_label terminal gptprio configfile memdisk tar echo read btrfs )
|
||||
CORE_MODULES=( normal search test fat part_gpt search_fs_uuid xzio search_part_label terminal gptprio configfile memdisk tar echo read btrfs )
|
||||
|
||||
SBAT_ARG=()
|
||||
|
||||
@ -137,7 +137,7 @@ case "${FLAGS_target}" in
|
||||
[[ ${file} == ${GRUB_SRC}/${core_mod}.mod ]] && continue 2
|
||||
done
|
||||
out="${ESP_DIR}/${GRUB_DIR}/${file##*/}"
|
||||
gzip --best --stdout "${file}" | sudo_clobber "${out}"
|
||||
xz --stdout "${file}" | sudo_clobber "${out}"
|
||||
done
|
||||
;;
|
||||
esac
|
||||
@ -178,7 +178,7 @@ fi
|
||||
|
||||
info "Generating ${GRUB_IMAGE}"
|
||||
sudo grub-mkimage \
|
||||
--compression=auto \
|
||||
--compression=xz \
|
||||
--format "${FLAGS_target}" \
|
||||
--directory "${GRUB_SRC}" \
|
||||
--config "${ESP_DIR}/${GRUB_DIR}/load.cfg" \
|
||||
|
@ -1 +1,2 @@
|
||||
- Additional GRUB modules are no longer installed for UEFI platforms to save space and also because they cannot be loaded with Secure Boot enabled. This does not affect existing installations.
|
||||
- The GRUB modules on non-UEFI platforms are now compressed with xz rather than gzip to save even more space. This does not affect existing installations.
|
||||
|
Loading…
Reference in New Issue
Block a user