Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Equalize Dev/master branch #1317

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions usr/share/rear/conf/GNU/Linux.conf
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,13 @@ sr_mod
ide_cd
cdrom
uhci_hcd
uhci_pci
ehci_hcd
ehci_pci
xhci_hcd
xhci_pci
ohci_hcd
ohci_pci
zlib
zlib-inflate
zlib-deflate
Expand Down
14 changes: 12 additions & 2 deletions usr/share/rear/conf/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1515,16 +1515,26 @@ UEFI_BOOTLOADER=""
# When booting on ppc64 with the yaboot bootloader the initrd must be less than 32MB
# so that in this case the lzma compression could be even required
# see https://github.com/rear/rear/issues/1142
# In genaral a smaller initrd is loaded faster by the ReaR rescue/recovery system bootloader
# In general a smaller initrd is loaded faster by the ReaR rescue/recovery system bootloader
# so that a small initrd could make the whole system recovery a bit faster.
# Except for lz4 which is ultra fast in decompressing.
# An example:
# extraction time creating initrd size
# ----- ------------------- --------------- --------------
# lz4 0.248s 4-5 seconds 64 MiB
# fast 3.111s 9 seconds 51 MiB
# lzma 6.775s 173 seconds 34 MiB
# ----- ------------------- --------------- --------------
# note: extraction time is an estimate, based on 'lsinitcpio -a' output
#
# With REAR_INITRD_COMPRESSION="fast"
# an initrd.cgz with gzip --fast compression is created (fast creating but less compression).
# With REAR_INITRD_COMPRESSION="best"
# an initrd.cgz with gzip --best compression is created (best gzip compression but slower creating).
# With REAR_INITRD_COMPRESSION="lzma"
# an initrd.xz with xz using the lzma compression is created (very best compression but very slow).
# With REAR_INITRD_COMPRESSION="lz4"
# an initrd.lz4 with lz4 default -1 compression is created (fast speed but less compression).
# an initrd.lz4 with lz4 -l compression is created (faster creating but less compression, compared to 'fast').
# An initrd.xz with lzma or lz4 compression may not work in this or that case.
# An initrd.xz with lzma or lz4 compression is known not to work together with DRLM prior to version 2.1.1
# see https://github.com/rear/rear/pull/1182#issuecomment-275423441
Expand Down
7 changes: 4 additions & 3 deletions usr/share/rear/pack/GNU/Linux/900_create_initramfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ pushd "$ROOTFS_DIR" >/dev/null
start_seconds=$( date +%s )
case "$REAR_INITRD_COMPRESSION" in
(lz4)
# Create initrd.lz4 with lz4 default -1 compression (fast speed but less compression)
# Create initrd.lz4 with lz4 -l compression (fast speed but less compression)
# -l = Legacy format (typically for Linux Kernel compression)
REAR_INITRD_FILENAME="initrd.lz4"
LogPrint "Creating recovery/rescue system initramfs/initrd $REAR_INITRD_FILENAME with lz4 compression"
if find . ! -name "*~" | cpio -H newc --create --quiet | lz4 > "$TMP_DIR/$REAR_INITRD_FILENAME" ; then
LogPrint "Creating recovery/rescue system initramfs/initrd $REAR_INITRD_FILENAME with lz4 -l compression"
if find . ! -name "*~" | cpio -H newc --create --quiet | lz4 -l > "$TMP_DIR/$REAR_INITRD_FILENAME" ; then
needed_seconds=$(( $( date +%s ) - start_seconds ))
LogPrint "Created $REAR_INITRD_FILENAME with lz4 compression ($( stat -c%s $TMP_DIR/$REAR_INITRD_FILENAME ) bytes) in $needed_seconds seconds"
else
Expand Down